5.29. dark_correction

Performs dark correction on the FITS data.


FitsArray.dark_correction(self, master_dark: Fits, exposure: str | None = None, output: str | None = None, force: bool = False) Self

Performs dark correction on the FITS data.

Parameters

master_darkFits

The dark file to be used for correction.

exposureOptional[str]

The header card that contains the exposure time (exptime).

outputOptional[str]

New path to save the files after correction.

forcebool, default=False

If True, forces the correction even if it results in overcorrection.

Returns

FitsArray

A dark-corrected FitsArray object.


5.29.1. Example:

from myraflib import FitsArray, Fits
import math

fa = FitsArray.sample()
master_dark = Fits.sample()

dark_corrected_fa = fa.dark_correction(master_dark)