Skip to content

Commit 9e4a94d

Browse files
committed
add documentation & doc tests to fsl preprocess
1 parent b52524e commit 9e4a94d

File tree

15 files changed

+53
-357
lines changed

15 files changed

+53
-357
lines changed

.cache/v/cache/lastfailed

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
{
2+
"nipype/pipeline/engine/tests/test_engine.py::test_deep_nested_write_graph_runs": true,
3+
"nipype/pipeline/engine/tests/test_engine.py::test_write_graph_runs": true
4+
}

README.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -78,8 +78,8 @@ Support and Communication
7878
-------------------------
7979

8080
If you have a problem or would like to ask a question about how to do something in Nipype please open an issue to
81-
`NeuroStars.org <http://neurostars.org>`_ with a *nipype* tag. `NeuroStars.org <http://neurostars.org>`_ is a
82-
platform similar to StackOverflow but dedicated to neuroinformatics.
81+
`NeuroStars.org <http://neurostars.org>`_ with a *nipype* tag. `NeuroStars.org <http://neurostars.org>`_ is a
82+
platform similar to StackOverflow but dedicated to neuroinformatics.
8383

8484
To participate in the Nipype development related discussions please use the following mailing list::
8585

nipype/algorithms/tests/test_auto_CompCor.py

Lines changed: 0 additions & 37 deletions
This file was deleted.

