Skip to content

Commit bcd8a3f

Browse files
committed
Fixed cmdline commands in docstrings
Now, the tests are correctly implemented
1 parent 5d0837e commit bcd8a3f

File tree

1 file changed

+34
-17
lines changed

1 file changed

+34
-17
lines changed

nipype/interfaces/fsl/epi.py

Lines changed: 34 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -54,10 +54,13 @@ class PrepareFieldmap(FSLCommand):
5454
5555
Examples
5656
--------
57+
58+
>>> from nipype.interfaces.fsl import PrepareFieldmap
5759
>>> prepare = PrepareFieldmap()
5860
>>> prepare.inputs.in_phase = "phase.nii"
5961
>>> prepare.inputs.in_magnitude = "magnitude.nii"
60-
>>> prepare.cmdline # doctest: +SKIP
62+
>>> prepare.cmdline
63+
'fsl_prepare_fieldmap SIEMENS phase.nii magnitude.nii /home/oesteban/workspace/nipype/nipype/testing/data/phase_fslprepared.nii.gz 2.460000'
6164
>>> res = prepare.run() # doctest: +SKIP
6265
6366
@@ -145,10 +148,13 @@ class TOPUP( FSLCommand ):
145148
146149
Examples
147150
--------
151+
152+
>>> from nipype.interfaces.fsl import TOPUP
148153
>>> topup = TOPUP()
149154
>>> topup.inputs.in_file = "b0_b0rev.nii"
150155
>>> topup.inputs.encoding_file = "topup_encoding.txt"
151-
>>> topup.cmdline # doctest: +SKIP
156+
>>> topup.cmdline
157+
'topup --config=b02b0.cnf --datain=topup_encoding.txt --imain=b0_b0rev.nii --out=/home/oesteban/workspace/nipype/nipype/testing/data/nipypetu'
152158
>>> res = topup.run() # doctest: +SKIP
153159
154160
"""
@@ -239,21 +245,22 @@ class ApplyTOPUPOutputSpec( TraitedSpec ):
239245
out_corrected = File( exists=True, desc='name of 4D image file with unwarped images' )
240246

241247
class ApplyTOPUP( FSLCommand ):
242-
""" Interface for FSL topup, a tool for estimating and correcting susceptibility induced distortions
243-
Reference: http://fsl.fmrib.ox.ac.uk/fsl/fslwiki/topup/ApplytopupUsersGuide
244-
Example: http://fsl.fmrib.ox.ac.uk/fsl/fslwiki/topup/ExampleTopupFollowedByApplytopup
245-
246-
topup --imain=<some 4D image> --datain=<text file> --config=<text file with parameters> --coutname=my_field
248+
""" Interface for FSL topup, a tool for estimating and correcting susceptibility induced distortions.
249+
`General reference <http://fsl.fmrib.ox.ac.uk/fsl/fslwiki/topup/ApplytopupUsersGuide>`_
250+
and `use example <http://fsl.fmrib.ox.ac.uk/fsl/fslwiki/topup/ExampleTopupFollowedByApplytopup>`_.
247251
248252
249253
Examples
250254
--------
255+
256+
>>> from nipype.interfaces.fsl import ApplyTOPUP
251257
>>> applytopup = ApplyTOPUP()
252258
>>> applytopup.inputs.in_files = [ "epi.nii", "epi_rev.nii" ]
253259
>>> applytopup.inputs.encoding_file = "topup_encoding.txt"
254260
>>> applytopup.inputs.in_index = [ 1,2 ]
255261
>>> applytopup.inputs.in_topup = "my_topup_results"
256-
>>> applytopup.cmdline # doctest: +SKIP
262+
>>> applytopup.cmdline
263+
'applytopup --datain=topup_encoding.txt --imain=epi.nii,epi_rev.nii --inindex=1,2 --topup=my_topup_results --out=/home/oesteban/workspace/nipype/nipype/testing/data/nipypeatu'
257264
>>> res = applytopup.run() # doctest: +SKIP
258265
259266
"""
@@ -315,20 +322,23 @@ class EddyOutputSpec( TraitedSpec ):
315322
out_parameter = File( exists=True, desc='text file with parameters definining the field and movement for each scan')
316323

