Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
F
fslpy
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Container Registry
Model registry
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Michiel Cottaar
fslpy
Commits
1b4eb785
Commit
1b4eb785
authored
7 years ago
by
Paul McCarthy
Browse files
Options
Downloads
Patches
Plain Diff
Various fixes to featanalysis module
parent
a23e2003
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
fsl/data/featanalysis.py
+14
-14
14 additions, 14 deletions
fsl/data/featanalysis.py
with
14 additions
and
14 deletions
fsl/data/featanalysis.py
+
14
−
14
View file @
1b4eb785
...
...
@@ -62,9 +62,11 @@ def isFEATImage(path):
a FEAT analysis, ``False`` otherwise.
"""
dirname
=
op
.
dirname
(
path
)
filename
=
op
.
basename
(
path
)
filename
=
op
.
basename
(
path
)
return
filename
.
startswith
(
'
filtered_func_data
'
)
and
isFEATDir
(
dirname
)
return
filename
.
startswith
(
'
filtered_func_data
'
)
and
\
fslimage
.
looksLikeImage
(
filename
)
and
\
isFEATDir
(
dirname
)
def
isFEATDir
(
path
):
...
...
@@ -90,7 +92,7 @@ def isFEATDir(path):
return
False
try
:
fslimage
.
addExt
(
op
.
join
(
path
,
'
filtered_func_data
'
),
mustExist
=
True
)
fslimage
.
addExt
(
op
.
join
(
dirname
,
'
filtered_func_data
'
),
mustExist
=
True
)
except
fslimage
.
PathError
:
return
False
...
...
@@ -124,7 +126,7 @@ def getAnalysisDir(path):
"""
If the given path is contained within a FEAT directory, the path
to that FEAT directory is returned. Otherwise, ``None`` is returned.
"""
featdir
=
fslpath
.
deepest
(
path
,
[
'
.feat
'
,
'
.gfeat
'
])
featdir
=
fslpath
.
deepest
(
path
,
[
'
.feat
'
])
if
featdir
is
not
None
and
isFEATDir
(
featdir
):
return
featdir
...
...
@@ -153,8 +155,7 @@ def getReportFile(featdir):
def
loadContrasts
(
featdir
):
"""
Loads the contrasts from a FEAT directory. Returns a tuple containing:
- A dictionary of ``{contrastnum : name}`` mappings (the ``contrastnum``
values are 1-indexed).
- A list of names, one for each contrast.
- A list of contrast vectors (each of which is a list itself).
...
...
@@ -274,10 +275,13 @@ def getThresholds(settings):
:arg settings: A FEAT settings dictionary (see :func:`loadSettings`).
"""
return
{
'
p
'
:
settings
.
get
(
'
prob_thresh
'
,
None
),
'
z
'
:
settings
.
get
(
'
z_thresh
'
,
None
)
}
p
=
settings
.
get
(
'
prob_thresh
'
,
None
)
z
=
settings
.
get
(
'
z_thresh
'
,
None
)
if
p
is
not
None
:
p
=
float
(
p
)
if
z
is
not
None
:
z
=
float
(
z
)
return
{
'
p
'
:
p
,
'
z
'
:
z
}
def
isFirstLevelAnalysis
(
settings
):
...
...
@@ -432,10 +436,6 @@ def loadClusterResults(featdir, settings, contrast):
colNames
=
colNames
.
split
(
'
\t
'
)
clusterLines
=
[
cl
.
split
(
'
\t
'
)
for
cl
in
clusterLines
]
# No clusters
if
len
(
clusterLines
)
==
0
:
return
None
# Turn each cluster line into a
# Cluster instance. An error will
# be raised if the columm names
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment