hispecdrp.primitives.utils

Stellar radial-velocity and cross-correlation helpers.

Most symbols come from hispecdrp.primitives.utils.ccf; robust chunk-RV combination helpers live in hispecdrp.primitives.stellar_rv.rv_combine_utils and are re-exported here for a stable hispecdrp.primitives.utils surface.

This package surface is the public API for template CCF, mask-line CCF, chunk combination, and RVCCF preview helpers. Velocities are m s:sup:`−1` unless a function states otherwise.

Exports

CCFFitConfig

Gaussian CCF fit configuration.

MaskLines, MaskLineStyle (from hispecdrp.utils.line_mask_utils)

Tabulated line-mask container (delta / tophat geometry) and style literal. Use load() for disk masks (.mas or two-column text).

fit_ccf_rv, dv_per_pixel_m_s, continuum_normalize

Gaussian fit to a CCF, rough per-pixel Δv, optional continuum division before CCF.

masked_ccf_rv, rv_per_chunks, process_one_order_rvs, process_orders_rvs_numba_parallel, flat_chunk_echelle_orders

Log-λ weighted-covariance CCF paths (single spectrum, chunked, one order, many orders).

combine_rvs_median_mad, weighted_mean_rv

Median/MAD outlier mask and inverse-variance weighted mean on chunk RVs (implemented in hispecdrp.primitives.stellar_rv.rv_combine_utils).

resolve_mask_path, restrict_mask_to_chunk, stellar_rv_ccf_mask_lines, pixel_edges_from_wavelength

Packaged-mask resolution, chunk restriction, StellarRV line-mask inputs, pixel edges (from hispecdrp.utils.line_mask_utils).

DEFAULT_PACKAGED_LINE_MASK_BASENAME, packaged_default_line_mask_path

Packaged default delta line mask for mask_path=None (see hispecdrp/data/masks/). Optional *.tophat.mas segment masks are produced by regenerate_template_masks.py only; they are not part of the default RV API.

run_ccf_line_mask_for_fiber, build_ccf_preview_dict, doppler_paint_lanczos

Line-mask CCF driver for one fiber (StellarRVPrimitive(algorithm="ccf_line_mask")), Plotly preview payload builder, and science-matching Lanczos Doppler paint.

See hispecdrp.primitives.utils.ccf for full docstrings and references.

Modules

array_utils

Generic Numba / array / polynomial helpers for HISPEC DRP primitives.

ccf

Cross-correlation (CCF) and radial-velocity utilities.

cubic_spline

gaia_query

linear_interp

spectral_utils

Spectral utilities: template I/O and wavelength / velocity / pixel conversions.

stats

Robust statistics helpers used by HISPEC DRP primitives.