@@ -587,7 +587,7 @@ class EddyInputSpec(FSLCommandInputSpec):
587
587
default_value = "eddy_corrected" ,
588
588
usedefault = True ,
589
589
argstr = "--out=%s" ,
590
- desc = "Basename for output image" ,
590
+ desc = "basename for output (warped) image" ,
591
591
)
592
592
session = File (
593
593
exists = True ,
@@ -598,41 +598,34 @@ class EddyInputSpec(FSLCommandInputSpec):
598
598
exists = True ,
599
599
argstr = "--topup=%s" ,
600
600
requires = ["in_topup_movpar" ],
601
- desc = "Topup results file containing the field coefficients" ,
601
+ desc = "topup file containing the field coefficients" ,
602
602
)
603
603
in_topup_movpar = File (
604
- exists = True ,
605
- requires = ["in_topup_fieldcoef" ],
606
- desc = "Topup results file containing the movement parameters (movpar.txt)" ,
604
+ exists = True , requires = ["in_topup_fieldcoef" ], desc = "topup movpar.txt file"
607
605
)
608
606
field = File (
609
- exists = True ,
610
607
argstr = "--field=%s" ,
611
- desc = "Non-topup derived fieldmap scaled in Hz" ,
608
+ desc = (
609
+ "NonTOPUP fieldmap scaled in Hz - filename has "
610
+ "to be provided without an extension. TOPUP is "
611
+ "strongly recommended"
612
+ ),
612
613
)
613
614
field_mat = File (
614
615
exists = True ,
615
616
argstr = "--field_mat=%s" ,
616
- desc = "Matrix specifying the relative positions of "
617
- "the fieldmap, --field, and the first volume "
618
- "of the input file, --imain" ,
617
+ desc = (
618
+ "Matrix that specifies the relative locations of "
619
+ "the field specified by --field and first volume "
620
+ "in file --imain"
621
+ ),
619
622
)
620
623
621
624
flm = traits .Enum (
622
- "quadratic" ,
623
- "linear" ,
624
- "cubic" ,
625
- usedefault = True ,
626
- argstr = "--flm=%s" ,
627
- desc = "First level EC model" ,
625
+ "linear" , "quadratic" , "cubic" , argstr = "--flm=%s" , desc = "First level EC model"
628
626
)
629
627
slm = traits .Enum (
630
- "none" ,
631
- "linear" ,
632
- "quadratic" ,
633
- usedefault = True ,
634
- argstr = "--slm=%s" ,
635
- desc = "Second level EC model" ,
628
+ "none" , "linear" , "quadratic" , argstr = "--slm=%s" , desc = "Second level EC model"
636
629
)
637
630
fep = traits .Bool (
638
631
False , argstr = "--fep" , desc = "Fill empty planes in x- or y-directions"
@@ -646,34 +639,33 @@ class EddyInputSpec(FSLCommandInputSpec):
646
639
interp = traits .Enum (
647
640
"spline" ,
648
641
"trilinear" ,
649
- usedefault = True ,
650
642
argstr = "--interp=%s" ,
651
643
desc = "Interpolation model for estimation step" ,
652
644
)
653
645
nvoxhp = traits .Int (
654
646
default_value = 1000 ,
655
647
usedefault = True ,
656
648
argstr = "--nvoxhp=%s" ,
657
- desc = "# of voxels used to estimate the hyperparameters" ,
649
+ desc = ( "# of voxels used to estimate the " " hyperparameters") ,
658
650
)
659
651
fudge_factor = traits .Float (
660
652
default_value = 10.0 ,
661
653
usedefault = True ,
662
654
argstr = "--ff=%s" ,
663
- desc = "Fudge factor for hyperparameter error variance" ,
655
+ desc = ( "Fudge factor for hyperparameter " " error variance") ,
664
656
)
665
657
dont_sep_offs_move = traits .Bool (
666
658
False ,
667
659
argstr = "--dont_sep_offs_move" ,
668
- desc = "Do NOT attempt to separate field offset from subject movement" ,
660
+ desc = ( "Do NOT attempt to separate " " field offset from subject " " movement") ,
669
661
)
670
662
dont_peas = traits .Bool (
671
663
False ,
672
664
argstr = "--dont_peas" ,
673
- desc = "Do NOT perform a post-eddy alignment of shells" ,
665
+ desc = "Do NOT perform a post-eddy alignment of " " shells" ,
674
666
)
675
667
fwhm = traits .Float (
676
- desc = "FWHM for conditioning filter when estimating the parameters" ,
668
+ desc = ( "FWHM for conditioning filter when estimating " " the parameters") ,
677
669
argstr = "--fwhm=%s" ,
678
670
)
679
671
niter = traits .Int (
@@ -682,9 +674,8 @@ class EddyInputSpec(FSLCommandInputSpec):
682
674
method = traits .Enum (
683
675
"jac" ,
684
676
"lsr" ,
685
- usedefault = True ,
686
677
argstr = "--resamp=%s" ,
687
- desc = "Final resampling method (jacobian/least squares)" ,
678
+ desc = ( "Final resampling method (jacobian/least " " squares)") ,
688
679
)
689
680
690
681
repol = traits .Bool (
@@ -725,59 +716,57 @@ class EddyInputSpec(FSLCommandInputSpec):
725
716
requires = ["repol" ],
726
717
min_ver = "5.0.10" ,
727
718
)
728
- multiband_factor = traits .Int (
729
- argstr = "--mb=%s" , desc = "Multi-band factor" , min_ver = "5.0.10"
730
- )
731
- multiband_offset = traits .Enum (
719
+ mb = traits .Int (argstr = "--mb=%s" , desc = "Multi-band factor" , min_ver = "5.0.10" )
720
+ mb_offs = traits .Enum (
732
721
0 ,
733
722
1 ,
734
723
- 1 ,
735
- argstr = "--mb_offs=%d" ,
736
- desc = "Multi-band offset (-1 if bottom slice removed, 1 if top slice removed" ,
737
- requires = ["multiband_factor" ],
724
+ argstr = "--mb_offs=%s" ,
725
+ desc = (
726
+ "Multi-band offset (-1 if bottom slice removed, 1 if " "top slice removed"
727
+ ),
728
+ requires = ["mb" ],
738
729
min_ver = "5.0.10" ,
739
730
)
740
731
741
732
mporder = traits .Int (
742
733
argstr = "--mporder=%s" ,
743
734
desc = "Order of slice-to-vol movement model" ,
744
- requires = ["use_cuda " ],
735
+ requires = ["slspec " ],
745
736
min_ver = "5.0.11" ,
746
737
)
747
- slice2vol_niter = traits .Int (
748
- argstr = "--s2v_niter=%d " ,
738
+ s2v_niter = traits .Int (
739
+ argstr = "--s2v_niter=%s " ,
749
740
desc = "Number of iterations for slice-to-vol" ,
750
- requires = ["mporder " ],
741
+ requires = ["slspec " ],
751
742
min_ver = "5.0.11" ,
752
743
)
753
- slice2vol_lambda = traits .Int (
754
- argstr = "--s2v_lambda=%d " ,
744
+ s2v_lambda = traits .Int (
745
+ agstr = "--s2v_lambda" ,
755
746
desc = "Regularisation weight for slice-to-vol movement (reasonable range 1-10)" ,
756
- requires = ["mporder " ],
747
+ requires = ["slspec " ],
757
748
min_ver = "5.0.11" ,
758
749
)
759
- slice2vol_interp = traits .Enum (
750
+ s2v_interp = traits .Enum (
760
751
"trilinear" ,
761
752
"spline" ,
762
753
argstr = "--s2v_interp=%s" ,
763
754
desc = "Slice-to-vol interpolation model for estimation step" ,
764
- requires = ["mporder " ],
755
+ requires = ["slspec " ],
765
756
min_ver = "5.0.11" ,
766
757
)
767
- slice_order = traits .File (
758
+ slspec = traits .File (
768
759
exists = True ,
769
760
argstr = "--slspec=%s" ,
770
761
desc = "Name of text file completely specifying slice/group acquisition" ,
771
- requires = ["mporder" ],
772
762
xor = ["json" ],
773
763
min_ver = "5.0.11" ,
774
764
)
775
765
json = traits .File (
776
766
exists = True ,
777
767
argstr = "--json=%s" ,
778
768
desc = "Name of .json text file with information about slice timing" ,
779
- requires = ["mporder" ],
780
- xor = ["slice_order" ],
769
+ xor = ["slspec" ],
781
770
min_ver = "6.0.1" ,
782
771
)
783
772
@@ -812,9 +801,11 @@ class EddyInputSpec(FSLCommandInputSpec):
812
801
is_shelled = traits .Bool (
813
802
False ,
814
803
argstr = "--data_is_shelled" ,
815
- desc = "Override internal check to ensure that "
816
- "date are acquired on a set of b-value "
817
- "shells" ,
804
+ desc = (
805
+ "Override internal check to ensure that "
806
+ "date are acquired on a set of b-value "
807
+ "shells"
808
+ ),
818
809
)
819
810
820
811
use_cuda = traits .Bool (False , desc = "Run eddy using cuda gpu" )
@@ -832,8 +823,9 @@ class EddyOutputSpec(TraitedSpec):
832
823
)
833
824
out_parameter = File (
834
825
exists = True ,
835
- desc = "Text file with parameters defining the field and"
836
- "movement for each scan" ,
826
+ desc = (
827
+ "Text file with parameters defining the field and" "movement for each scan"
828
+ ),
837
829
)
838
830
out_rotated_bvecs = File (
839
831
exists = True , desc = "File containing rotated b-values for all volumes"
@@ -848,56 +840,74 @@ class EddyOutputSpec(TraitedSpec):
848
840
)
849
841
out_shell_alignment_parameters = File (
850
842
exists = True ,
851
- desc = "Text file containing rigid body movement parameters "
852
- "between the different shells as estimated by a "
853
- "post-hoc mutual information based registration" ,
843
+ desc = (
844
+ "Text file containing rigid body movement parameters "
845
+ "between the different shells as estimated by a "
846
+ "post-hoc mutual information based registration"
847
+ ),
854
848
)
855
849
out_shell_pe_translation_parameters = File (
856
850
exists = True ,
857
- desc = "Text file containing translation along the PE-direction "
858
- "between the different shells as estimated by a "
859
- "post-hoc mutual information based registration" ,
851
+ desc = (
852
+ "Text file containing translation along the PE-direction "
853
+ "between the different shells as estimated by a "
854
+ "post-hoc mutual information based registration"
855
+ ),
860
856
)
861
857
out_shell_pe_translation_parameters = File (
862
858
exists = True ,
863
- desc = "Text file containing translation along the PE-direction "
864
- "between the different shells as estimated by a "
865
- "post-hoc mutual information based registration" ,
859
+ desc = (
860
+ "Text file containing translation along the PE-direction "
861
+ "between the different shells as estimated by a "
862
+ "post-hoc mutual information based registration"
863
+ ),
866
864
)
867
865
out_outlier_map = File (
868
866
exists = True ,
869
- desc = "Matrix where rows represent volumes and columns represent "
870
- 'slices. "0" indicates that scan-slice is not an outlier '
871
- 'and "1" indicates that it is' ,
867
+ desc = (
868
+ "Matrix where rows represent volumes and columns represent "
869
+ 'slices. "0" indicates that scan-slice is not an outlier '
870
+ 'and "1" indicates that it is'
871
+ ),
872
872
)
873
873
out_outlier_n_stdev_map = File (
874
874
exists = True ,
875
- desc = "Matrix where rows represent volumes and columns represent "
876
- "slices. Values indicate number of standard deviations off the "
877
- "mean difference between observation and prediction is" ,
875
+ desc = (
876
+ "Matrix where rows represent volumes and columns represent "
877
+ "slices. Values indicate number of standard deviations off the "
878
+ "mean difference between observation and prediction is"
879
+ ),
878
880
)
879
881
out_outlier_n_sqr_stdev_map = File (
880
882
exists = True ,
881
- desc = "Matrix where rows represent volumes and columns represent "
882
- "slices. Values indicate number of standard deivations off the "
883
- "square root of the mean squared difference between observation "
884
- "and prediction is" ,
883
+ desc = (
884
+ "Matrix where rows represent volumes and columns represent "
885
+ "slices. Values indicate number of standard deivations off the "
886
+ "square root of the mean squared difference between observation "
887
+ "and prediction is"
888
+ ),
885
889
)
886
890
out_outlier_report = File (
887
891
exists = True ,
888
- desc = "Text file with a plain language report on what "
889
- "outlier slices eddy has found" ,
892
+ desc = (
893
+ "Text file with a plain language report on what "
894
+ "outlier slices eddy has found"
895
+ ),
890
896
)
891
897
out_outlier_free = File (
892
898
exists = True ,
893
- desc = "4D image file not corrected for susceptibility or eddy-"
894
- "current distortions or subject movement but with outlier "
895
- "slices replaced" ,
899
+ desc = (
900
+ "4D image file not corrected for susceptibility or eddy-"
901
+ "current distortions or subject movement but with outlier "
902
+ "slices replaced"
903
+ ),
896
904
)
897
905
out_movement_over_time = File (
898
906
exists = True ,
899
- desc = "Text file containing translations (mm) and rotations "
900
- "(radians) for each excitation" ,
907
+ desc = (
908
+ "Text file containing translations (mm) and rotations "
909
+ "(radians) for each excitation"
910
+ ),
901
911
)
902
912
out_cnr_maps = File (exists = True , desc = "path/name of file with the cnr_maps" )
903
913
out_residuals = File (exists = True , desc = "path/name of file with the residuals" )
@@ -934,27 +944,15 @@ class Eddy(FSLCommand):
934
944
Running eddy on an Nvidia GPU using cuda:
935
945
>>> eddy.inputs.use_cuda = True
936
946
>>> eddy.cmdline # doctest: +ELLIPSIS
937
- 'eddy_cuda --flm=quadratic --ff=10.0 \
938
- --acqp=epi_acqp.txt --bvals=bvals.scheme --bvecs=bvecs.scheme \
939
- --imain=epi.nii --index=epi_index.txt --mask=epi_mask.nii \
940
- --interp=spline --resamp=jac --niter=5 --nvoxhp=1000 \
941
- --out=.../eddy_corrected --slm=none'
942
-
943
- Running eddy with slice-to-volume motion correction:
944
- >>> eddy.inputs.mporder = 6
945
- >>> eddy.inputs.slice2vol_niter = 5
946
- >>> eddy.inputs.slice2vol_lambda = 1
947
- >>> eddy.inputs.slice2vol_interp = 'trilinear'
948
- >>> eddy.inputs.slice_order = 'epi_slspec.txt'
949
- >>> eddy.cmdline # doctest: +ELLIPSIS
950
- 'eddy_cuda --flm=quadratic --ff=10.0 \
951
- --acqp=epi_acqp.txt --bvals=bvals.scheme --bvecs=bvecs.scheme \
952
- --imain=epi.nii --index=epi_index.txt --mask=epi_mask.nii \
953
- --interp=spline --resamp=jac --mporder=6 --niter=5 --nvoxhp=1000 \
954
- --out=.../eddy_corrected --s2v_interp=trilinear --s2v_lambda=1 \
955
- --s2v_niter=5 --slspec=epi_slspec.txt --slm=none'
956
- >>> res = eddy.run() # doctest: +SKIP
957
-
947
+ 'eddy_cuda --ff=10.0 --fwhm=0 --acqp=epi_acqp.txt --bvals=bvals.scheme \
948
+ --bvecs=bvecs.scheme --imain=epi.nii --index=epi_index.txt \
949
+ --mask=epi_mask.nii --niter=5 --nvoxhp=1000 --out=.../eddy_corrected'
950
+ >>> eddy.inputs.use_cuda = False
951
+ >>> eddy.cmdline # doctest: +ELLIPSIS
952
+ 'eddy_openmp --ff=10.0 --fwhm=0 --acqp=epi_acqp.txt --bvals=bvals.scheme \
953
+ --bvecs=bvecs.scheme --imain=epi.nii --index=epi_index.txt \
954
+ --mask=epi_mask.nii --niter=5 --nvoxhp=1000 --out=.../eddy_corrected'
955
+ >>> res = eddy.run() # doctest: +SKIP
958
956
"""
959
957
960
958
_cmd = "eddy_openmp"
0 commit comments