Skip to content

vr_ratio

Violet/Red intensity ratio of a double-peaked emission line.

Category Line fitting
Backend scipy - implemented here on top of scipy primitives
Version 1.0.1
Reads ctx.spectrum (a Spectrum1D)
Writes metrics.vr_ratio, metrics.vr_ratio_minus1, metrics.v_velocity_kms, metrics.r_velocity_kms, metrics.peak_separation_kms, metrics.central_depth, metrics.fwhm_aa, metrics.single_peaked, metrics.v_intensity, metrics.r_intensity, metrics.line_center_aa, extras.vr_result

Continuum from window-edge medians (mean of the two edge medians, edge = max(3, 0.1 · n)). Detection on the normalised flux with scipy.signal.find_peaks(prominence=min_prominence), restricted to ±0.7 · window around the centre. Returns single_peaked=True with vr_ratio=None when only one side has a peak.

Parameters

Parameter Default Required Description
line_center_aa 6562.82 - Rest wavelength (Å) of the line centre.
window_half_width_aa 15.0 - Half-width (Å) of the analysis window around the centre.
min_prominence 0.05 - Peak-detection prominence on the normalised flux (find_peaks).

Use it

from spectro_kernel import run_algorithm

output = run_algorithm("vr_ratio", ctx, {
    "line_center_aa": 6562.82,
    "window_half_width_aa": 15.0,
    "min_prominence": 0.05
})
spectro run vr_ratio --input spectrum.fits \
  --param line_center_aa=6562.82 \
  --param window_half_width_aa=15.0 \
  --param min_prominence=0.05
{
  "tool": "vr_ratio",
  "arguments": {
    "session_id": "<session_id>",
    "params": {
      "line_center_aa": 6562.82,
      "window_half_width_aa": 15.0,
      "min_prominence": 0.05
    }
  }
}

Every algorithm is an MCP tool of the same name; describe_algorithm returns this page's metadata as JSON.

References

  • Okazaki 1991, PASJ 43, 75 — long-term V/R variations of Be stars from global one-armed oscillations of the disc.
  • Hummel & Vrancken 2000, A&A 359, 1075 — Be-star V/R variability.
  • scipy.signal.find_peaks — prominence-thresholded peak detection.
  • compare_line_fits - Fit one spectral line with every profile in turn and pick the best one.
  • equivalent_width - Measure a line's equivalent width without assuming a profile shape.
  • fit_gaussian_line - Fit a single Gaussian (plus a linear continuum) to one spectral line.
  • fit_lorentzian_line - Fit a single Lorentzian (plus a linear continuum) to one spectral line.
  • fit_voigt_line - Fit a single Voigt profile (plus a linear continuum) to one spectral line.