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
Hossein Rafipoor
fsl_mrs
Commits
274ca0d2
Commit
274ca0d2
authored
Oct 28, 2020
by
William Clarke
Browse files
Merge branch 'master' into 'master'
Master See merge request
fsl/fsl_mrs!12
parents
ea4e2e8e
80fdf678
Changes
5
Hide whitespace changes
Inline
Side-by-side
.gitlab-ci.yml
View file @
274ca0d2
stages
:
-
Static Analysis
-
Test
-
doc
flake8
:
image
:
python:3.7-slim-buster
...
...
@@ -13,7 +14,7 @@ flake8:
allow_failure
:
true
pytest
:
image
:
continuumio/miniconda3:latest
image
:
wtclarke/fsl_mrs_tests:1.0
stage
:
Test
variables
:
GIT_SUBMODULE_STRATEGY
:
normal
...
...
@@ -26,4 +27,16 @@ pytest:
-
conda install -y -c conda-forge pytest
-
pip install .
script
:
-
pytest fsl_mrs/tests
\ No newline at end of file
-
pytest fsl_mrs/tests
pages
:
image
:
python:3.7
stage
:
doc
script
:
-
pip install -U sphinx sphinx_rtd_theme
-
sphinx-build -b html ./docs/user_docs public
artifacts
:
paths
:
-
public
rules
:
-
if
:
'
$CI_COMMIT_BRANCH
==
"master"'
docs/user_docs/conf.py
View file @
274ca0d2
...
...
@@ -25,7 +25,7 @@ copyright = f'{date.year}, Will Clarke & Saad Jbabdi, University of Oxford, Oxfo
author
=
'William Clarke'
# The full version, including alpha/beta/rc tags
version
=
'1.0.
4
'
version
=
'1.0.
5
'
release
=
version
# From PM's fsleyes doc
...
...
fsl_mrs/tests/test_scripts_mrsi_segment.py
View file @
274ca0d2
...
...
@@ -7,7 +7,7 @@ from pathlib import Path
# Files
testsPath
=
Path
(
__file__
).
parent
anat
=
testsPath
/
'testdata/mrsi_segment/T1.anat'
mrsi
=
testsPath
/
'testdata/fsl_mrsi/FID_
m
etab.nii.gz'
mrsi
=
testsPath
/
'testdata/fsl_mrsi/FID_
M
etab.nii.gz'
def
test_mrsi_segment
(
tmp_path
):
...
...
fsl_mrs/tests/test_utils_fitting.py
View file @
274ca0d2
...
...
@@ -95,7 +95,7 @@ def test_fit_FSLModel_MH(data):
fittedconcs
=
res
.
getConc
(
metab
=
mrs
.
names
)
fittedRelconcs
=
res
.
getConc
(
scaling
=
'internal'
,
metab
=
mrs
.
names
)
assert
np
.
allclose
(
fittedconcs
,
amplitudes
,
atol
=
1
E-1
)
assert
np
.
allclose
(
fittedconcs
,
amplitudes
,
atol
=
2
E-1
)
assert
np
.
allclose
(
fittedRelconcs
,
amplitudes
/
(
amplitudes
[
0
]
+
amplitudes
[
1
]),
atol
=
1E-1
)
def
test_fit_FSLModel_lorentzian_MH
(
data
):
...
...
@@ -116,7 +116,7 @@ def test_fit_FSLModel_lorentzian_MH(data):
fittedconcs
=
res
.
getConc
(
metab
=
mrs
.
names
)
fittedRelconcs
=
res
.
getConc
(
scaling
=
'internal'
,
metab
=
mrs
.
names
)
assert
np
.
allclose
(
fittedconcs
,
amplitudes
,
atol
=
1
E-1
)
assert
np
.
allclose
(
fittedconcs
,
amplitudes
,
atol
=
2
E-1
)
assert
np
.
allclose
(
fittedRelconcs
,
amplitudes
/
(
amplitudes
[
0
]
+
amplitudes
[
1
]),
atol
=
1E-1
)
def
test_fit_FSLModel_on_invivo_sim
():
...
...
fsl_mrs/utils/preproc/general.py
View file @
274ca0d2
...
...
@@ -78,8 +78,8 @@ def add_subtract_report(inFID,inFID2,outFID,hdr,ppmlim=(0.2,4.2),function='Not s
return
fig
.
add_trace
(
trace
)
fig
=
addline
(
fig
,
plotIn
,
ppmlim
,
'FID1'
,
lines
[
'in'
])
fig
=
addline
(
fig
,
plotIn
,
ppmlim
,
'FID2'
,
lines
[
'out'
])
fig
=
addline
(
fig
,
plot
In
,
ppmlim
,
'Result'
,
lines
[
'diff'
])
fig
=
addline
(
fig
,
plotIn
2
,
ppmlim
,
'FID2'
,
lines
[
'out'
])
fig
=
addline
(
fig
,
plot
Out
,
ppmlim
,
'Result'
,
lines
[
'diff'
])
# Axes layout
plotAxesStyle
(
fig
,
ppmlim
,
title
=
f
'
{
function
}
summary'
)
...
...
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