sot/agasc

Fix bug in masking

Closed this issue · 0 comments

Now I understand this. There is a bug in the code:

    img_sub.mask *= MASK['mouse_bit']

The masked elements are True, so this should be (with a reminder to never use arithmetic operations on a boolean value):

    img_sub.mask |= MASK['mouse_bit']

So all of the mags are being computed with the full 8x8 image, so the bias offset effect is much larger due to the 28 edge pixels in the 8x8 readout. After fixing this bug the computed mag is 12.7, which is close enough to 12.0 that we may not need to do the bias offset computation.