5.30. flat_correction

Performs flat correction on the FITS data.


FitsArray.flat_correction(self, master_flat: Fits, output: str | None = None, force: bool = False) Self

Performs flat correction on the FITS data.

Parameters

master_flatFits

The flat file to be used for correction.

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 flat-corrected FitsArray object.


5.30.1. Example:

from myraflib import FitsArray, Fits
import math

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

flat_corrected_fa = fa.flat_correction(master_flat)