calculate_red_blue_asymmetry#
- irispy.utils.red_blue.calculate_red_blue_asymmetry(
- cube,
- *,
- rest_wavelength=None,
- velocity_range=<Quantity [ 50.,
- 150.] km / s>,
- dv=<Quantity 10. km / s>,
- continuum_windows=None,
- degree=3,
- min_intensity=None,
- saturation_limit=None,
- return_profiles=True,
Calculate red-blue asymmetry maps from a spectrogram cube.
The asymmetry is computed for each spatial pixel as \((I_R - I_B) / I_p\), where
I_RandI_Bare mean intensities in matching red and blue velocity ranges andI_pis the interpolated peak intensity.- Parameters:
cube (
irispy.spectrograph.SpectrogramCube) – Input spectrogram cube.rest_wavelength (
astropy.units.Quantity, optional) – Rest wavelength used to convert the spectral axis to Doppler velocity. If omitted, read fromcube.meta.rest_wavelength(requires anSGMetainstance with aTWAVE<n>FITS keyword).velocity_range (
astropy.units.Quantity, optional) – Two positive velocities defining the wing range to average.dv (
astropy.units.Quantity, optional) – Velocity spacing for the interpolated profile.continuum_windows (
astropy.units.Quantity, optional) – One or more wavelength windows used to estimate and subtract a continuum.degree (
int, optional) – Spline degree forscipy.interpolate.make_interp_spline.min_intensity (
floatorastropy.units.Quantity, optional) – Minimum peak intensity required for a pixel to be processed. Pixels below this threshold are assigned quality flagLOW_SIGNAL.saturation_limit (
floatorastropy.units.Quantity, optional) – Maximum allowed peak intensity. Pixels above this value are assigned quality flagSATURATED.return_profiles (
bool, optional) – IfTrue, include 3D"observed_profile"and"interpolated_profile"cubes in the output.
- Returns:
Always contains
"red_blue_asymmetry"and"quality"2D maps."red_blue_asymmetry_error"is added when the input cube has uncertainty."observed_profile"and"interpolated_profile"3D cubes are added whenreturn_profiles=True. The interpolated profile velocity axis is peak-centred; the observed profile velocity axis is relative torest_wavelength.- Return type: