get_tellcor_factor

sofia_redux.calibration.pipecal_util.get_tellcor_factor(header, config, update=False, use_wv=False)[source]

Retrieve a telluric correction factor from configuration.

The correction factor is calculated from the ratio of the R value at the reference ZA and altitude/PWV to the R value at the observed ZA and altitude/PWV. R values are calculated by pipecal.pipecal_rratio.pipecal_rratio. The returned value is intended to be multiplied into the data, in order to correct it to the reference values.

Observed values for ZA and altitude or PWV are read from the FITS header.

Parameters:
headerastropy.io.fits.header.Header

The FITS header to update.

configdict-like

Calibration configuration values, as produced by pipecal.pipecal_config.pipecal_config.

updatebool, optional

If set, calibration keywords will be updated.

use_wvbool, optional

If set, precipitable water vapor will be used as the reference value, instead of altitude.

Returns:
float

The telluric correction factor.