diff --git a/.zenodo.json b/.zenodo.json index 509f8342cc..5205ab1cee 100644 --- a/.zenodo.json +++ b/.zenodo.json @@ -516,6 +516,11 @@ { "name": "Flandin, Guillaume" }, + { + "affiliation": "Dartmouth College", + "name": "Visconti di Oleggio Castello, Matteo", + "orcid": "0000-0001-7931-5272" + }, { "affiliation": "CEA", "name": "Papadopoulos Orfanos, Dimitri", diff --git a/nipype/interfaces/afni/model.py b/nipype/interfaces/afni/model.py index b64c97d4f1..0d56f2dbb5 100644 --- a/nipype/interfaces/afni/model.py +++ b/nipype/interfaces/afni/model.py @@ -36,7 +36,7 @@ class DeconvolveInputSpec(AFNICommandInputSpec): argstr='-input %s', copyfile=False, sep=" ", - position=0) + position=1) sat = traits.Bool( desc='check the dataset time series for initial saturation transients,' ' which should normally have been excised before data analysis.', @@ -57,10 +57,11 @@ class DeconvolveInputSpec(AFNICommandInputSpec): '* If the auto-catenation feature isn\'t used, then this option ' 'has no effect, no how, no way.', argstr='-noblock') - force_TR = traits.Int( + force_TR = traits.Float( desc='use this value instead of the TR in the \'input\' ' - 'dataset. (It\'s better to fix the input using Refit.)', - argstr='-force_TR %d') + 'dataset. (It\'s better to fix the input using Refit.)', + argstr='-force_TR %f', + position=0) input1D = File( desc='filename of single (fMRI) .1D time series where time runs down ' 'the column.', @@ -294,7 +295,11 @@ def _list_outputs(self): outputs['reml_script'] = self._gen_fname( suffix='.REML_cmd', **_gen_fname_opts) - outputs['out_file'] = os.path.abspath(self.inputs.out_file) + # remove out_file from outputs if x1d_stop set to True + if self.inputs.x1D_stop: + del outputs['out_file'] + else: + outputs['out_file'] = os.path.abspath(self.inputs.out_file) return outputs diff --git a/nipype/interfaces/afni/tests/test_auto_Deconvolve.py b/nipype/interfaces/afni/tests/test_auto_Deconvolve.py index fd3539cd53..634b8c9dbf 100644 --- a/nipype/interfaces/afni/tests/test_auto_Deconvolve.py +++ b/nipype/interfaces/afni/tests/test_auto_Deconvolve.py @@ -18,7 +18,10 @@ def test_Deconvolve_inputs(): nohash=True, usedefault=True, ), - force_TR=dict(argstr='-force_TR %d', ), + force_TR=dict( + argstr='-force_TR %f', + position=0, + ), fout=dict(argstr='-fout', ), global_times=dict( argstr='-global_times', @@ -42,7 +45,7 @@ def test_Deconvolve_inputs(): in_files=dict( argstr='-input %s', copyfile=False, - position=0, + position=1, sep=' ', ), input1D=dict(argstr='-input1D %s', ), diff --git a/nipype/interfaces/afni/tests/test_extra_Deconvolve.py b/nipype/interfaces/afni/tests/test_extra_Deconvolve.py new file mode 100644 index 0000000000..b80af90cf5 --- /dev/null +++ b/nipype/interfaces/afni/tests/test_extra_Deconvolve.py @@ -0,0 +1,10 @@ +"""Test afni deconvolve""" + +from ..model import Deconvolve + +def test_x1dstop(): + deconv = Deconvolve() + deconv.inputs.out_file = 'file.nii' + assert 'out_file' in deconv._list_outputs() + deconv.inputs.x1D_stop = True + assert not 'out_file' in deconv._list_outputs() \ No newline at end of file