kinextract.read_template_xy
- kinextract.read_template_xy(path: str) tuple[ndarray, ndarray, ndarray | None][source]
Load a single stellar/SSP template spectrum file.
- Parameters:
path (str) – Path to a whitespace-delimited template file with 2 columns (wavelength, flux) or 3 columns (wavelength, flux, flux_err). Files may be
.txt(already-normalized flux) or.dat(physical flux units, e.g. MUSE spectral library files; these are median-normalized downstream bykinextract.templates.build_template_matrix_fortran()).- Returns:
wave (ndarray) – Template wavelength grid, in Angstroms.
flux (ndarray) – Template flux values.
flux_err (ndarray or None) – Per-pixel template flux uncertainty, or None if the file has no third column.