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
TUNIT1
andTUNIT2
keywords, respectively, 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, which default to Angstrom and FLAM, respectively. These are only used if
TUNIT1
andTUNIT2
keywords are not present in table (not primary) header.
- Returns:
- headerdict
Primary header only. Extension header is discarded.
- wavelengths, fluxes
Quantity
Wavelength and flux of the spectrum.