mod_dq_bits

grizli.utils.mod_dq_bits(value, okbits=608, badbits=0, verbose=False)[source]

Modify bit flags from a DQ array

For WFC3/IR, the following DQ bits can usually be unset:

32, 64: these pixels usually seem OK

512: blobs not relevant for grism exposures

Parameters
valueint, ndarray

Input DQ value

okbitsint

Bits to unset

badbitsint

Bits to set

verbosebool

Print some information

Returns
new_valueint, ndarray