read_fits_spec¶
- synphot.specio.read_fits_spec(filename, ext=1, wave_col='WAVELENGTH', flux_col='FLUX', wave_unit=Unit('Angstrom'), flux_unit=Unit('FLAM'))[source]¶
Read FITS spectrum.
Wavelength and flux units are extracted from respective
TUNITn
keywords, from data table (not primary) header. If these keywords are not present, units are taken fromwave_unit
andflux_unit
instead.- Parameters:
- filenamestr or file pointer
Spectrum file name or pointer.
- ext: int
FITS extension with table data. Default is 1.
- wave_col, flux_colstr
Wavelength and flux column names (case-insensitive).
- wave_unit, flux_unitstr or
Unit
Wavelength and flux units. These are no longer used. Define your units in the respective
TUNITn
keywords in table (not primary) header.Deprecated since version 1.4.
- Returns:
- headerdict
Primary header only. Extension header is discarded.
- wavelengths, fluxes
Quantity
Wavelength and flux of the spectrum.