apply_region_mask

grizli.prep.apply_region_mask(flt_file, dq_value=1024, verbose=True)[source]

Apply DQ mask from a DS9 region file

Parameters
flt_filestr

Filename of a FLT exposure. The function searches for region files with filenames like

>>> mask_file = flt_file.replace('_flt.fits','.{ext}.mask.reg')

where {ext} is an integer referring to the SCI extension in the FLT file (1 for WFC3/IR, 1 or 2 for ACS/WFC and WFC3/UVIS).

dq_valueint

DQ bit to flip for affected pixels

Returns
Nothing, but updates the DQ extension of flt_file if a mask file
is found