The following information is taken from Waters et al. (2016), which should be cited appropriately.
All images, warps and stacks, have Pixel Flags set for each individual pixel. This information is saved in a mask image, which in general has the suffix .mask.fits(.fz) and mk.fits(.fz) for warp and stack images, respectively.
Contents
Description
Mask images define which pixels in warp and stack images are valid and which should be ignored. They are represented as 16-bit integer bitmasks, where a value of 0 represents a valid pixel with no flagged conditions and nonzero values represent different issues pixels may have. This provides the ability to accept or ignore the mask depending on the circumstance.
There are both static masks, which identify known defects such as pixels that respond poorly and are applied to all images processed, and dynamic masks, which are generated per image and calculated based on objects within each field. See PS1 Pixel flags in Image Table for a full list of potential flags, including masking for detector features, invalid signal ranges, non-astronomical structures, and pixels badly affected by convolutions and interpolations.
Mask images are constructed automatically by the Pan-STARRS Image Processing Pipeline (IPP) photometry software, psphot. Psphot accepts masked pixels as either "bad", which are fully excluded from measurements, or "suspect", which may be usable in some contexts although they may have contaminated or biased signals. Within candidate PSF source model fits, the number of unmasked pixels within mask images are summed and weighted by the normalized PSF model. The quantity PSF_QF ranges from 0.0 (completely masked) to 1.0 (fully unmasked) and is used within the IPP to filter out detections which aren't reliable due to masking. Quality cutoffs typically lies between a PSF_QF $\geq$ 0.85 - 0.95 , depending on the desired balance between completeness and measurement quality. See Magnier et al. (2016) for more details about the psphot software and masking procedure.
![]()
![]()
Example of a single warp mask image for a single skycell of exposure o5104g0266o (top) and a stack mask image of stack_id 3956997 (bottom) which show where defects were removed from the original image, as seen in Waters et al. (2016). The stack is largely unmasked after combining inputs, primarily remaining on and around the brightest objects in the field.