In practice, the DICHROIC REFLECTION and WINDOW REFLECTION flags are
the only flags that one should always select against as these could
lead to seriously corrupt fluxes.


 Flag name   |   Bit   | Flag_N value |   Meaning                                 
             | (LSB=1) |  (base 10)   |                                           
 ------------|---------|----------------------------------------------------------
 Edge        |    1    |   1          | Detector bevel edge reflection (NUV only) 
 ------------|---------|----------------------------------------------------------
 Window      |    2    |   2          | Detector window reflection (NUV only)     
 ------------|---------|----------------------------------------------------------
 Dichroic    |    3    |   4          | Dichroic reflection                       
 ------------|---------|----------------------------------------------------------
 Varpix      |    4    |   8          | Varible pixel based on time slices.
 ------------|---------|----------------------------------------------------------
 Brtedge     |    5    |  16          | Bright star near edge of field (NUV only).
             |         |              |  Just like #1 but with a higher count rate 
             |         |              |  requirement (about 10 cps) on the          
             |         |              |  generating star. Cuts down on false       
             |         |              |  positives at the cost of a higher false   
             |         |              |  negative rate.                            
 ------------|---------|----------------------------------------------------------
 Rim         |    6    |  32          | Detector rim (annulus) proximity          
             |         |              |    (>0.6 deg > from FOV center).             
 ------------|---------|----------------------------------------------------------
 Dimask      |    7    |  64          | Dichroic reflection artifact mask flag.   
             |         |              |    Used only when a coadd has enough visits  
             |         |              |    at enough position angles that masking    
             |         |              |    the dichroic reflection doesn't decrease  
             |         |              |    flux by more than 1/3.                    
 ------------|---------|----------------------------------------------------------
 Varmask     |    8    | 128          | Masked pixel determined by varpix.        
 ------------|---------|----------------------------------------------------------
 Hotmask     |    9    | 256          | Masked detector hotspots.



The artifact flags are bitwise-encoded unsigned integers, each of
which is the bitwise logical 'or' of some or none of the possible
flags. The flags are applied to regions of the image derived entirely
from geometry based on knowledge of the detector's orientation and
(for some flags) an a priori estimate of the NUV/FUV brightness of
known stars. Source brightness criteria for flagging are generous,
meaning that false-positives, especially for 'edge' flags, are common.
False-negatives are much rarer, but definitely occur with some
regularity.

As an example, if pixel N for an image is overlayed by an edge
reflection region and is in the rim region (i.e. near the detector
edge), its value is:

Flag(N) = 2^(1 - 1) = 1 (edge condition)

or 2^(6 - 1) = 32 (rim condition)

1 + 32 = 33 (bit coded value for both conditions)