Skip to content

Commit b252ad7

Browse files
committed
Further cleanup
1 parent 007d2d7 commit b252ad7

File tree

1 file changed

+22
-37
lines changed

1 file changed

+22
-37
lines changed

nipype/interfaces/afni/preprocess.py

Lines changed: 22 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -491,11 +491,10 @@ class AutomaskInputSpec(AFNICommandInputSpec):
491491
out_file = File(name_template="%s_mask", desc='output image file name',
492492
argstr='-prefix %s', name_source="in_file")
493493

494-
brain_file = File("%s_masked",
494+
brain_file = File(name_template="%s_masked",
495495
desc="output file from 3dAutomask",
496496
argstr='-apply_prefix %s',
497-
name_source="in_file",
498-
usedefault=True)
497+
name_source="in_file")
499498

500499
clfrac = traits.Float(desc='sets the clip level fraction' +
501500
' (must be 0.1-0.9). ' +
@@ -562,11 +561,10 @@ class VolregInputSpec(AFNICommandInputSpec):
562561
md1dfile = File(desc='max displacement output file',
563562
argstr='-maxdisp1D %s',
564563
position=-4)
565-
oned_file = File('%s.1D', desc='1D movement parameters output file',
564+
oned_file = File(name_template='%s.1D', desc='1D movement parameters output file',
566565
argstr='-1Dfile %s',
567566
name_source="in_file",
568-
keep_extension=True,
569-
usedefault=True)
567+
keep_extension=True)
570568
verbose = traits.Bool(desc='more detailed description of the process',
571569
argstr='-verbose')
572570
timeshift = traits.Bool(desc='time shift to mean slice time offset',
@@ -613,8 +611,8 @@ class MergeInputSpec(AFNICommandInputSpec):
613611
argstr='%s',
614612
position=-1,
615613
mandatory=True)
616-
out_file = File("%s_merge", desc='output image file name',
617-
argstr='-prefix %s', name_source="in_file", usedefault=True)
614+
out_file = File(name_template="%s_merge", desc='output image file name',
615+
argstr='-prefix %s', name_source="in_file")
618616
doall = traits.Bool(desc='apply options to all sub-bricks in dataset',
619617
argstr='-doall')
620618
blurfwhm = traits.Int(desc='FWHM blur value (mm)',
@@ -652,8 +650,8 @@ class CopyInputSpec(AFNICommandInputSpec):
652650
position=-2,
653651
mandatory=True,
654652
exists=True)
655-
out_file = File("%s_copy", desc='output image file name',
656-
argstr='-prefix %s', name_source="in_file", usedefault=True)
653+
out_file = File(name_template="%s_copy", desc='output image file name',
654+
argstr='-prefix %s', name_source="in_file")
657655

658656

659657
class Copy(AFNICommand):
@@ -685,8 +683,8 @@ class FourierInputSpec(AFNICommandInputSpec):
685683
position=-1,
686684
mandatory=True,
687685
exists=True)
688-
out_file = File("%s_fourier", desc='output image file name',
689-
argstr='-prefix %s', name_source="in_file", usedefault=True)
686+
out_file = File(name_template="%s_fourier", desc='output image file name',
687+
argstr='-prefix %s', name_source="in_file")
690688
lowpass = traits.Float(desc='lowpass',
691689
argstr='-lowpass %f',
692690
position=0,
@@ -730,13 +728,12 @@ class BandpassInputSpec(AFNICommandInputSpec):
730728
mandatory=True,
731729
exists=True)
732730
out_file = File(
733-
'%s_bp',
731+
name_template='%s_bp',
734732
desc='output file from 3dBandpass',
735733
argstr='-prefix %s',
736734
position=1,
737735
name_source='in_file',
738-
genfile=True,
739-
usedefault=True)
736+
genfile=True)
740737
lowpass = traits.Float(
741738
desc='lowpass',
742739
argstr='%f',
@@ -838,8 +835,8 @@ class ZCutUpInputSpec(AFNICommandInputSpec):
838835
position=-1,
839836
mandatory=True,
840837
exists=True)
841-
out_file = File("%s_zcupup", desc='output image file name',
842-
argstr='-prefix %s', name_source="in_file", usedefault=True)
838+
out_file = File(name_template="%s_zcupup", desc='output image file name',
839+
argstr='-prefix %s', name_source="in_file")
843840
keep = traits.Str(desc='slice range to keep in output',
844841
argstr='-keep %s')
845842

