read_spec

synphot.specio.read_spec(filename, fname='', **kwargs)[source]

Read FITS or ASCII spectrum.

Parameters
filenamestr or file pointer

Spectrum file name or pointer.

fnamestr

Filename. This is only used if filename is a pointer.

kwargsdict

Keywords acceptable by read_fits_spec() (if FITS) or read_ascii_spec() (if ASCII).

Returns
headerdict

Metadata.

wavelengths, fluxesQuantity

Wavelength and flux of the spectrum.

Raises
synphot.exceptions.SynphotError

Read failed.