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
e3f6c86f
Commit
e3f6c86f
authored
Sep 03, 2019
by
Paul McCarthy
🚵
Browse files
TEST: Update refs to deprecated methods
parent
40650612
Changes
3
Hide whitespace changes
Inline
Side-by-side
tests/test_atlases_query.py
View file @
e3f6c86f
...
...
@@ -218,8 +218,8 @@ def _eval_coord_voxel_query(atlas, query, qtype, qin):
elif
qin
==
'out'
:
expval
=
[]
assert
atlas
.
proportion
s
(
query
,
voxel
=
voxel
)
==
expval
assert
atlas
.
coord
Proportion
s
(
query
,
voxel
=
voxel
)
==
expval
assert
atlas
.
value
s
(
query
,
voxel
=
voxel
)
==
expval
assert
atlas
.
coord
Value
s
(
query
,
voxel
=
voxel
)
==
expval
if
isinstance
(
atlas
,
fslatlases
.
LabelAtlas
):
evalLabel
()
elif
isinstance
(
atlas
,
fslatlases
.
ProbabilisticAtlas
):
evalProb
()
...
...
@@ -343,13 +343,13 @@ def _eval_mask_query(atlas, query, qtype, qin):
if
qin
==
'out'
:
with
pytest
.
raises
(
fslatlases
.
MaskError
):
atlas
.
mask
Proportion
s
(
mask
)
atlas
.
mask
Value
s
(
mask
)
with
pytest
.
raises
(
fslatlases
.
MaskError
):
atlas
.
proportion
s
(
mask
)
atlas
.
value
s
(
mask
)
return
props
=
atlas
.
proportion
s
(
mask
)
props2
=
atlas
.
mask
Proportion
s
(
mask
)
props
=
atlas
.
value
s
(
mask
)
props2
=
atlas
.
mask
Value
s
(
mask
)
assert
np
.
all
(
np
.
isclose
(
props
,
props2
))
...
...
tests/test_scripts/test_atlasq_ohi.py
View file @
e3f6c86f
...
...
@@ -51,7 +51,7 @@ def test_coords(seed):
"""Test the ohi -a "atlas" -c "coords" mode. """
def
expectedProbOutput
(
atlas
,
coords
):
probs
=
atlas
.
proportion
s
(
coords
)
probs
=
atlas
.
value
s
(
coords
)
expected
=
'<b>{}</b><br>'
.
format
(
atlas
.
desc
.
name
)
nzprobs
=
[]
...
...
@@ -161,7 +161,7 @@ def test_mask(seed):
def
expectedProbOutput
(
mask
,
atlas
):
props
=
atlas
.
mask
Proportion
s
(
mask
)
props
=
atlas
.
mask
Value
s
(
mask
)
labels
=
[
l
.
index
for
l
in
atlas
.
desc
.
labels
]
exp
=
[]
...
...
tests/test_scripts/test_atlasq_query.py
View file @
e3f6c86f
...
...
@@ -294,7 +294,7 @@ def _eval_coord_voxel_query(
if
o_type
==
'normal'
:
evalLabelNormalOutput
(
explabel
)
else
:
evalLabelShortOutput
(
explabel
)
elif
isinstance
(
a_img
,
fslatlases
.
ProbabilisticAtlas
):
expprops
=
a_img
.
proportion
s
(
query
,
voxel
=
voxel
)
expprops
=
a_img
.
value
s
(
query
,
voxel
=
voxel
)
if
o_type
==
'normal'
:
evalProbNormalOutput
(
expprops
)
else
:
evalProbShortOutput
(
expprops
)
...
...
@@ -400,7 +400,7 @@ def _eval_mask_query(
explabels
,
expprops
=
[],
[]
elif
isinstance
(
aimg
,
fslatlases
.
ProbabilisticAtlas
):
try
:
expprops
=
aimg
.
mask
Proportion
s
(
maskimg
)
expprops
=
aimg
.
mask
Value
s
(
maskimg
)
explabels
=
aimg
.
desc
.
labels
except
fslatlases
.
MaskError
:
explabels
=
[]
...
...
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