Skip to content

Commit e49bfb9

Browse files
committed
minor improvements on doctests
1 parent 435c417 commit e49bfb9

File tree

1 file changed

+14
-10
lines changed

1 file changed

+14
-10
lines changed

nipype/interfaces/fsl/utils.py

Lines changed: 14 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -157,31 +157,35 @@ class Smooth(FSLCommand):
157157
"""
158158
Use fslmaths to smooth the image
159159
160-
Example
161-
-------
162-
163-
>>> from nipype.interfaces.fsl import Smooth
164-
>>> sm = Smooth()
165-
>>> sm.inputs.in_file = 'functional2.nii'
166-
>>> sm.cmdline
167-
Traceback (most recent call last):
168-
...
169-
RuntimeError: either sigma (in mm) or fwhm need be specified.
160+
Examples
161+
--------
170162
171163
Setting the kernel width using sigma:
164+
172165
>>> sm = Smooth()
173166
>>> sm.inputs.in_file = 'functional2.nii'
174167
>>> sm.inputs.sigma = 8.0
175168
>>> sm.cmdline #doctest: +ELLIPSIS
176169
'fslmaths functional2.nii -kernel gauss 8.000 -fmean functional2_smooth.nii.gz'
177170
178171
Setting the kernel width using fwhm:
172+
179173
>>> sm = Smooth()
180174
>>> sm.inputs.in_file = 'functional2.nii'
181175
>>> sm.inputs.fwhm = 8.0
182176
>>> sm.cmdline #doctest: +ELLIPSIS
183177
'fslmaths functional2.nii -kernel gauss 3.397 -fmean functional2_smooth.nii.gz'
184178
179+
One of sigma or fwhm must be set:
180+
181+
>>> from nipype.interfaces.fsl import Smooth
182+
>>> sm = Smooth()
183+
>>> sm.inputs.in_file = 'functional2.nii'
184+
>>> sm.cmdline
185+
Traceback (most recent call last):
186+
...
187+
RuntimeError: either sigma (in mm) or fwhm need be specified.
188+
185189
"""
186190

187191
input_spec = SmoothInputSpec

0 commit comments

Comments
 (0)