Skip to content

Commit 9ca230f

Browse files
committed
Merge remote-tracking branch 'nipy/master' into mriscombine
2 parents 6c0071c + 482ac61 commit 9ca230f

File tree

5 files changed

+26
-20
lines changed

5 files changed

+26
-20
lines changed

nipype/interfaces/dcm2nii.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -309,7 +309,10 @@ def _parse_stdout(self, stdout):
309309
else:
310310
pass
311311
if out_file:
312-
files.append(out_file + ".nii.gz")
312+
if self.inputs.compress == 'n':
313+
files.append(out_file + ".nii")
314+
else:
315+
files.append(out_file + ".nii.gz")
313316
if self.inputs.bids_format:
314317
bids.append(out_file + ".json")
315318
continue

nipype/interfaces/fsl/model.py

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -30,24 +30,24 @@
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)')
3736
session_info = traits.Any(mandatory=True,
3837
desc=('Session specific information generated '
3938
'by ``modelgen.SpecifyModel``'))
4039
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)),
4342
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)),
4646
traits.Dict(traits.Enum('none'), traits.Dict()),
4747
traits.Dict(traits.Enum('none'), traits.Enum(None)),
4848
mandatory=True,
4949
desc=("name of basis function and options e.g., "
50-
"{'dgamma': {'derivs': True}}"))
50+
"{'dgamma': {'derivs': True}}"),)
5151
orthogonalization = traits.Dict(traits.Int, traits.Dict(traits.Int,
5252
traits.Either(traits.Bool,traits.Int)),
5353
desc=("which regressors to make orthogonal e.g., "
@@ -211,7 +211,7 @@ def _create_ev_files(
211211
try:
212212
ev_parameters['temporalderiv'] = int(bool(ev_parameters.pop('derivs')))
213213
except KeyError:
214-
pass
214+
ev_parameters['temporalderiv'] = False
215215
if ev_parameters['temporalderiv']:
216216
evname.append(name + 'TD')
217217
num_evs[1] += 1
@@ -395,7 +395,7 @@ def _list_outputs(self):
395395
try:
396396
ev_parameters['temporalderiv'] = int(bool(ev_parameters.pop('derivs')))
397397
except KeyError:
398-
pass
398+
ev_parameters['temporalderiv'] = False
399399
if ev_parameters['temporalderiv']:
400400
evname.append(name + 'TD')
401401
outputs['ev_files'][runno].append(
@@ -694,18 +694,15 @@ class FILMGLS(FSLCommand):
694694
"""
695695

696696
_cmd = 'film_gls'
697-
697+
input_spec = FILMGLSInputSpec
698+
output_spec = FILMGLSOutputSpec
698699
if Info.version() and LooseVersion(Info.version()) > LooseVersion('5.0.6'):
699700
input_spec = FILMGLSInputSpec507
701+
output_spec = FILMGLSOutputSpec507
700702
elif (Info.version() and
701703
LooseVersion(Info.version()) > LooseVersion('5.0.4')):
702704
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+
709706

710707
def _get_pe_files(self, cwd):
711708
files = None
@@ -1075,13 +1072,16 @@ class ContrastMgr(FSLCommand):
10751072
"""Use FSL contrast_mgr command to evaluate contrasts
10761073
10771074
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.
10791077
"""
1080-
1078+
if Info.version() and LooseVersion(Info.version()) >= LooseVersion("5.0.7"):
1079+
DeprecationWarning("ContrastMgr is deprecated in FSL 5.0.7+")
10811080
_cmd = 'contrast_mgr'
10821081
input_spec = ContrastMgrInputSpec
10831082
output_spec = ContrastMgrOutputSpec
10841083

1084+
10851085
def _run_interface(self, runtime):
10861086
# The returncode is meaningless in ContrastMgr. So check the output
10871087
# in stderr and if it's set, then update the returncode

nipype/interfaces/fsl/preprocess.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -649,7 +649,7 @@ class MCFLIRTOutputSpec(TraitedSpec):
649649
out_file = File(exists=True, desc="motion-corrected timeseries")
650650
variance_img = File(exists=True, desc="variance image")
651651
std_img = File(exists=True, desc="standard deviation image")
652-
mean_img = File(exists=True, desc="mean timeseries image")
652+
mean_img = File(exists=True, desc="mean timeseries image (if mean_vol=True)")
653653
par_file = File(exists=True, desc="text-file with motion parameters")
654654
mat_file = OutputMultiPath(File(
655655
exists=True), desc="transformation matrices")

nipype/interfaces/script_templates/feat_ev_custom.tcl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,4 +37,4 @@ set fmri(custom$ev_num) "$cond_file"
3737
set fmri(default_bfcustom) "${fsldir}/etc/default_flobs.flobs/hrfbasisfns.txt"
3838
set fmri(basisorth$ev_num) $basisorth
3939
set fmri(basisfnum$ev_num) $basisfnum
40-
set fmri(bfcustom) "$bfcustompath"
40+
set fmri(bfcustom$ev_num) "$bfcustompath"

nipype/pipeline/engine/workflows.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -425,6 +425,9 @@ def write_graph(self, dotfilename='graph.dot', graph2use='hierarchical',
425425
base_dir = os.getcwd()
426426
base_dir = make_output_dir(base_dir)
427427
if graph2use in ['hierarchical', 'colored']:
428+
if self.name[:1].isdigit(): # these graphs break if int
429+
raise ValueError('{} graph failed, workflow name cannot begin '
430+
'with a number'.format(graph2use))
428431
dotfilename = op.join(base_dir, dotfilename)
429432
self.write_hierarchical_dotfile(dotfilename=dotfilename,
430433
colored=graph2use == "colored",

0 commit comments

Comments
 (0)