Skip to content

Commit ae7ab07

Browse files
josephmjeeffigies
authored andcommitted
update doctest
1 parent 8c30489 commit ae7ab07

File tree

1 file changed

+40
-37
lines changed

1 file changed

+40
-37
lines changed

nipype/interfaces/fsl/epi.py

Lines changed: 40 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -587,7 +587,7 @@ class EddyInputSpec(FSLCommandInputSpec):
587587
default_value="eddy_corrected",
588588
usedefault=True,
589589
argstr="--out=%s",
590-
desc="basename for output (warped) image",
590+
desc="Basename for output image",
591591
)
592592
session = File(
593593
exists=True,
@@ -598,45 +598,39 @@ class EddyInputSpec(FSLCommandInputSpec):
598598
exists=True,
599599
argstr="--topup=%s",
600600
requires=["in_topup_movpar"],
601-
desc="topup file containing the field coefficients",
601+
desc="Topup results file containing the field coefficients",
602602
)
603603
in_topup_movpar = File(
604-
exists=True, requires=["in_topup_fieldcoef"], desc="topup movpar.txt file"
605-
)
606-
field = File(
607-
argstr="--field=%s",
608-
desc=(
609-
"NonTOPUP fieldmap scaled in Hz - filename has "
610-
"to be provided without an extension. TOPUP is "
611-
"strongly recommended"
612-
),
613-
)
614-
field_mat = File(
615-
exists=True, requires=["in_topup_fieldcoef"], desc="topup movpar.txt file"
616-
)
617-
field = File(
618-
argstr="--field=%s",
619-
desc=(
620-
"NonTOPUP fieldmap scaled in Hz - filename has "
621-
"to be provided without an extension. TOPUP is "
622-
"strongly recommended"
623-
),
604+
exists=True,
605+
requires=["in_topup_fieldcoef"],
606+
desc="Topup results file containing the movement parameters",
624607
)
608+
field = File(argstr="--field=%s", desc=("Non-topup derived fieldmap scaled in Hz"))
625609
field_mat = File(
626610
exists=True,
627611
argstr="--field_mat=%s",
628612
desc=(
629-
"Matrix that specifies the relative locations of "
630-
"the field specified by --field and first volume "
631-
"in file --imain"
613+
"Matrix specifying the relative positions of "
614+
"the fieldmap, --field, and the first volume "
615+
"of the input file, --imain"
632616
),
633617
)
634618

