hispecdrp.primitives.utils.ccf.ccf_line_mask_spline
Line-mask stellar RV via cubic-spline mask CCF and calc_ccf_metrics().
Functions
|
Map |
|
Gaussian + bisector metrics on spline mask CCF rows. |
|
Fit |
|
Prominence-based peak index on |
|
Chunk RV from |
|
Metrics-window center: prominence peak, optionally recentered near |
|
Correlation-peak strength in |
|
Build |
|
Order-mean RV for a single-chunk echelle row using |
|
Velocity center from a coarse scout pass on mask CCFs. |
|
Per-chunk line-mask RV via |
- finalize_ccf_preview_dict_spline(order_slots, all_ccf_rows, v_grid, v_min, v_max, v_step, all_ccf_err_rows=None, *, gaussian_seed_mean_m_s=None, metrics_fit_half_width_m_s=None)[source]
Build
_ccf_preview_by_fiberusingcalc_ccf_metrics()per slot.Same layout as
finalize_ccf_preview_dict().
- fit_line_mask_order_mean_rv_spline(vel_grid, ccf_mean_stored, ccf_err_mean=None, *, gaussian_seed_mean_m_s=None, metrics_fit_half_width_m_s=None)[source]
Order-mean RV for a single-chunk echelle row using
calc_ccf_metrics().Returns
(rv, rv_err, used_order_mean).
- line_mask_scout_center_m_s(scout_rvs, v_grid, ccf_stored_mean)[source]
Velocity center from a coarse scout pass on mask CCFs.
Prefer the RV already measured by the scout chunk worker (Gaussian centroid after the Numba seed). That estimate is typically within a coarse-grid step of the true peak.
Do not use a global argmax on the mean stored CCF: with
LINE_MASK_CCF_STORED_NEGATED_FROM_RAWthe stored series is often entirely negative and the true alignment is a minimum of the stored values, so argmax-style scouts can land hundreds of km/s away from the real peak.Falls back to the same prominence peak used by
_fit_spline_mask_ccf_metrics(), then to a sub-pixel extremum on the stored CCF if needed.
- rv_per_chunks_line_mask_spline(wave_um, spec, spec_err, dq_bad_mask, mask_lines, *, window_size_um, v_min_m_s=-500000.0, v_max_m_s=500000.0, v_step_m_s=50.0, v_grid_m_s=None, zb=0.0, return_ccf=False, min_good_pixels=10, window_line_by_line=False, line_mask_line_chunk_v_center_m_s=None, gaussian_seed_mean_m_s=None, metrics_fit_half_width_m_s=None, line_set_velocity_m_s=None)[source]
Per-chunk line-mask RV via
compute_ccf_spline()+calc_ccf_metrics().Chunking matches
rv_per_chunks_line_mask(). Stored CCF rows followLINE_MASK_CCF_STORED_NEGATED_FROM_RAW.The spline CCF freezes its line set at
line_set_velocity_m_swhen finite; otherwise atgaussian_seed_mean_m_s, thenline_mask_line_chunk_v_center_m_s. If none of those are set (broad scout with no input RV), membership is recomputed at each trial velocity — freezing at rest with \(F=0\) for missing lines creates false CCF minima on wide grids.Returns also include per-chunk Queloz
bis/bis_err(m/s) fromCCFMetrics.