Skip to content

Commit 1b6c5c1

Browse files
committed
update doctest
1 parent 7bf99af commit 1b6c5c1

File tree

1 file changed

+32
-21
lines changed

1 file changed

+32
-21
lines changed

nipype/interfaces/fsl/epi.py

Lines changed: 32 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -586,7 +586,7 @@ class EddyInputSpec(FSLCommandInputSpec):
586586
default_value='eddy_corrected',
587587
usedefault=True,
588588
argstr='--out=%s',
589-
desc='basename for output (warped) image')
589+
desc='Basename for output image')
590590
session = File(
591591
exists=True,
592592
argstr='--session=%s',
@@ -595,37 +595,39 @@ class EddyInputSpec(FSLCommandInputSpec):
595595
exists=True,
596596
argstr='--topup=%s',
597597
requires=['in_topup_movpar'],
598-
desc='topup file containing the field coefficients')
598+
desc='Topup results file containing the field coefficients')
599599
in_topup_movpar = File(
600600
exists=True,
601601
requires=['in_topup_fieldcoef'],
602-
desc='topup movpar.txt file')
602+
desc='Topup results file containing the movement parameters')
603603
field = File(
604604
argstr='--field=%s',
605-
desc=('NonTOPUP fieldmap scaled in Hz - filename has '
606-
'to be provided without an extension. TOPUP is '
607-
'strongly recommended'))
605+
desc=('Non-topup derived fieldmap scaled in Hz'))
608606
field_mat = File(
609607
exists=True,
610608
argstr='--field_mat=%s',
611-
desc=('Matrix that specifies the relative locations of '
612-
'the field specified by --field and first volume '
613-
'in file --imain'))
609+
desc=('Matrix specifying the relative positions of '
610+
'the fieldmap, --field, and the first volume '
611+
'of the input file, --imain'))
614612

615613
flm = traits.Enum(
616-
'linear',
617614
'quadratic',
615+
'linear',
618616
'cubic',
617+
usedefault=True,
619618
argstr='--flm=%s',
620619
desc='First level EC model')
621620
slm = traits.Enum(
622621
'none',
623622
'linear',
624623
'quadratic',
624+
usedefault=True,
625625
argstr='--slm=%s',
626626
desc='Second level EC model')
627627
fep = traits.Bool(
628-
False, argstr='--fep', desc='Fill empty planes in x- or y-directions')
628+
False,
629+
argstr='--fep',
630+
desc='Fill empty planes in x- or y-directions')
629631
initrand = traits.Bool(
630632
False,
631633
argstr='--initrand',
@@ -634,6 +636,7 @@ class EddyInputSpec(FSLCommandInputSpec):
634636
interp = traits.Enum(
635637
'spline',
636638
'trilinear',
639+
usedefault=True,
637640
argstr='--interp=%s',
638641
desc='Interpolation model for estimation step')
639642
nvoxhp = traits.Int(
@@ -660,6 +663,8 @@ class EddyInputSpec(FSLCommandInputSpec):
660663
desc="Do NOT perform a post-eddy alignment of "
661664
"shells")
662665
fwhm = traits.Float(
666+
default_value=0.0,
667+
usedefault=True,
663668
desc=('FWHM for conditioning filter when estimating '
664669
'the parameters'),
665670
argstr='--fwhm=%s')
@@ -668,6 +673,7 @@ class EddyInputSpec(FSLCommandInputSpec):
668673
method = traits.Enum(
669674
'jac',
670675
'lsr',
676+
usedefault=True,
671677
argstr='--resamp=%s',
672678
desc=('Final resampling method (jacobian/least '
673679
'squares)'))
@@ -721,35 +727,36 @@ class EddyInputSpec(FSLCommandInputSpec):
721727
mporder = traits.Int(
722728
argstr='--mporder=%s',
723729
desc='Order of slice-to-vol movement model',
724-
requires=['slspec'],
725730
min_ver='5.0.11')
726731
s2v_niter = traits.Int(
727732
argstr='--s2v_niter=%s',
728733
desc='Number of iterations for slice-to-vol',
729-
requires=['slspec'],
734+
requires=['mporder'],
730735
min_ver='5.0.11')
731736
s2v_lambda = traits.Int(
732737
agstr='--s2v_lambda',
733738
desc='Regularisation weight for slice-to-vol movement (reasonable range 1-10)',
734-
requires=['slspec'],
739+
requires=['mporder'],
735740
min_ver='5.0.11')
736741
s2v_interp = traits.Enum(
737742
'trilinear',
738743
'spline',
739744
argstr='--s2v_interp=%s',
740745
desc='Slice-to-vol interpolation model for estimation step',
741-
requires=['slspec'],
746+
requires=['mporder'],
742747
min_ver='5.0.11')
743748
slspec = traits.File(
744749
exists=True,
745750
argstr='--slspec=%s',
746751
desc='Name of text file completely specifying slice/group acquisition',
752+
requires=['mporder'],
747753
xor=['json'],
748754
min_ver='5.0.11')
749755
json = traits.File(
750756
exists=True,
751757
argstr='--json=%s',
752758
desc='Name of .json text file with information about slice timing',
759+
requires=['mporder'],
753760
xor=['slspec'],
754761
min_ver='6.0.1')
755762

@@ -887,14 +894,18 @@ class Eddy(FSLCommand):
887894
>>> eddy.inputs.in_bval = 'bvals.scheme'
888895
>>> eddy.inputs.use_cuda = True
889896
>>> eddy.cmdline # doctest: +ELLIPSIS
890-
'eddy_cuda --ff=10.0 --fwhm=0 --acqp=epi_acqp.txt --bvals=bvals.scheme \
891-
--bvecs=bvecs.scheme --imain=epi.nii --index=epi_index.txt \
892-
--mask=epi_mask.nii --niter=5 --nvoxhp=1000 --out=.../eddy_corrected'
897+
'eddy_cuda --flm=quadratic --ff=10.0 --fwhm=0.0 \
898+
--acqp=epi_acqp.txt --bvals=bvals.scheme --bvecs=bvecs.scheme \
899+
--imain=epi.nii --index=epi_index.txt --mask=epi_mask.nii \
900+
--interp=spline --resamp=jac --niter=5 --nvoxhp=1000 \
901+
--out=.../eddy_corrected --slm=none'
893902
>>> eddy.inputs.use_cuda = False
894903
>>> eddy.cmdline # doctest: +ELLIPSIS
895-
'eddy_openmp --ff=10.0 --fwhm=0 --acqp=epi_acqp.txt --bvals=bvals.scheme \
896-
--bvecs=bvecs.scheme --imain=epi.nii --index=epi_index.txt \
897-
--mask=epi_mask.nii --niter=5 --nvoxhp=1000 --out=.../eddy_corrected'
904+
'eddy_openmp --flm=quadratic --ff=10.0 --fwhm=0.0 \
905+
--acqp=epi_acqp.txt --bvals=bvals.scheme --bvecs=bvecs.scheme \
906+
--imain=epi.nii --index=epi_index.txt --mask=epi_mask.nii \
907+
--interp=spline --resamp=jac --niter=5 --nvoxhp=1000 \
908+
--out=.../eddy_corrected --slm=none'
898909
>>> res = eddy.run() # doctest: +SKIP
899910
900911
"""

0 commit comments

Comments
 (0)