read_spec_harps
- popurri.spectrum.read_spec_harps(filin, kwinst='HIERARCH ESO', nord=72, readblaze=True, dirblaze=None, filblaze=None)
Read e2ds reduced spectrum flux and wavelength, and optionally the blaze.
The wavelength data is obtained from the header keywords in filin using pix2wave_echelle, pix2wave, and wpolycoeff.
The blaze is only read if readblaze is True (default). The directory containing the blaze files by default is the same as the directory where the e2ds file is (filin), but can be changed with dirblaze. The blaze file by default is obtained from the header of the e2ds file filin: ‘HIERARCH TNG DRS BLAZE FILE’, but can be changed with filblaze.
- Parameters:
- filinstr
Reduced e2ds file.
- readblazebool, default True
Whether to read the blaze or not. If False, the returned blaze b is an array full of ones of the same shape as the spectrum.
- dirblazestr, default None
Directory where the blaze file is. If None (default), it is assumed that it is in the same directory as the spectrum filin.
- filblazestr, default None
Blaze file. Use if want to obtain the blaze from a file different than the one specified in the header keyword ‘HIERARCH ESO DRS BLAZE FILE’.