4.27. dark_correction

Applies dark correction to the FITS data using a master dark file.


Fits.dark_correction(master_dark: Self, exposure=None, output=None, override=False, force=False) Self

Applies dark correction to the FITS data using a master dark file.

Parameters

master_darkSelf

The master dark file to be used for the correction.

exposurestr, optional

The header card containing the exposure time (exptime).

outputstr, optional

The path where the dark-corrected FITS file will be saved.

overridebool, optional, default=False

If True, will overwrite the output path if a file already exists.

forcebool, optional, default=False

Flag to indicate overcorrection.

Returns

Fits

A dark-corrected Fits object.

Raises

OverCorrection

If the Fits object is already dark corrected and force is False.


4.27.1. Example:

from myraflib import Fits

fits = Fits.sample()
master_dark = Fits.sample()

dark_corrected = fits.dark_correction(master_dark)