hispecdrp.primitives.utils.ccf.ccf_spline
Cubic-spline mask CCF utilities (point-sampled delta lines on the spectrum).
Functions
|
Numba core for |
|
|
|
Linearly interpolate variance at |
|
True if the line is a valid CCF contributor at |
|
Cross-correlation of a spectrum with delta-function mask lines via cubic spline sampling. |
- compute_ccf_spline(wave, spec, spec_err, spec_dq, line_centers, line_weights, vel_window=None, vel_step=None, zb=0.0, vsys=0.0, use_variance=True, vel_grid=None, line_set_velocity=None)[source]
Cross-correlation of a spectrum with delta-function mask lines via cubic spline sampling.
Each mask line is a rest-frame delta with weight
line_weights[j]. At trial velocityvthe line center is Doppler-mapped as \(\lambda_{\rm obs} = \lambda_{\rm rest}(1+v/c)/(1+z_b)\) and the spectrum flux is read by not-a-knot cubic spline interpolation on good pixels (dq=0).When
line_set_velocityis finite (the input / prior RV; use0when the caller wants rest-frame membership), the contributing line set is frozen there and \(W=\sum_j w_j\) over that set is fixed for the whole velocity grid. Members of the set that fall outside at another trialvcontribute \(F=0\) rather than being dropped fromW. Whenline_set_velocityisNone, membership andWare recomputed at each trial velocity (needed for broad scout searches before a prior RV exists).The CCF is \(\sum_j w_j F_j\,/\,W\) (catalog weights; not inverse-variance reweighted), with \(\sigma_{\mathrm{CCF}}=\sqrt{\sum_j w_j^2\sigma_j^2}/W\) when
use_varianceis True.