satlas.models.summodel.SumModel

class satlas.models.summodel.SumModel(models)[source]

Create a model that sums all the underlying models for a single input variable.

__init__(models)[source]

Initializes the HFS by providing a list of HFSModel objects.

Parameters:models (list of HFSModel instances) – A list containing the models.
__call__(x)[source]

Get the response for frequency x (in MHz) of the spectrum.

Parameters:x (float or array_like) – Frequency in MHz
Returns:Response of the spectrum for each value of x.
Return type:float or NumPy array

Methods

__init__(models) Initializes the HFS by providing a list of HFSModel objects.
__call__(x) Get the response for frequency x (in MHz) of the spectrum.
display_chisquare_fit([scaled]) Display all relevent info of the least-squares fitting routine, if this has been performed.
display_mle_fit([scaled]) Give a readable overview of the result of the MLE fitting routine.
get_chisquare_mapping()
get_lnprior_mapping(params)
get_result([selection]) Return the variable names, values and estimated error bars for the parameters as seperate lists.
get_result_dict([method, scaled]) Returns the fitted parameters in a dictionary of the form {name: [value, uncertainty]}.
get_result_frame([method, selected, bounds, ...]) Returns the data from the fit in a pandas DataFrame.
plot([x, y, yerr, ax, plot_kws, ...]) Routine that plots the hfs of all the models, possibly on top of experimental data.
plot_spectroscopic([x, y, plot_kws]) Routine that plots the hfs of all the models, possibly on top of experimental data.
save(path) Saves the current spectrum, including the results of the fitting and the parameters, to the specified file.
seperate_response(x[, background]) Get the response for each seperate spectrum for the values x, without background.
set_boundaries(boundaryDict) Sets the boundaries of the fitparameters as supplied in the dictionary.
set_chisquare_mapping(mappingDict) Sets the prior mapping for the different parameters.
set_expr(exprDict) Sets the expression of the selected parameters to the given expressions.
set_literature_values(literatureDict) Sets the lnprior and chisquare mapping to handle the given literature values and uncertainties.
set_lnprior_mapping(mappingDict) Sets the prior mapping for the different parameters.
set_value(valueDict) Sets the value of the given parameters to the given values.
set_variation(varyDict) Sets the variation of the fitparameters as supplied in the dictionary.

Attributes

params Instance of lmfit.Parameters object characterizing the shape of the HFS.
shared Contains all parameters which share the same value among all models.