Skip to content

Commit c4fc02f

Browse files
committed
Merge pull request #733 from sgiavasis/master
Added 'in_file_c' to the CalcInputSpec of afni/preprocess for secondary operand files.
2 parents 4d4244f + ba79cb3 commit c4fc02f

File tree

2 files changed

+16
-11
lines changed

2 files changed

+16
-11
lines changed

nipype/interfaces/afni/preprocess.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1468,9 +1468,11 @@ class CalcInputSpec(AFNICommandInputSpec):
14681468
argstr='-a %s', position=0, mandatory=True, exists=True)
14691469
in_file_b = File(desc='operand file to 3dcalc',
14701470
argstr=' -b %s', position=1, exists=True)
1471+
in_file_c = File(desc='operand file to 3dcalc',
1472+
argstr=' -c %s', position=2, exists=True)
14711473
out_file = File(name_template="%s_calc", desc='output image file name',
14721474
argstr='-prefix %s', name_source="in_file_a")
1473-
expr = traits.Str(desc='expr', argstr='-expr "%s"', position=2,
1475+
expr = traits.Str(desc='expr', argstr='-expr "%s"', position=3,
14741476
mandatory=True)
14751477
start_idx = traits.Int(desc='start index for in_file_a',
14761478
requires=['stop_idx'])

nipype/interfaces/afni/tests/test_auto_Calc.py

Lines changed: 13 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -11,31 +11,34 @@ def test_Calc_inputs():
1111
name_template='%s_calc',
1212
argstr='-prefix %s',
1313
),
14-
expr=dict(position=2,
14+
in_file_a=dict(position=0,
15+
mandatory=True,
16+
argstr='-a %s',
17+
),
18+
expr=dict(position=3,
1519
mandatory=True,
1620
argstr='-expr "%s"',
1721
),
1822
args=dict(argstr='%s',
1923
),
2024
outputtype=dict(),
25+
start_idx=dict(requires=['stop_idx'],
26+
),
2127
in_file_b=dict(position=1,
2228
argstr=' -b %s',
2329
),
24-
other=dict(argstr='',
30+
in_file_c=dict(position=2,
31+
argstr=' -c %s',
2532
),
26-
in_file_a=dict(position=0,
27-
mandatory=True,
28-
argstr='-a %s',
33+
terminal_output=dict(mandatory=True,
34+
nohash=True,
2935
),
3036
environ=dict(nohash=True,
3137
usedefault=True,
3238
),
33-
single_idx=dict(),
34-
start_idx=dict(requires=['stop_idx'],
35-
),
36-
terminal_output=dict(mandatory=True,
37-
nohash=True,
39+
other=dict(argstr='',
3840
),
41+
single_idx=dict(),
3942
)
4043
inputs = Calc.input_spec()
4144

0 commit comments

Comments
 (0)