nipype/algorithms/tests/test_auto_ComputeDVARS.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,8 @@ def test_ComputeDVARS_inputs():
1717
),
1818
in_mask=dict(mandatory=True,
1919
),
20+
intensity_normalization=dict(usedefault=True,
21+
),
2022
remove_zerovariance=dict(usedefault=True,
2123
),
2224
save_all=dict(usedefault=True,

nipype/algorithms/tests/test_auto_ErrorMap.py

Lines changed: 0 additions & 35 deletions
This file was deleted.

nipype/algorithms/tests/test_auto_FramewiseDisplacement.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,8 @@ def test_FramewiseDisplacement_inputs():
1919
),
2020
out_file=dict(usedefault=True,
2121
),
22+
parameter_source=dict(mandatory=True,
23+
),
2224
radius=dict(usedefault=True,
2325
),
2426
save_plot=dict(usedefault=True,

nipype/algorithms/tests/test_auto_Overlap.py

Lines changed: 0 additions & 47 deletions
This file was deleted.

nipype/algorithms/tests/test_auto_TSNR.py

Lines changed: 0 additions & 43 deletions
This file was deleted.

nipype/interfaces/freesurfer/tests/test_auto_BBRegister.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ def test_BBRegister_inputs():
1818
usedefault=True,
1919
),
2020
init=dict(argstr='--init-%s',
21+
mandatory=True,
2122
xor=['init_reg_file'],
2223
),
2324
init_reg_file=dict(argstr='--init-reg %s',

nipype/interfaces/fsl/preprocess.py

Lines changed: 30 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -118,15 +118,17 @@ class BET(FSLCommand):
118118
"""Use FSL BET command for skull stripping.
119119
120120
For complete details, see the `BET Documentation.
121-
<http://www.fmrib.ox.ac.uk/fsl/bet2/index.html>`_
121+
<https://fsl.fmrib.ox.ac.uk/fsl/fslwiki/BET/UserGuide>`_
122122
123123
Examples
124124
--------
125125
>>> from nipype.interfaces import fsl
126-
>>> from nipype.testing import example_data
127126
>>> btr = fsl.BET()
128-
>>> btr.inputs.in_file = example_data('structural.nii')
127+
>>> btr.inputs.in_file = 'structural.nii'
129128
>>> btr.inputs.frac = 0.7
129+
>>> btr.inputs.out_file = 'brain_anat.nii'
130+
>>> btr.cmdline # doctest: +ALLOW_UNICODE
131+
'bet structural.nii brain_anat.nii -f 0.70'
130132
>>> res = btr.run() # doctest: +SKIP
131133
132134
"""
@@ -275,7 +277,7 @@ class FASTOutputSpec(TraitedSpec):
275277

276278
mixeltype = File(desc="path/name of mixeltype volume file _mixeltype")
277279

278-
partial_volume_map = File(desc="path/name of partial volume file _pveseg")
280+
partial_volume_map = File(desc='path/name of partial volume file _pveseg')
279281
partial_volume_files = OutputMultiPath(File(
280282
desc='path/name of partial volumes files one for each class, _pve_x'))
281283

@@ -288,18 +290,17 @@ class FAST(FSLCommand):
288290
""" Use FSL FAST for segmenting and bias correction.
289291
290292
For complete details, see the `FAST Documentation.
291-
<http://www.fmrib.ox.ac.uk/fsl/fast4/index.html>`_
293+
<https://fsl.fmrib.ox.ac.uk/fsl/fslwiki/FAST>`_
292294
293295
Examples
294296
--------
295297
>>> from nipype.interfaces import fsl
296-
>>> from nipype.testing import example_data
297-
298-
Assign options through the ``inputs`` attribute:
299-
300298
>>> fastr = fsl.FAST()
301-
>>> fastr.inputs.in_files = example_data('structural.nii')
302-
>>> out = fastr.run() #doctest: +SKIP
299+
>>> fastr.inputs.in_files = 'structural.nii'
300+
>>> fastr.inputs.out_basename = 'fast_'
301+
>>> fastr.cmdline # doctest: +ALLOW_UNICODE
302+
'fast -o fast_ -S 1 structural.nii'
303+
>>> out = fastr.run() # doctest: +SKIP
303304
304305
"""
305306
_cmd = 'fast'
@@ -308,12 +309,12 @@ class FAST(FSLCommand):
308309

309310
def _format_arg(self, name, spec, value):
310311
# first do what should be done in general
311-
formated = super(FAST, self)._format_arg(name, spec, value)
312+
formatted = super(FAST, self)._format_arg(name, spec, value)
312313
if name == 'in_files':
313314
# FAST needs the -S parameter value to correspond to the number
314315
# of input images, otherwise it will ignore all but the first
315-
formated = "-S %d %s" % (len(value), formated)
316-
return formated
316+
formatted = "-S %d %s" % (len(value), formatted)
317+
return formatted
317318

318319
def _list_outputs(self):
319320
outputs = self.output_spec().get()
@@ -526,7 +527,7 @@ class FLIRT(FSLCommand):
526527
"""Use FSL FLIRT for coregistration.
527528
528529
For complete details, see the `FLIRT Documentation.
529-
<http://www.fmrib.ox.ac.uk/fsl/flirt/index.html>`_
530+
<https://fsl.fmrib.ox.ac.uk/fsl/fslwiki/FLIRT>`_
530531
531532
To print out the command line help, use:
532533
fsl.FLIRT().inputs_help()
@@ -665,14 +666,18 @@ class MCFLIRT(FSLCommand):
665666
"""Use FSL MCFLIRT to do within-modality motion correction.
666667
667668
For complete details, see the `MCFLIRT Documentation.
668-
<http://www.fmrib.ox.ac.uk/fsl/mcflirt/index.html>`_
669+
<https://fsl.fmrib.ox.ac.uk/fsl/fslwiki/MCFLIRT>`_
669670
670671
Examples
671672
--------
672673
>>> from nipype.interfaces import fsl
673-
>>> from nipype.testing import example_data
674-
>>> mcflt = fsl.MCFLIRT(in_file=example_data('functional.nii'), cost='mutualinfo')
675-
>>> res = mcflt.run() # doctest: +SKIP
674+
>>> mcflt = fsl.MCFLIRT()
675+
>>> mcflt.inputs.in_file = 'functional.nii'
676+
>>> mcflt.inputs.cost = 'mutualinfo'
677+
>>> mcflt.inputs.out_file = 'moco.nii'
678+
>>> mcflt.cmdline # doctest: +ALLOW_UNICODE
679+
'mcflirt -in functional.nii -cost mutualinfo -out moco.nii'
680+
>>> res = mcflt.run() # doctest: +SKIP
676681
677682
"""
678683
_cmd = 'mcflirt'
@@ -918,6 +923,9 @@ class FNIRTOutputSpec(TraitedSpec):
918923
class FNIRT(FSLCommand):
919924
"""Use FSL FNIRT for non-linear registration.
920925
926+
For complete details, see the `MCFLIRT Documentation.
927+
<https://fsl.fmrib.ox.ac.uk/fsl/fslwiki/FNIRT>`_
928+
921929
Examples
922930
--------
923931
>>> from nipype.interfaces import fsl
@@ -1218,6 +1226,9 @@ class SUSANOutputSpec(TraitedSpec):
12181226
class SUSAN(FSLCommand):
12191227
""" use FSL SUSAN to perform smoothing
12201228
1229+
For complete details, see the `MCFLIRT Documentation.
1230+
<https://fsl.fmrib.ox.ac.uk/fsl/fslwiki/SUSAN>`_
1231+
12211232
Examples
12221233
--------
12231234

0 commit comments

Comments
 (0)