Commit 73a4430c authored by William Clarke's avatar William Clarke
Browse files

Minor tweaks.

parent 6f2cff19
......@@ -139,6 +139,8 @@ def main():
import os
import shutil
import warnings
import matplotlib
matplotlib.use('agg')
from fsl_mrs.utils import mrs_io
from fsl_mrs.utils import report
from fsl_mrs.utils import fitting
......@@ -248,7 +250,7 @@ def main():
# Include Macromolecules? These should have their own metab groups
if args.add_MM:
if not args.verbose:
if args.verbose:
print('Adding macromolecules')
nMM = mrs.add_MM_peaks(gamma=10, sigma=20)
G = [i + max(metab_groups) + 1 for i in range(nMM)]
......
......@@ -253,7 +253,7 @@ def main():
if args.verbose:
print('... Residual water removal ...')
hlsvdlimits = [-0.35, 0.35]
supp_data = nifti_mrs_proc.remove_peaks(supp_data, hlsvdlimits, report=report_dir)
supp_data = nifti_mrs_proc.remove_peaks(supp_data, hlsvdlimits, limit_units='ppm', report=report_dir)
if args.leftshift:
if args.verbose:
......
......@@ -93,7 +93,7 @@ def synthetic_spectra_from_model(config_file,
'eps': 0,
'gamma': 10,
'sigma': 10,
'baseline': (0, 0),
'baseline': [0, 0] * (baseline_order + 1),
'conc': concentrations}
for key in defined_vals:
......@@ -117,7 +117,7 @@ def synthetic_spectra_from_model(config_file,
syn_free_params.extend([defined_vals[param], ] * vm.mapped_sizes[index])
elif param in std_vals:
if hasattr(std_vals[param], "__len__") \
and len(defined_vals[param]) == vm.mapped_sizes[index]:
and len(std_vals[param]) == vm.mapped_sizes[index]:
syn_free_params.extend(std_vals[param])
elif hasattr(std_vals[param], "__len__"):
raise ValueError('Must be the same length as sizes.')
......
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