635619
flm = traits.Enum(
636-
"linear", "quadratic", "cubic", argstr="--flm=%s", desc="First level EC model"
620+
"quadratic",
621+
"linear",
622+
"cubic",
623+
usedefault=True,
624+
argstr="--flm=%s",
625+
desc="First level EC model",
637626
)
638627
slm = traits.Enum(
639-
"none", "linear", "quadratic", argstr="--slm=%s", desc="Second level EC model"
628+
"none",
629+
"linear",
630+
"quadratic",
631+
usedefault=True,
632+
argstr="--slm=%s",
633+
desc="Second level EC model",
640634
)
641635
fep = traits.Bool(
642636
False, argstr="--fep", desc="Fill empty planes in x- or y-directions"
@@ -650,6 +644,7 @@ class EddyInputSpec(FSLCommandInputSpec):
650644
interp = traits.Enum(
651645
"spline",
652646
"trilinear",
647+
usedefault=True,
653648
argstr="--interp=%s",
654649
desc="Interpolation model for estimation step",
655650
)
@@ -676,6 +671,8 @@ class EddyInputSpec(FSLCommandInputSpec):
676671
desc="Do NOT perform a post-eddy alignment of " "shells",
677672
)
678673
fwhm = traits.Float(
674+
default_value=0.0,
675+
usedefault=True,
679676
desc=("FWHM for conditioning filter when estimating " "the parameters"),
680677
argstr="--fwhm=%s",
681678
)
@@ -685,6 +682,7 @@ class EddyInputSpec(FSLCommandInputSpec):
685682
method = traits.Enum(
686683
"jac",
687684
"lsr",
685+
usedefault=True,
688686
argstr="--resamp=%s",
689687
desc=("Final resampling method (jacobian/least " "squares)"),
690688
)
@@ -743,40 +741,41 @@ class EddyInputSpec(FSLCommandInputSpec):
743741
mporder = traits.Int(
744742
argstr="--mporder=%s",
745743
desc="Order of slice-to-vol movement model",
746-
requires=["slspec"],
747744
min_ver="5.0.11",
748745
)
749746
s2v_niter = traits.Int(
750747
argstr="--s2v_niter=%s",
751748
desc="Number of iterations for slice-to-vol",
752-
requires=["slspec"],
749+
requires=["mporder"],
753750
min_ver="5.0.11",
754751
)
755752
s2v_lambda = traits.Int(
756753
agstr="--s2v_lambda",
757754
desc="Regularisation weight for slice-to-vol movement (reasonable range 1-10)",
758-
requires=["slspec"],
755+
requires=["mporder"],
759756
min_ver="5.0.11",
760757
)
761758
s2v_interp = traits.Enum(
762759
"trilinear",
763760
"spline",
764761
argstr="--s2v_interp=%s",
765762
desc="Slice-to-vol interpolation model for estimation step",
766-
requires=["slspec"],
763+
requires=["mporder"],
767764
min_ver="5.0.11",
768765
)
769766
slspec = traits.File(
770767
exists=True,
771768
argstr="--slspec=%s",
772769
desc="Name of text file completely specifying slice/group acquisition",
770+
requires=["mporder"],
773771
xor=["json"],
774772
min_ver="5.0.11",
775773
)
776774
json = traits.File(
777775
exists=True,
778776
argstr="--json=%s",
779777
desc="Name of .json text file with information about slice timing",
778+
requires=["mporder"],
780779
xor=["slspec"],
781780
min_ver="6.0.1",
782781
)
@@ -955,14 +954,18 @@ class Eddy(FSLCommand):
955954
Running eddy on an Nvidia GPU using cuda:
956955
>>> eddy.inputs.use_cuda = True
957956
>>> eddy.cmdline # doctest: +ELLIPSIS
958-
'eddy_cuda --ff=10.0 --fwhm=0 --acqp=epi_acqp.txt --bvals=bvals.scheme \
959-
--bvecs=bvecs.scheme --imain=epi.nii --index=epi_index.txt \
960-
--mask=epi_mask.nii --niter=5 --nvoxhp=1000 --out=.../eddy_corrected'
957+
'eddy_cuda --flm=quadratic --ff=10.0 --fwhm=0.0 \
958+
--acqp=epi_acqp.txt --bvals=bvals.scheme --bvecs=bvecs.scheme \
959+
--imain=epi.nii --index=epi_index.txt --mask=epi_mask.nii \
960+
--interp=spline --resamp=jac --niter=5 --nvoxhp=1000 \
961+
--out=.../eddy_corrected --slm=none'
961962
>>> eddy.inputs.use_cuda = False
962963
>>> eddy.cmdline # doctest: +ELLIPSIS
963-
'eddy_openmp --ff=10.0 --fwhm=0 --acqp=epi_acqp.txt --bvals=bvals.scheme \
964-
--bvecs=bvecs.scheme --imain=epi.nii --index=epi_index.txt \
965-
--mask=epi_mask.nii --niter=5 --nvoxhp=1000 --out=.../eddy_corrected'
964+
'eddy_openmp --flm=quadratic --ff=10.0 --fwhm=0.0 \
965+
--acqp=epi_acqp.txt --bvals=bvals.scheme --bvecs=bvecs.scheme \
966+
--imain=epi.nii --index=epi_index.txt --mask=epi_mask.nii \
967+
--interp=spline --resamp=jac --niter=5 --nvoxhp=1000 \
968+
--out=.../eddy_corrected --slm=none'
966969
>>> res = eddy.run() # doctest: +SKIP
967970
"""
968971

0 commit comments

Comments
 (0)