resolution_functions
A module for containing all resolution functions
- MDMC.common.resolution_functions.gaussian(x: numpy.ndarray, sigma: float, mu: float = 0.0, norm: bool = True) numpy.ndarray [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 asx
, with the Gaussian distribution- Return type
- MDMC.common.resolution_functions.lorentzian(x: numpy.ndarray, gamma: float, x_0: float = 0.0) numpy.ndarray [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 asx
, with the Lorentzian distribution- Return type