317324
class Eddy( FSLCommand ):
318-
""" Interface for FSL eddy, a tool for estimating and correcting eddy currents induced distortions
319-
User guide: http://fsl.fmrib.ox.ac.uk/fsl/fslwiki/Eddy/UsersGuide
320-
Regarding acqp file: http://fsl.fmrib.ox.ac.uk/fsl/fslwiki/eddy/Faq#How_do_I_know_what_to_put_into_my_--acqp_file
325+
""" Interface for FSL eddy, a tool for estimating and correcting eddy currents induced distortions.
326+
`User guide <http://fsl.fmrib.ox.ac.uk/fsl/fslwiki/Eddy/UsersGuide>`_ and
327+
`more info regarding acqp file <http://fsl.fmrib.ox.ac.uk/fsl/fslwiki/eddy/Faq#How_do_I_know_what_to_put_into_my_--acqp_file>`_.
321328
322329
Examples
323330
--------
331+
332+
>>> from nipype.interfaces.fsl import Eddy
324333
>>> eddy = Eddy()
325334
>>> eddy.inputs.in_file = 'epi.nii'
326335
>>> eddy.inputs.in_mask = 'epi_mask.nii'
327336
>>> eddy.inputs.in_index = 'epi_index.txt'
328337
>>> eddy.inputs.in_acqp = 'epi_acqp.txt'
329338
>>> eddy.inputs.in_bvec = 'bvecs.scheme'
330339
>>> eddy.inputs.in_bval = 'bvals.scheme'
331-
>>> eddy.cmdline # doctest: +SKIP
340+
>>> eddy.cmdline
341+
'eddy --acqp=epi_acqp.txt --bvals=bvals.scheme --bvecs=bvecs.scheme --imain=epi.nii --index=epi_index.txt --mask=epi_mask.nii --out=/home/oesteban/workspace/nipype/nipype/testing/data/eddy_corrected'
332342
>>> res = eddy.run() # doctest: +SKIP
333343
334344
@@ -401,11 +411,14 @@ class EPIDeWarp(FSLCommand):
401411
402412
Examples
403413
--------
414+
415+
>>> from nipype.interfaces.fsl import EPIDeWarp
404416
>>> dewarp = EPIDeWarp()
405417
>>> dewarp.inputs.epi_file = "functional.nii"
406418
>>> dewarp.inputs.mag_file = "magnitude.nii"
407419
>>> dewarp.inputs.dph_file = "phase.nii"
408-
>>> dewarp.cmdline # doctest: +SKIP
420+
>>> dewarp.cmdline
421+
'epidewarp.fsl --mag magnitude.nii --dph phase.nii --epi functional.nii --esp 0.58 --exfdw /home/oesteban/workspace/nipype/nipype/testing/data/exfdw.nii.gz --nocleanup --sigma 2 --tediff 2.46 --tmpdir /home/oesteban/workspace/nipype/nipype/testing/data/temp --vsm /home/oesteban/workspace/nipype/nipype/testing/data/vsm.nii.gz'
409422
>>> res = dewarp.run() # doctest: +SKIP
410423
411424
References
@@ -486,10 +499,13 @@ class SigLoss(FSLCommand):
486499
487500
Examples
488501
--------
502+
503+
>>> from nipype.interfaces.fsl import SigLoss
489504
>>> sigloss = SigLoss()
490505
>>> sigloss.inputs.in_file = "phase.nii"
491506
>>> sigloss.inputs.echo_time = 0.03
492-
>>> sigloss.cmdline # doctest: +SKIP
507+
>>> sigloss.cmdline
508+
'sigloss --te=0.030000 -i phase.nii -s /home/oesteban/workspace/nipype/nipype/testing/data/phase_sigloss.nii.gz'
493509
>>> res = sigloss.run() # doctest: +SKIP
494510
"""
495511
input_spec = SigLossInputSpec
@@ -525,9 +541,10 @@ class EddyCorrect(FSLCommand):
525541
Example
526542
-------
527543
528-
>>> from nipype.interfaces import fsl
529-
>>> eddyc = fsl.EddyCorrect(in_file='diffusion.nii', out_file="diffusion_edc.nii", ref_num=0)
530-
>>> eddyc.cmdline # doctest: +SKIP
544+
>>> from nipype.interfaces.fsl import EddyCorrect
545+
>>> eddyc = EddyCorrect(in_file='diffusion.nii', out_file="diffusion_edc.nii", ref_num=0)
546+
>>> eddyc.cmdline
547+
'eddy_correct diffusion.nii diffusion_edc.nii 0'
531548
532549
"""
533550
_cmd = 'eddy_correct'

0 commit comments

Comments
 (0)