Skip to content

Commit b7ea933

Browse files
committed
Fixes to 3dTProject args
1 parent 9d96f4e commit b7ea933

File tree

2 files changed

+13
-15
lines changed

2 files changed

+13
-15
lines changed

nipype/interfaces/afni/preprocess.py

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2425,7 +2425,8 @@ class TProjectInputSpec(AFNICommandInputSpec):
24252425
* This is a file of 1s and 0s, indicating which
24262426
time points are to be included (1) and which are
24272427
to be excluded (0).""",
2428-
argstr="-censor %s")
2428+
argstr="-censor %s",
2429+
exists=True)
24292430
censortr = traits.List(
24302431
traits.Str(),
24312432
desc="""list of strings that specify time indexes
@@ -2489,7 +2490,7 @@ class TProjectInputSpec(AFNICommandInputSpec):
24892490
ort = File(
24902491
desc="""Remove each column in file
24912492
++ Each column will have its mean removed.""",
2492-
exist=True,
2493+
exists=True,
24932494
argstr="-ort %s")
24942495
polort = traits.Int(
24952496
desc="""Remove polynomials up to and including degree pp.
@@ -2505,15 +2506,15 @@ class TProjectInputSpec(AFNICommandInputSpec):
25052506
bandpass = traits.Tuple(
25062507
traits.Float, traits.Float,
25072508
desc="""Remove all frequencies EXCEPT those in the range""",
2508-
argstr='-bandpass %f %f')
2509+
argstr='-bandpass %g %g')
25092510
stopband = traits.Tuple(
25102511
traits.Float, traits.Float,
25112512
desc="""Remove all frequencies in the range""",
2512-
argstr='-stopband %f %f')
2513+
argstr='-stopband %g %g')
25132514
TR = traits.Float(
25142515
desc="""Use time step dd for the frequency calculations,
25152516
rather than the value stored in the dataset header.""",
2516-
argstr='-TR %f')
2517+
argstr='-TR %g')
25172518
mask = File(
25182519
exist=True,
25192520
desc="""Only operate on voxels nonzero in the mset dataset.
@@ -2530,7 +2531,7 @@ class TProjectInputSpec(AFNICommandInputSpec):
25302531
width (FWHM) of fff millimeters.
25312532
++ Spatial blurring (if done) is after the time
25322533
series filtering.""",
2533-
argstr='-blur %f')
2534+
argstr='-blur %g')
25342535
norm = traits.Bool(
25352536
desc="""Normalize each output time series to have sum of
25362537
squares = 1. This is the LAST operation.""",
@@ -2562,7 +2563,7 @@ class TProject(AFNICommand):
25622563
>>> tproject.inputs.automask = True
25632564
>>> tproject.inputs.out_file = 'projected.nii.gz'
25642565
>>> tproject.cmdline
2565-
'3dTproject -input functional.nii -automask -bandpass 0.006670 99999.000000 -polort 3 -prefix projected.nii.gz'
2566+
'3dTproject -input functional.nii -automask -bandpass 0.00667 99999 -polort 3 -prefix projected.nii.gz'
25662567
>>> res = tproject.run() # doctest: +SKIP
25672568
25682569
"""

nipype/interfaces/afni/tests/test_auto_TProject.py

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -5,14 +5,14 @@
55

66
def test_TProject_inputs():
77
input_map = dict(
8-
TR=dict(argstr='-TR %f', ),
8+
TR=dict(argstr='-TR %g', ),
99
args=dict(argstr='%s', ),
1010
automask=dict(
1111
argstr='-automask',
1212
xor=['mask'],
1313
),
14-
bandpass=dict(argstr='-bandpass %f %f', ),
15-
blur=dict(argstr='-blur %f', ),
14+
bandpass=dict(argstr='-bandpass %g %g', ),
15+
blur=dict(argstr='-blur %g', ),
1616
cenmode=dict(argstr='-cenmode %s', ),
1717
censor=dict(argstr='-censor %s', ),
1818
censortr=dict(argstr='-CENSORTR %s', ),
@@ -42,10 +42,7 @@ def test_TProject_inputs():
4242
nohash=True,
4343
usedefault=True,
4444
),
45-
ort=dict(
46-
argstr='-ort %s',
47-
exist=True,
48-
),
45+
ort=dict(argstr='-ort %s', ),
4946
out_file=dict(
5047
argstr='-prefix %s',
5148
name_source='in_file',
@@ -54,7 +51,7 @@ def test_TProject_inputs():
5451
),
5552
outputtype=dict(),
5653
polort=dict(argstr='-polort %d', ),
57-
stopband=dict(argstr='-stopband %f %f', ),
54+
stopband=dict(argstr='-stopband %g %g', ),
5855
terminal_output=dict(
5956
deprecated='1.0.0',
6057
nohash=True,

0 commit comments

Comments
 (0)