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_flatSelfThe master flat file to be used for the correction.
outputstr, optionalThe path where the flat-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 flat-corrected
Fitsobject.
Raises
OverCorrectionIf the
Fitsobject is already flat corrected andforceisFalse.
4.28.1. Example:¶
from myraflib import Fits
fits = Fits.sample()
master_flat = Fits.sample()
flat_corrected = fits.flat_correction(master_flat)