diff --git a/nipype/interfaces/afni/preprocess.py b/nipype/interfaces/afni/preprocess.py index 97455ec69f..fe8a963777 100644 --- a/nipype/interfaces/afni/preprocess.py +++ b/nipype/interfaces/afni/preprocess.py @@ -356,9 +356,17 @@ class AllineateInputSpec(AFNICommandInputSpec): weight_file = File( argstr='-weight %s', exists=True, + deprecated='1.0.0', new_name='weight', desc='Set the weighting for each voxel in the base dataset; ' 'larger weights mean that voxel count more in the cost function. ' 'Must be defined on the same grid as the base dataset') + weight = traits.Either( + File(exists=True), traits.Float(), + argstr='-weight %s', + desc='Set the weighting for each voxel in the base dataset; ' + 'larger weights mean that voxel count more in the cost function. ' + 'If an image file is given, the volume must be defined on the ' + 'same grid as the base dataset') out_weight_file = traits.File( argstr='-wtprefix %s', desc='Write the weight volume to disk as a dataset', diff --git a/nipype/interfaces/afni/tests/test_auto_Allineate.py b/nipype/interfaces/afni/tests/test_auto_Allineate.py index d1a8ae2187..f1e6d4181a 100644 --- a/nipype/interfaces/afni/tests/test_auto_Allineate.py +++ b/nipype/interfaces/afni/tests/test_auto_Allineate.py @@ -117,7 +117,11 @@ def test_Allineate_inputs(): ), warpfreeze=dict(argstr='-warpfreeze', ), + weight=dict(argstr='-weight %s', + ), weight_file=dict(argstr='-weight %s', + deprecated='1.0.0', + new_name='weight', ), zclip=dict(argstr='-zclip', ),