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,
)[source]#

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_R and I_B are mean intensities in matching red and blue velocity ranges and I_p is 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 of velocity_range plus 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 of velocity_range plus 100 km/s.

  • dv (astropy.units.Quantity, optional) – Velocity spacing for the interpolated profile.

  • center_on_peak (bool, optional) – If True, 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.uncertainty is used when available.

  • interpolation_kind ({“linear”, “quadratic”, “cubic”} or int, optional) – Spline degree used by scipy.interpolate.make_interp_spline.

  • mask_negative (bool, optional) – If True, negative intensities are set to NaN before computing moments.

  • min_intensity (float or astropy.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 flag LOW_SIGNAL.

  • saturation_limit (float or astropy.units.Quantity, optional) – Maximum allowed peak intensity. Pixels where the peak exceeds this value are treated as saturated, skipped, and assigned quality flag SATURATED.

  • return_profiles (bool, optional) – If True, include plot-ready 3D "observed_profile" and "interpolated_profile" cubes in the output. Set to False to 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" SpectrogramCube instances. The "quality" cube stores per-pixel integer flags described by irispy.utils.red_blue.RBAQualityFlag.

Return type:

irispy.spectrograph.RasterCollection