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:
filename : str or file pointer

Spectrum file name or pointer.

wave_unit, flux_unit : str or Unit

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

kwargs : dict

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

Returns:
header : dict

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

wavelengths, fluxes : Quantity

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