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
Michiel Cottaar
fsl_mrs
Commits
9e580c23
Commit
9e580c23
authored
Jun 14, 2020
by
William Clarke
Browse files
Fix bug, add tests.
parent
ed7f68f2
Changes
3
Hide whitespace changes
Inline
Side-by-side
fsl_mrs/scripts/fsl_mrs
View file @
9e580c23
...
...
@@ -397,7 +397,7 @@ def main():
def
str_or_int_arg
(
x
):
try
:
return
int
(
x
)
except
Typ
eError
:
except
Valu
eError
:
return
x
...
...
fsl_mrs/tests/test_scripts_fsl_mrs.py
View file @
9e580c23
...
...
@@ -8,7 +8,8 @@ import os.path as op
testsPath
=
op
.
dirname
(
__file__
)
data
=
{
'metab'
:
op
.
join
(
testsPath
,
'testdata/fsl_mrs/metab.nii'
),
'water'
:
op
.
join
(
testsPath
,
'testdata/fsl_mrs/water.nii'
),
'basis'
:
op
.
join
(
testsPath
,
'testdata/fsl_mrs/steam_basis'
)}
'basis'
:
op
.
join
(
testsPath
,
'testdata/fsl_mrs/steam_basis'
),
'seg'
:
op
.
join
(
testsPath
,
'testdata/fsl_mrs/segmentation.json'
)}
def
test_fsl_mrs
(
tmp_path
):
...
...
@@ -19,8 +20,20 @@ def test_fsl_mrs(tmp_path):
'--output'
,
tmp_path
,
'--h2o'
,
data
[
'water'
],
'--TE'
,
'11'
,
'--metab_groups'
,
'Mac'
,
'--tissue_frac'
,
'0.45'
,
'0.45'
,
'0.1'
,
'--overwrite'
,
'--combine'
,
'Cr'
,
'PCr'
])
subprocess
.
check_call
([
'fsl_mrs'
,
'--data'
,
data
[
'metab'
],
'--basis'
,
data
[
'basis'
],
'--output'
,
tmp_path
,
'--h2o'
,
data
[
'water'
],
'--TE'
,
'11'
,
'--metab_groups'
,
'Mac'
,
'--tissue_frac'
,
data
[
'seg'
],
'--overwrite'
,
'--combine'
,
'Cr'
,
'PCr'
,
'--report'
])
...
...
fsl_mrs/tests/testdata/fsl_mrs/segmentation.json
0 → 100644
LFS
View file @
9e580c23
This source diff could not be displayed because it is stored in LFS. You can
view the blob
instead.
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