Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
F
fslpy
Manage
Activity
Members
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Analyze
Contributor analytics
CI/CD 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
FSL
fslpy
Commits
a0982587
Commit
a0982587
authored
6 years ago
by
Paul McCarthy
Browse files
Options
Downloads
Patches
Plain Diff
TEST: Little test to check voxelwise EVs
parent
b91eae21
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
tests/test_featdesign.py
+17
-2
17 additions, 2 deletions
tests/test_featdesign.py
with
17 additions
and
2 deletions
tests/test_featdesign.py
+
17
−
2
View file @
a0982587
...
...
@@ -109,8 +109,9 @@ import numpy as np
import
pytest
import
tests
import
fsl.data.featdesign
as
featdesign
import
fsl.data.featanalysis
as
featanalysis
from
fsl.utils.tempdir
import
tempdir
import
fsl.data.featdesign
as
featdesign
import
fsl.data.featanalysis
as
featanalysis
datadir
=
op
.
join
(
op
.
dirname
(
__file__
),
'
testdata
'
,
'
test_feat
'
)
...
...
@@ -397,3 +398,17 @@ def test_loadDesignMat():
with
pytest
.
raises
(
Exception
):
featdesign
.
loadDesignMat
(
badfile
)
def
test_VoxelwiseEVs
():
with
tempdir
():
img
=
tests
.
make_random_image
(
'
image.nii.gz
'
,
(
10
,
10
,
10
,
10
))
ev1
=
featdesign
.
VoxelwiseEV
(
0
,
0
,
'
ev1
'
,
'
image.nii.gz
'
)
ev2
=
featdesign
.
VoxelwiseConfoundEV
(
0
,
0
,
'
ev2
'
,
'
image.nii.gz
'
)
for
xyz
in
tests
.
random_voxels
((
10
,
10
,
10
),
10
):
x
,
y
,
z
=
map
(
int
,
xyz
)
exp
=
img
.
dataobj
[
x
,
y
,
z
,
:]
assert
np
.
all
(
ev1
.
image
[
x
,
y
,
z
,
:]
==
exp
)
assert
np
.
all
(
ev2
.
image
[
x
,
y
,
z
,
:]
==
exp
)
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