a pixel mask map is linked to every JF module, in the same way that each JF module has 3 pedestal maps and 3 gains maps
the way we do it, the map is composed of 0 (=mask) and 1 (= do not mask)
before calculating stuff for each pixel, check it isn't masked.
to create the first version of the mask, use the pedestal data files. Check that during the first 1000 frames, the gain bit of every pixel in every frame is 0. The next 1000 frames the gain bit of every pixel in every frame should be 1, the final 1000 frames the gain bit of every pixel in every frame should be 3. If this is ever not the case, mask the pixel.
later: to update the pixel mask you could think about masking pixels which have a large pedestal uncertainty
possible feature: sometimes we know we want to mask a whole chip before even looking at the data. Could this be an input parameter?
output: the calculated pixel mask map should probably be saved as an image (same as for the pedestal maps) just to check it looks sensible.
Add the possibility to mask pixels.