Removed verbose option from synth_and_ana

This commit is contained in:
2021-03-17 16:36:08 +01:00
parent 4632d9d005
commit aac0f122f7

View File

@@ -1,4 +1,4 @@
# Synthetise new data and analyse it directly to return fit parametersi
# Synthetise new data and analyse it directly to return fit parameters
import numpy as np
import panda as pd
@@ -12,8 +12,7 @@ from fsl_mrs.utils.fitting import fit_FSLModel
def synth_and_ana(noise_cov,
fit_parameters, fit_snr, fit_sdnoise, fit_varnoise,
df_parameter_synth, basis_path, output_path,
verbose=False):
df_parameter_synth, basis_path, output_path):
"""Synthetise spectra with given noise-covariance, analyse the data and
return table of fitting parameters with a fit-plot.
We ignore Gly. Independent scaling of Macro Molecules."""
@@ -65,11 +64,6 @@ def synth_and_ana(noise_cov,
'baseline_order': 2}
res = fit_FSLModel(mrsA, **FitArgs)
# Plot fitting results.
if verbose:
fig = plotting.plot_fit(mrsA, pred=res.pred,
baseline=res.baseline, out="name")
# Combine highly correlated metabolites
combinationList = [['Glu', 'Gln'],
['GPC', 'PCho'],
@@ -93,7 +87,4 @@ def synth_and_ana(noise_cov,
df_params['noise_sd'] = fit_sdnoise
df_params['noise_var'] = fit_varnoise
if verbose:
return df_params, fig
return df_params