Masking can also be applied to more complex expressions and it is recursive. Mask Handling As explained in the previous subsections, lattices can have a mask. A pixel is bad when the image has a mask and when the mask value for that pixel is False. Functions like max ignore the bad pixels. Note that in a MeasurementSet a False mask value indicates a good visibility.
Image masks are combined and propagated throughout an expression.
E.g. when two lattices are added, the mask of the result is formed by and-ing the masks of the two lattices. That is, the resultant mask is True where the mask of lattice one is true AND the mask of lattice 2 is True. Otherwise, the resultant mask is False. In general the mask of a subexpression is formed by and-ing the masks of the operands. For example, suppose lat1 and lat2 each have a mask.