reduction.preproc.frincor

reduction.preproc.frincor(
    ccd,
    mfrin,
    mfrinpath=None,
    fringe_scale=None,
    fringe_scale_region=None,
    fringe_scale_kw=None,
    exptime_key='EXPTIME',
    exptime_data=None,
    exptime_frin=None,
    copy=True,
    verbose=1,
)

Subtract a master fringe frame, optionally scaled to the image.

Parameters

ccd : ~astropy.nddata.CCDData

CCD image to correct.

mfrin : ~astropy.nddata.CCDData or ~numpy.ndarray or None

Fringe frame, or None when mfrinpath supplies it. Default: None.

mfrinpath : path - like = None

Path to the fringe frame. Default: None.

fringe_scale : numeric, ~numpy.ndarray, callable, str, or None = None

Scale applied before subtraction. A number or array is multiplied directly. A callable receives image[fringe_scale_region] / fringe[fringe_scale_region] and fringe_scale_kw. "exp", "exposure", and "exptime" use exposure times. None leaves the fringe unchanged. Default: None.

fringe_scale_region : ~numpy.ndarray or str = None

Boolean mask or FITS-style section used to estimate a callable scale. An array is converted to boolean. Default: None (use all pixels).

fringe_scale_kw : dict = None

Keywords passed to a callable fringe_scale. Default: None (treated as {}).

exptime_key : str = 'EXPTIME'

Header keyword for exposure time. Used only for exposure scaling. Default: "EXPTIME".

exptime_data : numeric or None = None

Exposure times of the data and fringe frame in the same unit. Missing values use header.get(exptime_key, 1). Used only for exposure scaling. Default: None.

exptime_frin : numeric or None = None

Exposure times of the data and fringe frame in the same unit. Missing values use header.get(exptime_key, 1). Used only for exposure scaling. Default: None.

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.

verbose : int = 1

Header logging level. Default: 1.

Returns

: ~astropy.nddata.CCDData

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