@@ -884,7 +881,6 @@ class AllineateInputSpec(AFNICommandInputSpec):
884881
position=-2,
885882
name_source='%s_allineate',
886883
genfile=True)
887-
suffix = traits.Str('_allineate', desc="out_file suffix", usedefault=True)
888884

889885
out_param_file = File(
890886
argstr='-1Dparam_save %s',
@@ -1156,8 +1152,8 @@ class SkullStripInputSpec(AFNICommandInputSpec):
11561152
position=1,
11571153
mandatory=True,
11581154
exists=True)
1159-
out_file = File("%s_skullstrip", desc='output image file name',
1160-
argstr='-prefix %s', name_source="in_file", usedefault=True)
1155+
out_file = File(name_template="%s_skullstrip", desc='output image file name',
1156+
argstr='-prefix %s', name_source="in_file")
11611157

11621158

11631159
class SkullStrip(AFNICommand):
@@ -1189,8 +1185,8 @@ class TCatInputSpec(AFNICommandInputSpec):
11891185
argstr=' %s',
11901186
position=-1,
11911187
mandatory=True)
1192-
out_file = File("%s_tcat", desc='output image file name',
1193-
argstr='-prefix %s', name_source="in_file", usedefault=True)
1188+
out_file = File(name_template="%s_tcat", desc='output image file name',
1189+
argstr='-prefix %s', name_source="in_file")
11941190
rlt = traits.Str(desc='options', argstr='-rlt%s', position=1)
11951191

11961192

@@ -1224,8 +1220,8 @@ class FimInputSpec(AFNICommandInputSpec):
12241220
position=1,
12251221
mandatory=True,
12261222
exists=True)
1227-
out_file = File("%s_fim", desc='output image file name',
1228-
argstr='-bucket %s', name_source="in_file", usedefault=True)
1223+
out_file = File(name_template="%s_fim", desc='output image file name',
1224+
argstr='-bucket %s', name_source="in_file")
12291225
ideal_file = File(desc='ideal time series file name',
12301226
argstr='-ideal_file %s',
12311227
position=2,
@@ -1275,8 +1271,8 @@ class TCorrelateInputSpec(AFNICommandInputSpec):
12751271
position=-1,
12761272
mandatory=True,
12771273
exists=True)
1278-
out_file = File("%s_tcorr", desc='output image file name',
1279-
argstr='-prefix %s', name_source="xset", usedefault=True)
1274+
out_file = File(name_template="%s_tcorr", desc='output image file name',
1275+
argstr='-prefix %s', name_source="xset")
12801276
pearson = traits.Bool(desc='Correlation is the normal' +
12811277
' Pearson correlation coefficient',
12821278
argstr='-pearson',
@@ -1465,15 +1461,6 @@ def aggregate_outputs(self, runtime=None, needed_outputs=None):
14651461
return outputs
14661462

14671463

1468-
"""
1469-
3dcalc -a ${rest}.nii.gz[${TRstart}..${TRend}] -expr 'a' -prefix $
1470-
{rest}_dr.nii.gz
1471-
1472-
3dcalc -a ${rest}_mc.nii.gz -b ${rest}_mask.nii.gz -expr 'a*b' -prefix
1473-
${rest}_ss.nii.gz
1474-
"""
1475-
1476-
14771464
class CalcInputSpec(AFNICommandInputSpec):
14781465
in_file_a = File(desc='input file to 3dcalc',
14791466
argstr='-a %s', position=0, mandatory=True, exists=True)
@@ -1489,7 +1476,6 @@ class CalcInputSpec(AFNICommandInputSpec):
14891476
requires=['start_idx'])
14901477
single_idx = traits.Int(desc='volume index for in_file_a')
14911478
other = File(desc='other options', argstr='')
1492-
suffix = traits.Str('_calc', desc="out_file suffix", usedefault=True)
14931479

14941480

14951481
class Calc(AFNICommand):
@@ -1564,7 +1550,6 @@ class BlurInMaskInputSpec(AFNICommandInputSpec):
15641550
desc='Save dataset as floats, no matter what the input data type is.',
15651551
argstr='-float')
15661552
options = traits.Str(desc='options', argstr='%s', position=2)
1567-
suffix = traits.Str('_blurmask', desc="out_file suffix", usedefault=True)
15681553

15691554

15701555
class BlurInMask(AFNICommand):

0 commit comments

Comments
 (0)