Skip to content
Snippets Groups Projects
Commit b4983a42 authored by Paul McCarthy's avatar Paul McCarthy
Browse files

If any subdirectory within a .feat dir is passed in as an overlay, the

.feat/filtered_func_dat is loaded. This was the previous desired
behaviour, but there was a bug in it.
parent 59fdc02a
No related branches found
No related tags found
No related merge requests found
......@@ -24,15 +24,16 @@ class FEATImage(fslimage.Image):
The specified ``path`` may be a FEAT analysis directory, or the model
data input file (e.g. ``analysis.feat/filtered_func_data.nii.gz``).
"""
featDir = featresults.getFEATDir(path)
if not featresults.isFEATDir(path):
if featDir is None:
raise ValueError('{} does not appear to be data from a '
'FEAT analysis'.format(path))
if op.isdir(path):
path = op.join(path, 'filtered_func_data')
path = op.join(featDir, 'filtered_func_data')
featDir = featresults.getFEATDir(path)
settings = featresults.loadSettings( featDir)
design = featresults.loadDesign( featDir)
names, cons = featresults.loadContrasts(featDir)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment