hispecdrp.primitives.utils.ccf.ccf_gauss_fit_numba
Numba-parallel Gaussian (+ fixed baseline) CCF centroid for line-mask chunk RVs.
Replaces the serial Astropy fit_ccf_rv()
loop in rv_per_chunks_line_mask() with a
prange over chunks. Model matches the line-mask stored (peak-up) convention:
fixed baseline + positive-amplitude Gaussian; two velocity passes; optional
inverse-variance weights from ccf_err.
Functions
|
|
|
Peak-up CCF row → |
|
|
|
Weighted LM for |
|
|
|
Median of finite |
|
|
|
|
|
Fit Gaussian in |
|
Parallel Gaussian centroids for peak-up CCF rows. |
- fit_ccf_rv_rows_numba(v_grid_m_s, ccf_rows, *, ccf_err_rows=None, gaussian_seed_mean_m_s=None, pass1_half_width_m_s=800000.0, pass2_half_width_m_s=120000.0, initial_stddev_m_s=5000.0, levmar_maxiter=450, min_points=5, max_cores=None, pix_size_m_s=None)[source]
Parallel Gaussian centroids for peak-up CCF rows.
- Parameters:
v_grid_m_s – Shared velocity grid (m s⁻¹), shape
(n_v,).ccf_rows – CCF values, shape
(n_chunk, n_v), peak-up (absorption as positive lobe).ccf_err_rows – Optional per-sample σ, same shape as
ccf_rows.gaussian_seed_mean_m_s – Optional discrete-peak seed center (m s⁻¹).
pix_size_m_s – Detector pixel width in velocity (m s⁻¹). When set,
σ_μis inflated by√nspwithnsp = max(pix_size / Δv_grid, 1)so oversampled CCF bins that share pixels are not treated as independent.max_cores – Numba thread cap for
prange.
- Returns:
rv, rv_err, ok – Arrays length
n_chunk(okis int64 0/1).