gaincor

sofia_redux.instruments.flitecam.gaincor.gaincor(hdul)[source]

Correct flux data for gain variations.

The normalized flat field and associated error should have been previously generated and attached to the input.

Flat errors are propagated to the output error plane, assuming that flat and flux are statistically independent. Note that this may not be a correct assumption for all FLITECAM data. For example, sky files corrected with a master sky flat generated from those files will have correlated pixels. Error estimates in cases like these should be treated as suspect.

Parameters:
hdulfits.HDUList

Input data. Should have FLUX, ERROR, FLAT, and FLAT_ERROR extensions.

Returns:
fits.HDUList

Corrected data, with updated FLUX and ERROR extensions. The FLAT and FLAT_ERROR extensions are dropped.