4.28. flat_correction

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


Fits.flat_correction(master_flat: Self, output=None, override=False, force=False) Self

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

Parameters

master_flatSelf

The master flat file to be used for the correction.

outputstr, optional

The path where the flat-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 flat-corrected Fits object.

Raises

OverCorrection

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


4.28.1. Example:

from myraflib import Fits

fits = Fits.sample()
master_flat = Fits.sample()

flat_corrected = fits.flat_correction(master_flat)