LSSTDESC / descwl-shear-sims

simple simulations for testing weak lensing shear measurement
BSD 3-Clause "New" or "Revised" License
10 stars 9 forks source link

use addMaskPlane for BRIGHT #137

Closed esheldon closed 3 years ago

esheldon commented 3 years ago

downstream codes will need to adapt

Also we will need to add this mask plane to calexp in real data after they are read

beckermr commented 3 years ago

What is this bit for and what do you mean here?

esheldon commented 3 years ago

BRIGHT marks bright stars. It is not part of the default set of mask planes in the stack.

But you can do this once you have a MaskedImageF

masked_image = MaskedImageF(100, 100)
masked_image.mask.addMaskPlane('BRIGHT')

this will add a new possible bit for this image (9 for the current default set which goes to 8). We can get the value of BRIGHT using masked_image.mask.getPlaneBitMask('BRIGHT') when we set the mask in the sim code.

The downstream coadd code then can also use masked_image.mask.getPlaneBitMask('BRIGHT') to get the value for interpolation etc,

esheldon commented 3 years ago

For real data we will be marking BRIGHT for stars, eventually. We can follow the same procedure. We can also add STREAK etc.

beckermr commented 3 years ago

Ahh great. Thanks for the explanation!