Source code for pyreduce.instruments.UVES
"""
Handles instrument specific info for the UVES spectrograph
Mostly reading data from the header
"""
import logging
import os.path
from ..common import Instrument
logger = logging.getLogger(__name__)
[docs]
class UVES(Instrument):
[docs]
def get_wavecal_filename(self, header, channel, **kwargs):
"""Get the filename of the wavelength calibration config file"""
info = self.info
specifier = int(header[info["wavecal_specifier"]])
cwd = os.path.dirname(__file__)
fname = f"wavecal_{channel.lower()}_{specifier}nm_2D.npz"
fname = os.path.join(cwd, fname)
return fname
[docs]
def get_mask_filename(self, channel, **kwargs):
c = channel.lower()
fname = f"mask_{c}.fits.gz"
cwd = os.path.dirname(__file__)
fname = os.path.join(cwd, fname)
return fname