maskbp

sofia_redux.instruments.flitecam.maskbp.maskbp(hdul, cval=None, max_iter=5)[source]

Mask hot and cold bad pixels.

Parameters:
hdulfits.HDUList

Input data. Should have FLUX, ERROR, and BADMASK extensions.

cvalfloat, optional

Constant value to replace bad pixels with. If not provided, bad pixels will not be replaced.

max_iterint, optional

Number of iterations of bad pixel finding to perform.

Returns:
fits.HDUList

Masked data. BADMASK extension is updated with the new bad pixels. FLUX and ERROR extensions may be updated to replace the bad pixels, if cval is not None.