DeltaDiracModel

class qef.models.deltadirac.DeltaDiracModel(independent_vars=['x'], prefix='', missing=None, name=None, **kwargs)[source]

Bases: lmfit.model.Model

A function that is zero everywhere except for the x-value closest to the center parameter.

At value-closest-to-center, the model evaluates to the amplitude parameter divided by the x-spacing. This last division is necessary to preserve normalization with integrating the function over the X-axis

Fitting parameters:
  • integrated intensity amplitude \(A\)
  • position of the peak center \(E_0\)
guess(y, x=None, **kwargs)[source]

Guess starting values for the parameters of a model.

Parameters:
  • y (ndarray) – Intensities
  • x (ndarray) – energy values
  • kwargs (dict) – additional optional arguments, passed to model function.
Returns:

parameters with guessed values

Return type:

Parameters

qef.models.deltadirac.delta_dirac(x, amplitude=1.0, center=0.0)[source]

function is zero except for the x-value closest to center.

At value-closest-to-center, the function evaluates to the amplitude divided by the x-spacing.

Parameters:
  • x :class:`~numpy:numpy.ndarray` – domain of the function, energy
  • amplitude (float) – Integrated intensity of the curve
  • center (float) – position of the peak