calculate_red_blue_asymmetry#
- irispy.utils.red_blue.calculate_red_blue_asymmetry(
- cube,
- *,
- rest_wavelength,
- velocity_range=<Quantity [ 50.,
- 150.] km / s>,
- velocity_window=None,
- fit_window=None,
- dv=<Quantity 10. km / s>,
- center_on_peak=True,
- continuum_windows=None,
- uncertainty=None,
- interpolation_kind='cubic',
- mask_negative=True,
- 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) – Rest wavelength used to convert the spectral axis to Doppler velocity.velocity_range (
astropy.units.Quantity, optional) – Two positive velocities defining the wing range to average.velocity_window (
astropy.units.Quantity, optional) – Symmetric interpolation window about zero velocity. Defaults to the high end ofvelocity_rangeplus 50 km/s.fit_window (
astropy.units.Quantity, optional) – Velocity half-width used to crop the source profile before interpolation. Defaults to the high end ofvelocity_rangeplus 100 km/s.dv (
astropy.units.Quantity, optional) – Velocity spacing for the interpolated profile.center_on_peak (
bool, optional) – IfTrue, shift each profile so its peak lies at zero velocity before sampling the wings.continuum_windows (
astropy.units.Quantity, optional) – One or more wavelength windows used to estimate and subtract a continuum.uncertainty (
astropy.units.Quantity, optional) – Per-bin intensity uncertainty. If omitted,cube.uncertaintyis used when available.interpolation_kind ({“linear”, “quadratic”, “cubic”} or
int, optional) – Spline degree used byscipy.interpolate.make_interp_spline.mask_negative (
bool, optional) – IfTrue, negative intensities are set to NaN before computing moments.min_intensity (
floatorastropy.units.Quantity, optional) – Minimum peak intensity required for a pixel to be processed. Pixels with a peak below this threshold are skipped and assigned quality flagLOW_SIGNAL.saturation_limit (
floatorastropy.units.Quantity, optional) – Maximum allowed peak intensity. Pixels where the peak exceeds this value are treated as saturated, skipped, and assigned quality flagSATURATED.return_profiles (
bool, optional) – IfTrue, include plot-ready 3D"observed_profile"and"interpolated_profile"cubes in the output. Set toFalseto reduce peak memory use when only the 2D maps are needed.
- Returns:
Collection with 2D maps. When
return_profiles=True, the collection also includes plot-ready 3D"observed_profile"and"interpolated_profile"SpectrogramCubeinstances. The"quality"cube stores per-pixel integer flags described byirispy.utils.red_blue.RBAQualityFlag.- Return type: