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_darkSelfThe master dark file to be used for the correction.
exposurestr, optionalThe header card containing the exposure time (exptime).
outputstr, optionalThe path where the dark-corrected FITS file will be saved.
overridebool, optional, default=FalseIf
True, will overwrite the output path if a file already exists.forcebool, optional, default=FalseFlag to indicate overcorrection.
Returns
FitsA dark-corrected
Fitsobject.
Raises
OverCorrectionIf the
Fitsobject is already dark corrected andforceisFalse.
4.27.1. Example:¶
from myraflib import Fits
fits = Fits.sample()
master_dark = Fits.sample()
dark_corrected = fits.dark_correction(master_dark)