Skip to content

Commit d181f4c

Browse files
committed
allow float as weight
1 parent 9a988d6 commit d181f4c

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

nipype/interfaces/afni/preprocess.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -353,12 +353,13 @@ class AllineateInputSpec(AFNICommandInputSpec):
353353
argstr='-nomask',
354354
desc='Don\'t compute the autoweight/mask; if -weight is not '
355355
'also used, then every voxel will be counted equally.')
356-
weight_file = File(
356+
weight = traits.Either(
357+
File(exists=True), traits.Float(),
357358
argstr='-weight %s',
358-
exists=True,
359359
desc='Set the weighting for each voxel in the base dataset; '
360360
'larger weights mean that voxel count more in the cost function. '
361-
'Must be defined on the same grid as the base dataset')
361+
'If an image file is given, the volume must be defined on the '
362+
'same grid as the base dataset')
362363
out_weight_file = traits.File(
363364
argstr='-wtprefix %s',
364365
desc='Write the weight volume to disk as a dataset',

nipype/interfaces/afni/tests/test_auto_Allineate.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ def test_Allineate_inputs():
117117
),
118118
warpfreeze=dict(argstr='-warpfreeze',
119119
),
120-
weight_file=dict(argstr='-weight %s',
120+
weight=dict(argstr='-weight %s',
121121
),
122122
zclip=dict(argstr='-zclip',
123123
),

0 commit comments

Comments
 (0)