Skip to content

Commit 712d0a2

Browse files
author
bpinsard
committed
pep8
1 parent 2a58098 commit 712d0a2

File tree

2 files changed

+283
-253
lines changed

2 files changed

+283
-253
lines changed

nipype/interfaces/afni/preprocess.py

Lines changed: 52 additions & 53 deletions
Original file line numberDiff line numberDiff line change
@@ -284,12 +284,11 @@ class ResampleInputSpec(AFNICommandInputSpec):
284284
desc="resampling method from set {'NN', 'Li', 'Cu', 'Bk'}. These are for 'Nearest Neighbor', 'Linear', 'Cubic' and 'Blocky' interpolation, respectively. Default is NN.")
285285

286286
voxel_size = traits.Tuple(*[traits.Float()]*3,
287-
argstr='-dxyz %f %f %f',
288-
desc="resample to new dx, dy and dz")
287+
argstr='-dxyz %f %f %f',
288+
desc="resample to new dx, dy and dz")
289289

290290
master = traits.File(argstr='-master %s',
291291
desc='align dataset grid to a reference file')
292-
293292

294293

295294
class Resample(AFNICommand):
@@ -339,7 +338,7 @@ class AutoTcorrelate(AFNICommand):
339338
"""Computes the correlation coefficient between the time series of each
340339
pair of voxels in the input dataset, and stores the output into a
341340
new anatomical bucket dataset [scaled to shorts to save memory space].
342-
341+
343342
Examples
344343
========
345344
@@ -485,15 +484,15 @@ class AutomaskInputSpec(AFNICommandInputSpec):
485484
usedefault=True)
486485

487486
clfrac = traits.Float(desc='sets the clip level fraction' +
488-
' (must be 0.1-0.9). ' +
489-
'A small value will tend to make the mask larger [default = 0.5].',
490-
argstr="-dilate %s")
487+
' (must be 0.1-0.9). ' +
488+
'A small value will tend to make the mask larger [default = 0.5].',
489+
argstr="-dilate %s")
491490

492491
dilate = traits.Int(desc='dilate the mask outwards',
493-
argstr="-dilate %s")
492+
argstr="-dilate %s")
494493

495494
erode = traits.Int(desc='erode the mask inwards',
496-
argstr="-erode %s")
495+
argstr="-erode %s")
497496

498497
mask_suffix = traits.Str(
499498
desc="out_file suffix", depracated=0.8, new_name="out_file")
@@ -506,10 +505,10 @@ class AutomaskInputSpec(AFNICommandInputSpec):
506505

507506
class AutomaskOutputSpec(TraitedSpec):
508507
out_file = File(desc='mask file',
509-
exists=True)
508+
exists=True)
510509

511510
brain_file = File(desc='brain file (skull stripped)',
512-
exists=True)
511+
exists=True)
513512

514513

515514
class Automask(AFNICommand):
@@ -565,7 +564,7 @@ def _gen_filename(self, name):
565564
_, base, _ = split_filename(
566565
getattr(self.inputs, trait_spec.name_source))
567566
return self._gen_fname(basename=base, prefix=prefix, suffix=suffix, cwd=os.getcwd())
568-
elif hasattr(self.inputs,name) and isdefined(getattr(self.inputs,name)):
567+
elif hasattr(self.inputs, name) and isdefined(getattr(self.inputs, name)):
569568
return super(Automask, self)._gen_filename(name)
570569
return Undefined
571570

@@ -580,35 +579,35 @@ def _list_outputs(self):
580579
class VolregInputSpec(AFNICommandInputSpec):
581580

582581
in_file = File(desc='input file to 3dvolreg',
583-
argstr='%s',
584-
position=-1,
585-
mandatory=True,
586-
exists=True)
582+
argstr='%s',
583+
position=-1,
584+
mandatory=True,
585+
exists=True)
587586
out_file = File("%s_volreg", desc='output image file name',
588-
argstr='-prefix %s', name_source="in_file", usedefault=True)
587+
argstr='-prefix %s', name_source="in_file", usedefault=True)
589588

590589
basefile = File(desc='base file for registration',
591-
argstr='-base %s',
592-
position=-6,
593-
exists=True)
590+
argstr='-base %s',
591+
position=-6,
592+
exists=True)
594593
zpad = traits.Int(desc='Zeropad around the edges' +
595-
' by \'n\' voxels during rotations',
596-
argstr='-zpad %d',
597-
position=-5)
594+
' by \'n\' voxels during rotations',
595+
argstr='-zpad %d',
596+
position=-5)
598597
md1dfile = File(desc='max displacement output file',
599-
argstr='-maxdisp1D %s',
600-
position=-4)
598+
argstr='-maxdisp1D %s',
599+
position=-4)
601600
oned_file = File('%s.1D', desc='1D movement parameters output file',
602-
argstr='-1Dfile %s',
603-
name_source="in_file",
604-
keep_extension=True,
605-
usedefault=True)
601+
argstr='-1Dfile %s',
602+
name_source="in_file",
603+
keep_extension=True,
604+
usedefault=True)
606605
verbose = traits.Bool(desc='more detailed description of the process',
607-
argstr='-verbose')
606+
argstr='-verbose')
608607
timeshift = traits.Bool(desc='time shift to mean slice time offset',
609-
argstr='-tshift 0')
608+
argstr='-tshift 0')
610609
copyorigin = traits.Bool(desc='copy base file origin coords to output',
611-
argstr='-twodup')
610+
argstr='-twodup')
612611

613612

614613
class VolregOutputSpec(TraitedSpec):
@@ -650,12 +649,12 @@ class MergeInputSpec(AFNICommandInputSpec):
650649
position=-1,
651650
mandatory=True)
652651
out_file = File("%s_merge", desc='output image file name',
653-
argstr='-prefix %s', name_source="in_file", usedefault=True)
652+
argstr='-prefix %s', name_source="in_file", usedefault=True)
654653
doall = traits.Bool(desc='apply options to all sub-bricks in dataset',
655-
argstr='-doall')
654+
argstr='-doall')
656655
blurfwhm = traits.Int(desc='FWHM blur value (mm)',
657-
argstr='-1blur_fwhm %d',
658-
units='mm')
656+
argstr='-1blur_fwhm %d',
657+
units='mm')
659658

660659

661660
class Merge(AFNICommand):
@@ -684,12 +683,12 @@ class Merge(AFNICommand):
684683

685684
class CopyInputSpec(AFNICommandInputSpec):
686685
in_file = File(desc='input file to 3dcopy',
687-
argstr='%s',
688-
position=-2,
689-
mandatory=True,
690-
exists=True)
686+
argstr='%s',
687+
position=-2,
688+
mandatory=True,
689+
exists=True)
691690
out_file = File("%s_copy", desc='output image file name',
692-
argstr='-prefix %s', name_source="in_file", usedefault=True)
691+
argstr='-prefix %s', name_source="in_file", usedefault=True)
693692

694693

695694
class Copy(AFNICommand):
@@ -717,20 +716,20 @@ class Copy(AFNICommand):
717716

718717
class FourierInputSpec(AFNICommandInputSpec):
719718
in_file = File(desc='input file to 3dFourier',
720-
argstr='%s',
721-
position=-1,
722-
mandatory=True,
723-
exists=True)
719+
argstr='%s',
720+
position=-1,
721+
mandatory=True,
722+
exists=True)
724723
out_file = File("%s_fourier", desc='output image file name',
725-
argstr='-prefix %s', name_source="in_file", usedefault=True)
724+
argstr='-prefix %s', name_source="in_file", usedefault=True)
726725
lowpass = traits.Float(desc='lowpass',
727-
argstr='-lowpass %f',
728-
position=0,
729-
mandatory=True)
726+
argstr='-lowpass %f',
727+
position=0,
728+
mandatory=True)
730729
highpass = traits.Float(desc='highpass',
731-
argstr='-highpass %f',
732-
position=1,
733-
mandatory=True)
730+
argstr='-highpass %f',
731+
position=1,
732+
mandatory=True)
734733

735734

736735
class Fourier(AFNICommand):
@@ -760,7 +759,7 @@ class Fourier(AFNICommand):
760759

761760
class ZCutUpInputSpec(AFNICommandInputSpec):
762761
in_file = File(desc='input file to 3dZcutup',
763-
argstr='%s',
762+
argstr='%s',
764763
position=-1,
765764
mandatory=True,
766765
exists=True)

0 commit comments

Comments
 (0)