Lineshapes¶
Functions used in the convolution of CARS spectrum.
Laser lineshape
Impulse spectral response function (ISRF) for the spectrometer slit
-
carspy.convol_fcn.
asym_Gaussian
(w, w0, sigma, k, a_sigma, a_k, offset, power_factor=1.0)[source]¶ Asymmetric super-Gaussian following [BLL+17].
- Parameters
- wsorted 1d array of floats
Spectral positions in wavenumber cm^(-1).
- w0float
Center of the asymmetric Gaussian function in wavenumber cm^(-1).
- sigmafloat
FWHM of the Gaussian function in wavenumber cm^(-1).
- kfloat
Controls the skewing of the asymmetry.
- a_sigma, a_kfloat
Tuning factors for sigma and k.
- offsetfloat
Background offset (from experimental spectrum).
- power_factorfloat
Power factor on the output (e.g. can be used during slit fitting).
- Returns
- 1d array of floats
Intensities of the peak-normalized asymmetric super-Gaussian over w.
-
carspy.convol_fcn.
asym_Voigt
(w, w0, sigma, k, a_sigma, a_k, sigma_L_l, sigma_L_h, offset, power_factor=1.0)[source]¶ Asymmetric super-Voigt.
Note
This is based on the super-Gaussian from [BLL+17], with additional convolution with two Lorentzian profiles to better capture slow-decaying wings in some experimental slit function
- Parameters
- wsorted 1d array of floats
Spectral positions in wavenumber cm^(-1).
- w0float
Center of the asymmetric Gaussian function in wavenumber cm^(-1).
- sigmafloat
FWHM of the Gaussian function in wavenumber cm^(-1).
- kfloat
Controls the skewing of the asymmetry.
- a_sigma, a_kfloat
Tuning factors for sigma and k.
- sigma_L_lfloat
FWHM of the Lorentzian function in wavenumber cm^(-1) for the lower half.
- sigma_L_hfloat
FWHM of the Lorentzian function in wavenumber cm^(-1) for the higher half.
- offsetfloat
Background offset.
- power_factorfloat
Power factor on the output (e.g. can be used during slit fitting).
- Returns
- 1d array of floats
Intensities of the peak-normalized asymmetric super-Gaussian over w.
-
carspy.convol_fcn.
asym_Voigt_deprecated
(w, w0, sigma_V_l, sigma_V_h, sigma_L_l, sigma_L_h, offset)[source]¶ Asymmetric Voigt profile following NRC.
Deprecated
This profile cannot capture certain slit functions with broadened Gaussian profile.
- Parameters
- wsorted 1d array of floats
Spectral positions in wavenumber cm^(-1).
- w0float
Center of the asymmetric Gaussian function in wavenumber cm^(-1).
- sigma_V_lfloat
FWHM of the Voigt function in wavenumber cm^(-1) for the lower half.
- sigma_V_hfloat
FWHM of the Voigt function in wavenumber cm^(-1) for the higher half.
- sigma_L_lfloat
FWHM of the Lorentzian function in wavenumber cm^(-1) for the lower half.
- sigma_L_hfloat
FWHM of the Lorentzian function in wavenumber cm^(-1) for the higher half.
- offsetfloat
Background offset.
- Returns
- 1d array of floats
Intensities of the peak-normalized asymmetric super-Gaussian over w.
-
carspy.convol_fcn.
gaussian_line
(w, w0, sigma)[source]¶ Generate a normalized Gaussian lineshape (integral equals to 1).
- Parameters
- wsorted 1d array of floats
Spectral positions in wavenumber cm^(-1).
- w0float
Center of the Gaussian lineshape in wavenumber cm^(-1).
- sigmafloat
FWHM of the Gaussian lineshape wavenumber cm^(-1).
- Returns
- 1d array of floats
Intensities of the normalized Gaussian lineshape over w.
-
carspy.convol_fcn.
lorentz_line
(w, w0, sigma)[source]¶ Generate a normalized Lorentzian lineshape (integral equals to 1).
- Parameters
- wsorted 1d array of floats
Spectral positions in wavenumber cm^(-1).
- w0float
Center of the Lorentzian lineshape in wavenumber cm^(-1).
- sigmafloat
FWHM of the Lorentzian lineshape wavenumber cm^(-1).
- Returns
- 1d array of floats
Intensities of the normalized Lorentzian lineshape over w.
-
carspy.convol_fcn.
slit_ISRF
(w, w0, param_1, param_2, param_3, param_4, param_5, param_6, offset, mode='sGaussian')[source]¶ Impulse spectral response function (ISRF) as the slit function.
- Parameters
- wsorted 1d array of floats
Spectral positions in wavenumber cm^(-1).
- w0float
Center of the asymmetric Gaussian function in wavenumber cm^(-1).
- param_1, param_2, param_3, param_4float
Parameters needed for the asymmetric ISRF depending on the mode.
- ‘sGaussian’:
- sigmafloat
FWHM of the Gaussian function in wavenumber cm^(-1).
- kfloat
Controls the skewing of the asymmetry.
- a_sigma, a_kfloat
Tuning factors for sigma and k.
- ‘Voigt’:
- sigma_V_lfloat
FWHM of the Voigt function in wavenumber cm^(-1) for the lower half.
- sigma_L_lfloat
FWHM of the Lorentzian function in wavenumber cm^(-1) for the lower half.
- sigma_V_hfloat
FWHM of the Voigt function in wavenumber cm^(-1) for the higher half.
- sigma_L_hfloat
FWHM of the Lorentzian function in wavenumber cm^(-1) for the higher half.
- offsetfloat
Background offset.
- mode‘sGaussian’, str, optional
Two options for the ISRF:
Asymmetric super Gaussian: ‘sGaussian’.
Asymmetric Voigt: ‘Voigt’.
- Returns
- 1d array of floats
Intensities of the peak-normalized asymmetric ISRF.
-
carspy.convol_fcn.
voigt_line
(w, w0, sigma_V, sigma_L)[source]¶ Generate an approximated Voigt lineshape following [Whi68].
- Parameters
- w1d array of floats
Spectral positions in wavenumber cm^(-1).
- w0float
Center of the Lorentzian lineshape in wavenumber cm^(-1).
- sigma_Vfloat
FWHM of the Voigt lineshape wavenumber cm^(-1).
- sigma_Lfloat
FWHM of the Lorentzian lineshape wavenumber cm^(-1).
- Returns
- 1d array
Intensities of the Voigt lineshape over w.