Skip to content

ccf_bisector

Bisector of a CCF (or one line) and the Queloz et al. 2001 Bisector Inverse Slope.

Category Stellar activity
Backend numpy - implemented here on top of numpy primitives
Version 2.0.0
Reads -
Writes metrics.bis_kms, metrics.bisector_span_kms, metrics.bisector_v_top_kms, metrics.bisector_v_bottom_kms, metrics.bisector_depth, extras.ccf_bisector

Reads ctx.extras['ccf'] as written by cross_correlate_rv ({'lags_kms', 'ccf'}) — a Pearson peak whose baseline is the median of the outer baseline_fraction of the lag range on each side — or, when line_center_angstrom is given, one line of ctx.spectrum within ± window_angstrom converted to v = c·(λ − λ0)/λ0 with a straight continuum through the outer continuum_fraction of the window (absorption or emission, whichever excursion is larger). The depth profile runs from 0 (continuum) to 1 (core) ; the bisector is sampled on n_levels equally spaced depths in (0, 1) and stored in extras['ccf_bisector'] = {'depth', 'velocity_kms', 'source', ...} (None where a wing does not reach the level). bis_kms = mean bisector velocity over top_depth_range minus mean over bottom_depth_range (Queloz et al. 2001 : 10–40 % and 55–90 %) ; at least 3 valid levels are required in each zone, and the top_depth_range[0] level must be crossed on both wings inside the region excluded from the continuum / baseline anchors (fails when the wings do not reach the continuum inside the window). bisector_span_kms = v_bis(top_depth_range[0]) − v_bis(bottom_depth_range[1]) at the nearest sampled levels (Gray's velocity span between fixed depths). The measurement needs the profile sampled with at least ~10 points across the line (a cross_correlate_rv CCF at n_grid=4096 on 4000–7000 Å has 41 km/s bins : keep its default n_grid=None, which follows the native sampling) and a S/N high enough that the bisector scatter (≈ noise / slope of the wings) is below the effect sought. v2.0.0: in line mode masked samples (Spectrum1D.mask) are ignored — dropped like non-finite ones before the continuum fit and the bisection.

Parameters

Parameter Default Required Description
line_center_angstrom None - Rest-frame centre (Å) of a single line of ctx.spectrum to bisect. None (default) analyses the CCF in ctx.extras instead.
window_angstrom 5.0 - Half-width (Å) of the line window on each side of the centre.
continuum_fraction 0.2 - Fraction of each window edge used to anchor the straight continuum (line mode only).
ccf_key 'ccf' - Key of the CCF dict in ctx.extras (cross_correlate_rv writes 'ccf').
baseline_fraction 0.2 - Fraction of the lag range, at each end, whose median defines the CCF baseline (CCF mode only).
n_levels 99 - Number of equally spaced depth levels in (0, 1) at which to bisect.
top_depth_range None - [lo, hi] depth fractions of the 'top' zone ; default [0.10, 0.40] (Queloz et al. 2001).
bottom_depth_range None - [lo, hi] depth fractions of the 'bottom' zone ; default [0.55, 0.90] (Queloz et al. 2001).

Use it

from spectro_kernel import run_algorithm

output = run_algorithm("ccf_bisector", ctx, {
    "line_center_angstrom": None,
    "window_angstrom": 5.0,
    "continuum_fraction": 0.2,
    "ccf_key": "ccf",
    "baseline_fraction": 0.2,
    "n_levels": 99,
    "top_depth_range": None,
    "bottom_depth_range": None
})
spectro run ccf_bisector --input spectrum.fits \
  --param line_center_angstrom=none \
  --param window_angstrom=5.0 \
  --param continuum_fraction=0.2 \
  --param ccf_key=ccf \
  --param baseline_fraction=0.2 \
  --param n_levels=99 \
  --param top_depth_range=none \
  --param bottom_depth_range=none
{
  "tool": "ccf_bisector",
  "arguments": {
    "session_id": "<session_id>",
    "params": {
      "line_center_angstrom": null,
      "window_angstrom": 5.0,
      "continuum_fraction": 0.2,
      "ccf_key": "ccf",
      "baseline_fraction": 0.2,
      "n_levels": 99,
      "top_depth_range": null,
      "bottom_depth_range": null
    }
  }
}

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

References

  • Queloz et al. 2001, A&A 379, 279 — bisector inverse slope BIS = v_top(10–40 % depth) − v_bottom(55–90 % depth) of the CCF.
  • Toner & Gray 1988, ApJ 334, 1008 — bisector by interpolating both wings at each flux level.
  • Gray 2005, The Observation and Analysis of Stellar Photospheres, 3rd ed., Cambridge UP — ch. 17, line bisectors and velocity span.