get_fluxcal_factor¶
- sofia_redux.calibration.pipecal_util.get_fluxcal_factor(header, config, update=False, write_history=False)[source]¶
Retrieve a flux calibration factor from configuration.
The returned factor is intended to divide raw image data in order to calibrate it to physical units (Jy/pixel). That is:
calibrated = flux / cal_factor.
The input header may be updated with FITS keywords, via
add_calfac_keys
, if desired. A history message may also be added to the header, if desired.- Parameters:
- header
astropy.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.
- write_historybool, optional
If set, and update is also True, a history message will be added to the header.
- header
- Returns:
- float, float
The calibration factor and its associated error.