is_flagged

sofia_redux.scan.flags.flag_numba_functions.is_flagged(flag_array, flag=None, exact=False)[source]

Return whether a flag array is flagged with a given flag.

Parameters:
flag_arraynumpy.ndarray (int)

An array of integer flags.

flagint, optional

The flag to check. If not supplied, any non-zero flag will be returned as a True value.

exactbool, optional

If True, a flagged result is one that exactly matches the flag. Otherwise, a flagged result is one which contains the flag.

Returns:
flaggednumpy.ndarray (bool)

A mask the same shape as flag_array where True indicates an element is flagged.