Commit 7d7a1bce authored by William Clarke's avatar William Clarke
Browse files

Merge branch 'synth_no_basisfile' into 'master'

Allow in-memory basis functions for data synthesis

See merge request fsl/fsl_mrs!18
parents c8afdfee caccacbd
......@@ -12,6 +12,7 @@ from fsl_mrs.utils import mrs_io
from fsl_mrs.utils.baseline import prepare_baseline_regressor
from fsl_mrs.core import MRS
from fsl_mrs.utils import models
from pathlib import Path
def standardConcentrations(basisNames):
......@@ -57,7 +58,10 @@ def prep_mrs_for_synthetic(basisFile, points, bandwidth, ignore, ind_scaling, co
metabolites in the basis file can be ignored or independently scaled.
basis, names, header = mrs_io.read_basis(basisFile)
if isinstance(basisFile, (str, Path)):
basis, names, header = mrs_io.read_basis(basisFile)
basis, names, header = basisFile
empty_mrs = MRS(FID=np.ones((points,)),
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