ppcpy.retrievals.raman#
Functions
Calculate the aerosol backscatter coefficient with the Raman method. |
|
Calculate aerosol lidar ratio. |
|
Calculate uncertainty of aerosol backscatter coefficient with Monte-Carlo simulation. |
|
Retrieve the aerosol extinction coefficient with the Raman method. |
|
Smooth signal with a height-dependent window. |
- ppcpy.retrievals.raman.run_cldFreeGrps(data_cube, signal='TCor', heightFullOverlap=None, nr=False, collect_debug=True)[source]#
- ppcpy.retrievals.raman.raman_ext(height, sig, lambda_emit, lambda_Raman, alpha_molecular_elastic, alpha_molecular_Raman, number_density, angstrom, window_size, method='movingslope', MC_count=1, bg=0)[source]#
Retrieve the aerosol extinction coefficient with the Raman method.
- Parameters:
height (array_like) – Height [m].
sig (array_like) – Measured Raman signal. Unit: Photon Count.
lambda_emit (float) – Wavelength of the emitted laser beam [nm].
lambda_Raman (float) – Wavelength of Raman signal [nm].
alpha_molecular_elastic (array_like) – Molecular scattering coefficient at emitted wavelength in m^-1 sr^-1.
alpha_molecular_Raman (array_like) – Molecular scattering coefficient at Raman wavelength in m^-1 sr^-1.
number_density (array_like) – Molecular number density.
angstrom (float) – Angstrom exponent for aerosol extinction coefficient.
window_size (int) – Window size for smoothing the signal using Savitzky-Golay filter.
method (str, optional) – Method to calculate the slope of the signal. Choices: ‘movingslope’, ‘smoothing’, ‘chi2’. Default is ‘movingslope’.
MC_count (int, optional) – Number of Monte Carlo iterations. Default is 1.
bg (float, optional) – Background signal (Photon Count). Default is 0.
- Returns:
ext_aer (ndarray) – Aerosol extinction coefficient [m^-1].
ext_error (ndarray) – Error in aerosol extinction coefficient [m^-1] (only calculated for MC_count > 1).
References
Ansmann, A. et al. Independent measurement of extinction and backscatter profiles in cirrus clouds by using a combined Raman elastic-backscatter lidar. Applied Optics Vol. 31, Issue 33, pp. 7113-7131 (1992).
History#
2021-05-31: First edition by Zhenping
2025-01-05: AI supported translation
- ppcpy.retrievals.raman.raman_bsc(height, sigElastic, sigVRN2, ext_aer, angstroem, ext_mol, beta_mol, ext_mol_raman, beta_mol_inela, HRef, betaRef, window_size=40, flagSmoothBefore=True, el_lambda=None, inel_lambda=None, bgElastic=None, bgVRN2=None, sigma_ext_aer=None, sigma_angstroem=None, MC_count=3, method='monte-carlo', collect_debug=False)[source]#
Calculate uncertainty of aerosol backscatter coefficient with Monte-Carlo simulation.
- Parameters:
height (np.ndarray) – Heights in meters.
sigElastic (np.ndarray) – Elastic photon count signal.
sigVRN2 (np.ndarray) – N2 vibration rotational Raman photon count signal.
ext_aer (np.ndarray) – Aerosol extinction coefficient (m^{-1}).
angstroem (np.ndarray) – Aerosol Angstrom exponent.
ext_mol (np.ndarray) – Molecular extinction coefficient (m^{-1}).
beta_mol (np.ndarray) – Molecular backscatter coefficient (m^{-1}Sr^{-1}).
ext_mol_raman (np.ndarray) – Molecular extinction coefficient for Raman wavelength.
beta_mol_inela (np.ndarray) – Molecular backscatter coefficient for inelastic wavelength.
HRef (list or tuple) – Reference region [m].
betaRef (float) – Aerosol backscatter coefficient at the reference region.
window_size (int) – Number of bins for the sliding window for signal smoothing. Default is 40.
flagSmoothBefore (bool) – Flag to control the smoothing order. Default is True.
el_lambda (int) – Elastic wavelength in nm.
inel_lambda (int) – Inelastic wavelength in nm.
bgElastic (np.ndarray) – Background of elastic signal.
bgVRN2 (np.ndarray) – Background of N2 vibration rotational signal.
sigma_ext_aer (np.ndarray) – Uncertainty of aerosol extinction coefficient (m^{-1}).
sigma_angstroem (np.ndarray) – Uncertainty of Angstrom exponent.
MC_count (int or list) – Samples for each error source. Default is 3.
method (str) – Computational method (‘monte-carlo’ or ‘analytical’). Default is ‘monte-carlo’.
- Returns:
Aerosol backscatter coefficient (m^{-1}Sr^{-1}). aerBscStd (np.ndarray): Uncertainty of aerosol backscatter coefficient (m^{-1}Sr^{-1}). LR (np.ndarray): Aerosol Lidar ratio.
- Return type:
beta_aer (np.ndarray)
- ppcpy.retrievals.raman.calc_raman_bsc(height, sigElastic, sigVRN2, ext_aer, angstroem, ext_mol, beta_mol, ext_mol_raman, beta_mol_inela, HRef, wavelength, betaRef, window_size=40, flagSmoothBefore=True, el_lambda=None, inel_lambda=None)[source]#
Calculate the aerosol backscatter coefficient with the Raman method.
- Parameters:
height (array) – Height in meters.
sigElastic (array) – Elastic photon count signal.
sigVRN2 (array) – N2 vibration rotational Raman photon count signal.
ext_aer (array) – Aerosol extinction coefficient in m^{-1}.
angstroem (array) – Aerosol Angstrom exponent.
ext_mol (array) – Molecular extinction coefficient in m^{-1}.
beta_mol (array) – Molecular backscatter coefficient in m^{-1}Sr^{-1}.
ext_mol_raman (array) – Molecular extinction coefficient for Raman wavelength in m^{-1}.
beta_mol_inela (array) – Molecular inelastic backscatter coefficient in m^{-1}Sr^{-1}.
HRef (list) – Reference region in meters [start, end].
wavelength (int) – Wavelength of the elastic signal in nm.
betaRef (float) – Aerosol backscatter coefficient at the reference region in m^{-1}Sr^{-1}.
window_size (int, optional) – Number of bins for the sliding window for signal smoothing. Default is 40.
flagSmoothBefore (bool, optional) – Whether to smooth the signal before or after calculating the signal ratio. Default is True.
el_lambda (int, optional) – Elastic wavelength in nm.
inel_lambda (int, optional) – Inelastic wavelength in nm.
- Returns:
beta_aer (array) – Aerosol backscatter coefficient in m^{-1}Sr^{-1}.
LR (array) – Aerosol lidar ratio.
References
Ansmann, A., et al. (1992). “Independent measurement of extinction and backscatter profiles in cirrus clouds by using a combined Raman elastic-backscatter lidar.” Applied optics 31(33): 7113-7131.
History#
2018-01-02: First edition by Zhenping.
2018-07-24: Added ext_mol_factor and ext_aer_factor for wavelength of 1064nm.
2018-09-04: Changed smoothing order for signal ridge stability.
2024-11-12: Modified by HB for consistency in 2024.
- ppcpy.retrievals.raman.smoothWin(signal, win, method='moving')[source]#
Smooth signal with a height-dependent window.
- Parameters:
signal (array) – Input signal array.
win (int or array) – Window size. Can be a fixed scalar or a variable-length array.
method (str, optional) – Smoothing method. Default is ‘moving’.
- Returns:
signalSM – Smoothed signal.
- Return type:
array
- ppcpy.retrievals.raman.lidarratio(aerExt, aerBsc, hRes=7.5, aerExtStd=None, aerBscStd=None, smoothWinExt=1, smoothWinBsc=1)[source]#
Calculate aerosol lidar ratio.
- Parameters:
aerExt (ndarray) – Aerosol extinction coefficient. (m^-1)
aerBsc (ndarray) – Aerosol backscatter coefficient. (m^-1sr^-1)
hRes (float, optional) – Vertical resolution of each height bin. (m). Default is 7.5.
aerExtStd (ndarray, optional) – Uncertainty of aerosol extinction coefficient. (m^-1)
aerBscStd (ndarray, optional) – Uncertainty of aerosol backscatter coefficient. (m^-1sr^-1)
smoothWinExt (int, optional) – Applied smooth window length for calculating aerosol extinction coefficient. Default is 1.
smoothWinBsc (int, optional) – Applied smooth window length for calculating aerosol backscatter coefficient. Default is 1.
- Returns:
aerLR (ndarray) – Aerosol lidar ratio. (sr)
effRes (float) – Effective resolution of lidar ratio. (m)
aerLRStd (ndarray) – Uncertainty of aerosol lidar ratio. (sr)
References
Mattis, I., D’Amico, G., Baars, H., Amodeo, A., Madonna, F., and Iarlori, M.: EARLINET Single Calculus Chain–technical–Part 2: Calculation of optical products, Atmospheric Measurement Techniques, 9, 3009-3029, 2016.
History#
2021-07-20: First edition by Zhenping (translated to Python)