fitting¶
Custom fitting models and related functions.
- pleasant.fitting.gauss_amplitude(height, sigma)¶
Amplitude of Gaussian.
- Return type:
float
- pleasant.fitting.gauss_fwhm(sigma)¶
Full width at half maximum of Gaussian.
- Return type:
float
- pleasant.fitting.gauss_height(amplitude, sigma)¶
Peak height of Gaussian.
- Return type:
float
- pleasant.fitting.gauss_sigma(fwhm)¶
Compute sigma of Gaussian.
- Return type:
float
- pleasant.fitting.lorentz_amplitude(height, sigma)¶
Amplitude of Lorentzian.
- Return type:
float
- pleasant.fitting.lorentz_fwhm(sigma)¶
Full width at half maximum of Lorentzian.
- Return type:
float
- pleasant.fitting.lorentz_height(amplitude, sigma)¶
Peak height of Lorentzian.
- Return type:
float
- pleasant.fitting.lorentz_sigma(fwhm)¶
Compute sigma of Lorentzian.
- Return type:
float
- pleasant.fitting.max_within_fwhm(x, y, x_c, fwhm)¶
Determine maximum of an array y within a window around a value of an array x.
- Parameters:
x (
ndarray) – x valuesy (
ndarray) – y valuesx_c (
float) – center around which to find the maximumfwhm (
float) – width in which to find the maximum
- Return type:
float- Returns:
maximum within fwhm or nan if empty
- pleasant.fitting.voigt_amplitude(height, sigma)¶
Amplitude of Voigt profile.
- Return type:
float
- pleasant.fitting.voigt_height(amplitude, sigma)¶
Height of Voigt profile.
- Return type:
float
- pleasant.fitting.voigt_sigma(fwhm)¶
Approximate sigma of Voigt profile.
- Return type:
float