resolution_functions

A module for containing all resolution functions

MDMC.common.resolution_functions.gaussian(x, sigma, mu=0.0, norm=True)[source]

Calculates the Gaussian distribution

Parameters
  • x (numpy.ndarray) – The x values at which the Gaussian distribution is calculated.

  • sigma (float) – The standard deviation of the Gaussian.

  • mu (float, optional) – The offset of the Gaussian. Default is 0.0

  • norm (bool) – If True, resulting distribution is normalized to unity. Default is True.

Returns

An array with the same length as x, with the Gaussian distribution

Return type

numpy.ndarray

MDMC.common.resolution_functions.lorentzian(x, gamma, x_0=0.0)[source]

Calculates the Lorentzian (Cauchy) distribution

Parameters
  • x (numpy.ndarray) – The x values at which the Gaussian distribution is calculated.

  • gamma (float) – The full-width at half-maximum

  • x_0 (float) – The offset of the distribution. Defaults to 0.0.

Returns

An array with the same length as x, with the Lorentzian distribution

Return type

numpy.ndarray