kinextract.choose_norm_wavelength_frame
- kinextract.choose_norm_wavelength_frame(wave_raw: ndarray, cfg: FitConfig) tuple[ndarray, str][source]
Determine whether a
.normfile’s wavelength column is rest- or observed-frame, and return it converted to the frame the fit expects.Legacy
.normfiles do not consistently record which frame their wavelength column is in. This resolvescfg.norm_wave_frame:"rest": assume the wavelengths are already rest-frame (as-given)."observed": assume observed-frame and divide by1 + cfg.zgal."auto": try both and pick whichever places more samples inside the fit window[cfg.wavefitmin, cfg.wavefitmax], on the assumption that the correct frame will have the fit window well covered by data.
- Parameters:
wave_raw (ndarray) – Raw wavelength column read from the
.normfile (Å).cfg (FitConfig) – Fit configuration; supplies
norm_wave_frame,zgal,wavefitmin, andwavefitmax.
- Returns:
The wavelength array (Å) in the resolved frame, and a short human-readable description of which frame/branch was chosen (e.g.
"auto: /1+z"), used only for logging.- Return type: