Removed verbose option from synth_and_ana
This commit is contained in:
@@ -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 numpy as np
|
||||||
import panda as pd
|
import panda as pd
|
||||||
@@ -12,8 +12,7 @@ from fsl_mrs.utils.fitting import fit_FSLModel
|
|||||||
|
|
||||||
def synth_and_ana(noise_cov,
|
def synth_and_ana(noise_cov,
|
||||||
fit_parameters, fit_snr, fit_sdnoise, fit_varnoise,
|
fit_parameters, fit_snr, fit_sdnoise, fit_varnoise,
|
||||||
df_parameter_synth, basis_path, output_path,
|
df_parameter_synth, basis_path, output_path):
|
||||||
verbose=False):
|
|
||||||
"""Synthetise spectra with given noise-covariance, analyse the data and
|
"""Synthetise spectra with given noise-covariance, analyse the data and
|
||||||
return table of fitting parameters with a fit-plot.
|
return table of fitting parameters with a fit-plot.
|
||||||
We ignore Gly. Independent scaling of Macro Molecules."""
|
We ignore Gly. Independent scaling of Macro Molecules."""
|
||||||
@@ -65,11 +64,6 @@ def synth_and_ana(noise_cov,
|
|||||||
'baseline_order': 2}
|
'baseline_order': 2}
|
||||||
res = fit_FSLModel(mrsA, **FitArgs)
|
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
|
# Combine highly correlated metabolites
|
||||||
combinationList = [['Glu', 'Gln'],
|
combinationList = [['Glu', 'Gln'],
|
||||||
['GPC', 'PCho'],
|
['GPC', 'PCho'],
|
||||||
@@ -93,7 +87,4 @@ def synth_and_ana(noise_cov,
|
|||||||
df_params['noise_sd'] = fit_sdnoise
|
df_params['noise_sd'] = fit_sdnoise
|
||||||
df_params['noise_var'] = fit_varnoise
|
df_params['noise_var'] = fit_varnoise
|
||||||
|
|
||||||
if verbose:
|
|
||||||
return df_params, fig
|
|
||||||
|
|
||||||
return df_params
|
return df_params
|
||||||
|
|||||||
Reference in New Issue
Block a user