read_ascii_spec

synphot.specio.read_ascii_spec(filename, wave_unit=Unit('Angstrom'), flux_unit=Unit('FLAM'), **kwargs)[source]

Read ASCII spectrum.

ASCII table must have following columns:

  1. Wavelength data

  2. Flux data

It can have more than 2 columns but the rest is ignored. Comments are discarded.

Parameters
filenamestr or file pointer

Spectrum file name or pointer.

wave_unit, flux_unitstr or Unit

Wavelength and flux units, which default to Angstrom and FLAM, respectively.

kwargsdict

Keywords accepted by astropy.io.ascii.ui.read().

Returns
headerdict

This is just an empty dictionary, so returned values are the same as read_fits_spec().

wavelengths, fluxesQuantity

Wavelength and flux of the spectrum. They are set to ‘float64’ percision.