|
30 | 30 | BaseInterfaceInputSpec)
|
31 | 31 | from .base import FSLCommand, FSLCommandInputSpec, Info
|
32 | 32 |
|
33 |
| - |
34 | 33 | class Level1DesignInputSpec(BaseInterfaceInputSpec):
|
35 | 34 | interscan_interval = traits.Float(mandatory=True,
|
36 | 35 | desc='Interscan interval (in secs)')
|
37 | 36 | session_info = traits.Any(mandatory=True,
|
38 | 37 | desc=('Session specific information generated '
|
39 | 38 | 'by ``modelgen.SpecifyModel``'))
|
40 | 39 | bases = traits.Either(
|
41 |
| - traits.Dict(traits.Enum( |
42 |
| - 'dgamma'), traits.Dict(traits.Enum('derivs'), traits.Bool)), |
| 40 | + traits.Dict(traits.Enum('dgamma'), traits.Dict( |
| 41 | + traits.Enum('derivs'), traits.Bool)), |
43 | 42 | traits.Dict(traits.Enum('gamma'), traits.Dict(
|
44 |
| - traits.Enum('derivs', 'gammasigma', 'gammadelay'))), |
45 |
| - traits.Dict(traits.Enum('custom'), traits.Dict(traits.Dict(traits.Enum('bfcustompath'), traits.Str))), |
| 43 | + traits.Enum('derivs', 'gammasigma', 'gammadelay'))), |
| 44 | + traits.Dict(traits.Enum('custom'), traits.Dict( |
| 45 | + traits.Enum('bfcustompath'), traits.Str)), |
46 | 46 | traits.Dict(traits.Enum('none'), traits.Dict()),
|
47 | 47 | traits.Dict(traits.Enum('none'), traits.Enum(None)),
|
48 | 48 | mandatory=True,
|
49 | 49 | desc=("name of basis function and options e.g., "
|
50 |
| - "{'dgamma': {'derivs': True}}")) |
| 50 | + "{'dgamma': {'derivs': True}}"),) |
51 | 51 | orthogonalization = traits.Dict(traits.Int, traits.Dict(traits.Int,
|
52 | 52 | traits.Either(traits.Bool,traits.Int)),
|
53 | 53 | desc=("which regressors to make orthogonal e.g., "
|
@@ -211,7 +211,7 @@ def _create_ev_files(
|
211 | 211 | try:
|
212 | 212 | ev_parameters['temporalderiv'] = int(bool(ev_parameters.pop('derivs')))
|
213 | 213 | except KeyError:
|
214 |
| - pass |
| 214 | + ev_parameters['temporalderiv'] = False |
215 | 215 | if ev_parameters['temporalderiv']:
|
216 | 216 | evname.append(name + 'TD')
|
217 | 217 | num_evs[1] += 1
|
@@ -395,7 +395,7 @@ def _list_outputs(self):
|
395 | 395 | try:
|
396 | 396 | ev_parameters['temporalderiv'] = int(bool(ev_parameters.pop('derivs')))
|
397 | 397 | except KeyError:
|
398 |
| - pass |
| 398 | + ev_parameters['temporalderiv'] = False |
399 | 399 | if ev_parameters['temporalderiv']:
|
400 | 400 | evname.append(name + 'TD')
|
401 | 401 | outputs['ev_files'][runno].append(
|
@@ -694,18 +694,15 @@ class FILMGLS(FSLCommand):
|
694 | 694 | """
|
695 | 695 |
|
696 | 696 | _cmd = 'film_gls'
|
697 |
| - |
| 697 | + input_spec = FILMGLSInputSpec |
| 698 | + output_spec = FILMGLSOutputSpec |
698 | 699 | if Info.version() and LooseVersion(Info.version()) > LooseVersion('5.0.6'):
|
699 | 700 | input_spec = FILMGLSInputSpec507
|
| 701 | + output_spec = FILMGLSOutputSpec507 |
700 | 702 | elif (Info.version() and
|
701 | 703 | LooseVersion(Info.version()) > LooseVersion('5.0.4')):
|
702 | 704 | input_spec = FILMGLSInputSpec505
|
703 |
| - else: |
704 |
| - input_spec = FILMGLSInputSpec |
705 |
| - if Info.version() and LooseVersion(Info.version()) > LooseVersion('5.0.6'): |
706 |
| - output_spec = FILMGLSOutputSpec507 |
707 |
| - else: |
708 |
| - output_spec = FILMGLSOutputSpec |
| 705 | + |
709 | 706 |
|
710 | 707 | def _get_pe_files(self, cwd):
|
711 | 708 | files = None
|
@@ -1075,13 +1072,16 @@ class ContrastMgr(FSLCommand):
|
1075 | 1072 | """Use FSL contrast_mgr command to evaluate contrasts
|
1076 | 1073 |
|
1077 | 1074 | In interface mode this file assumes that all the required inputs are in the
|
1078 |
| - same location. |
| 1075 | + same location. This has deprecated for FSL versions 5.0.7+ as the necessary |
| 1076 | + corrections file is no longer generated by FILMGLS. |
1079 | 1077 | """
|
1080 |
| - |
| 1078 | + if Info.version() and LooseVersion(Info.version()) >= LooseVersion("5.0.7"): |
| 1079 | + DeprecationWarning("ContrastMgr is deprecated in FSL 5.0.7+") |
1081 | 1080 | _cmd = 'contrast_mgr'
|
1082 | 1081 | input_spec = ContrastMgrInputSpec
|
1083 | 1082 | output_spec = ContrastMgrOutputSpec
|
1084 | 1083 |
|
| 1084 | + |
1085 | 1085 | def _run_interface(self, runtime):
|
1086 | 1086 | # The returncode is meaningless in ContrastMgr. So check the output
|
1087 | 1087 | # in stderr and if it's set, then update the returncode
|
|
0 commit comments