measure_snr_profile_observed#
- madcubapy.utils.measure_snr_profile_observed(x_array, y_array, v0, fwhm, dv, rms, window_sigma_factor=3, window_selection_method='fractional')[source]#
Measure the SNR of a line by integrating the emission on the observed channels.
Note: Needs the velocity and width of a fitted gaussian line on the observed line profile to select the channels.
- Parameters:
- x_array
arrayorQuantity X axis array of the observed spectrum in velocity units.
- y_array
arrayorQuantity Y axis array of the observed spectrum.
- v0
floatorQuantity Central velocity of the fitted gaussian line.
- fwhm
floatorQuantity FWHM of the fitted gaussian line.
- dv
floatorQuantity Channel width.
- rms
floatorQuantity Measured rms on the spectral data.
- window_sigma_factor
float, default: 3 Number of sigma deviation to be used for each side of the gaussian center as the selected window.
- window_selection_method{“fractional”, “binary”}, default: “fractional”
Method for handling channels at the edge of the integration window:
‘fractional’ (Recommended): Weights boundary channels by the fraction of their width that falls inside the selected window.
‘binary’: Boolean masking; includes the full flux of any channel whose center is within the window boundaries.
- x_array
- Returns:
- snr
float Measured integrated SNR.
- snr