Skip to content

Commit 7b3fffc

Browse files
authored
Merge pull request #1940 from mgxd/doc/constrastmgr
doc: warn contrastmgr deprecation in fsl 5.0.7+
2 parents b19a551 + c77e00d commit 7b3fffc

File tree

1 file changed

+9
-10
lines changed

1 file changed

+9
-10
lines changed

nipype/interfaces/fsl/model.py

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,6 @@
3030
BaseInterfaceInputSpec)
3131
from .base import FSLCommand, FSLCommandInputSpec, Info
3232

33-
3433
class Level1DesignInputSpec(BaseInterfaceInputSpec):
3534
interscan_interval = traits.Float(mandatory=True,
3635
desc='Interscan interval (in secs)')
@@ -694,18 +693,15 @@ class FILMGLS(FSLCommand):
694693
"""
695694

696695
_cmd = 'film_gls'
697-
696+
input_spec = FILMGLSInputSpec
697+
output_spec = FILMGLSOutputSpec
698698
if Info.version() and LooseVersion(Info.version()) > LooseVersion('5.0.6'):
699699
input_spec = FILMGLSInputSpec507
700+
output_spec = FILMGLSOutputSpec507
700701
elif (Info.version() and
701702
LooseVersion(Info.version()) > LooseVersion('5.0.4')):
702703
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
704+
709705

710706
def _get_pe_files(self, cwd):
711707
files = None
@@ -1075,13 +1071,16 @@ class ContrastMgr(FSLCommand):
10751071
"""Use FSL contrast_mgr command to evaluate contrasts
10761072
10771073
In interface mode this file assumes that all the required inputs are in the
1078-
same location.
1074+
same location. This has deprecated for FSL versions 5.0.7+ as the necessary
1075+
corrections file is no longer generated by FILMGLS.
10791076
"""
1080-
1077+
if Info.version() and LooseVersion(Info.version()) >= LooseVersion("5.0.7"):
1078+
DeprecationWarning("ContrastMgr is deprecated in FSL 5.0.7+")
10811079
_cmd = 'contrast_mgr'
10821080
input_spec = ContrastMgrInputSpec
10831081
output_spec = ContrastMgrOutputSpec
10841082

1083+
10851084
def _run_interface(self, runtime):
10861085
# The returncode is meaningless in ContrastMgr. So check the output
10871086
# in stderr and if it's set, then update the returncode

0 commit comments

Comments
 (0)