TabulatedModel – linear interpolator for a numerical table of intensity values

class qef.models.tabulatedmodel.TabulatedModel(xs, ys, *args, **kwargs)[source]

Bases: lmfit.model.Model

fitting the tabulated Model to some arbitrary points

Parameters:
  • xs (ndarray) – given domain of the function, energy
  • ys (ndarray) – given domain of the function, intensity
  • Fitting parameters
    • rescaling factor amplitude
    • shift along the X-axis center
guess(data, x, **kwargs)[source]

Guess starting values for the parameters of a model.

Parameters:
  • data (ndarray) – data to be fitted
  • x (ndarray) – energy domain where the interpolation required
  • kwargs (dict) – additional optional arguments, passed to model function.
Returns:

parameters with guessed values

Return type:

Parameters