reduction.preproc.flatcor

reduction.preproc.flatcor(
    ccd,
    mflat=None,
    mflatpath=None,
    flat_mask=0,
    flat_fill=1,
    copy=True,
    flat_norm_value=1,
    verbose=1,
)

Divide by a master flat frame.

Parameters

ccd : ~astropy.nddata.CCDData

CCD image to correct.

mflat : ~astropy.nddata.CCDData or ~numpy.ndarray = None

Master flat frame. Default: None.

mflatpath : path - like = None

Path to the master flat frame. Default: None.

flat_mask : numeric, ~numpy.ndarray, or None = 0

Pixels replaced by flat_fill. For a numeric value, pixels with mflat < flat_mask are selected. Skipped when None. Default: 0.

flat_fill : numeric = 1

Value used for selected flat pixels. Default: 1.

copy : bool = True

Return a copy when True; when False, modify the input in place. The latter is slightly faster and uses less memory. Default: True.

flat_norm_value : numeric or None = 1

If None, divide the flat by its mean; otherwise divide it by this value before correction. Default: 1.

verbose : int = 1

Header logging level. Default: 1.

Returns

: ~astropy.nddata.CCDData

Flat-corrected CCD. When both master inputs are None, this is an unchanged copy or the original object according to copy.