Commit 274ca0d2 authored by William Clarke's avatar William Clarke
Browse files

Merge branch 'master' into 'master'

Master

See merge request fsl/fsl_mrs!12
parents ea4e2e8e 80fdf678
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"'
......@@ -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
......
......@@ -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_metab.nii.gz'
mrsi = testsPath / 'testdata/fsl_mrsi/FID_Metab.nii.gz'
def test_mrsi_segment(tmp_path):
......
......@@ -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=1E-1)
assert np.allclose(fittedconcs,amplitudes,atol=2E-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=1E-1)
assert np.allclose(fittedconcs,amplitudes,atol=2E-1)
assert np.allclose(fittedRelconcs,amplitudes/(amplitudes[0]+amplitudes[1]),atol=1E-1)
def test_fit_FSLModel_on_invivo_sim():
......
......@@ -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,plotIn,ppmlim,'Result',lines['diff'])
fig = addline(fig,plotIn2,ppmlim,'FID2',lines['out'])
fig = addline(fig,plotOut,ppmlim,'Result',lines['diff'])
# Axes layout
plotAxesStyle(fig,ppmlim,title = f'{function} summary')
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment