Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
FSL
fslpy
Commits
00a64d03
Commit
00a64d03
authored
Apr 16, 2017
by
Paul McCarthy
Browse files
Updates to featimage docs. Clarification/fix to featanalysis.isFEATImage
parent
e6b2518e
Changes
2
Hide whitespace changes
Inline
Side-by-side
fsl/data/featanalysis.py
View file @
00a64d03
...
...
@@ -61,6 +61,12 @@ def isFEATImage(path):
"""Returns ``True`` if the given path looks like it is the input data to
a FEAT analysis, ``False`` otherwise.
"""
try
:
path
=
fslimage
.
addExt
(
path
,
mustExist
=
True
)
except
:
return
False
dirname
=
op
.
dirname
(
path
)
filename
=
op
.
basename
(
path
)
...
...
fsl/data/featimage.py
View file @
00a64d03
...
...
@@ -18,7 +18,7 @@ from . import featanalysis
class
FEATImage
(
fslimage
.
Image
):
"""An ``Image`` from a FEAT analysis.
"""An ``Image``
which contains the input data
from a FEAT analysis.
The :class:`FEATImage` class makes use of the functions defined in the
:mod:`.featanalysis` module.
...
...
@@ -29,14 +29,14 @@ class FEATImage(fslimage.Image):
import fsl.data.featimage as featimage
# You can pass in the name of the
# .feat directory, or
any
fil
e
# contained within that directory.
# .feat directory, or
the
fil
tered_func_data
#
file
contained within that directory.
img = featimage.FEATImage('myanalysis.feat/filtered_func_data.nii.gz')
# Query information about the FEAT analysis
print
img.numEVs()
print
img.contrastNames()
print
img.numPoints()
print
(
img.numEVs()
)
print
(
img.contrastNames()
)
print
(
img.numPoints()
)
# Get the model fit residuals
res4d = img.getResiduals()
...
...
@@ -52,15 +52,10 @@ class FEATImage(fslimage.Image):
def
__init__
(
self
,
path
,
**
kwargs
):
"""Create a ``FEATImage`` instance.
:arg path: A FEAT analysis directory, or a
n
image file
contained
within such a directory.
:arg path: A FEAT analysis directory, or
the input dat
a image file
contained
within such a directory.
:arg kwargs: Passed to the :class:`.Image` constructor.
.. note:: If a FEAT directory is passed in for the ``path``
argument, this ``FEATImage`` instance will encapsulate
the model input data, typically called
``<directory>.feat/filtered_func_data.nii.gz``.
"""
if
op
.
isdir
(
path
):
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment