kinextract.read_norm_spectrum

kinextract.read_norm_spectrum(path: str) dict[source]

Read a pre-normalized .norm spectrum file.

.norm files store a continuum-normalized spectrum (flux divided by an independently-derived continuum estimate) alongside the original un-normalized flux and continuum, so the LOSVD fit can skip continuum-cofitting and instead work directly with normalized flux (prenormalized=True in kinextract.state.FitState).

Parameters:

path (str) – Path to the .norm file. Must have at least 3 whitespace-delimited columns; a 7-column extended format additionally carries the original flux/error and continuum/error.

Returns:

Dictionary with keys "wavelength", "normflux", "normflux_err" (always present), and "orig_flux", "orig_flux_err", "continuum", "continuum_err" (present only when the file has 7+ columns; otherwise None).

Return type:

dict