drs_snr

raccoon.harpsutils.drs_snr(filin, ords=None, notfound=nan, ext=0)

Get the SNR of the orders in ords (e.g. from keyword ‘HIERARCH ESO DRS SPE EXT SN55’).

Work for both HARPS and HARPN observations.

Uses:
  • fitsutils.read_header

Parameters:
filinstr or astropy header object (astropy.io.fits.header.Header)

FITS file from which to read the header or astropy header object (faster if header already loaded before). If it is a header object, the parameter ext is not used.

ordslist of int, default None

Orders from which to get the SNR. If None (default), get SNR for all the orders.

notfound

Value to return if keyword not found in FITS header.

extint, default 0

Extension of the FITS from which to get the header. Only used if filin is a FITS file.

Returns:
dicdict

Dictionary with the header keywords and their values.