Hi all,
I have a question regarding the colors of the masks when using afwDisplay
(this is v20.0.0).
Here are the few lines used for display.
afwDisplay.setDefaultBackend('matplotlib')
display = afwDisplay.Display(frame=9, backend='matplotlib', title='Difference')
display.scale("linear", "zscale")
display.mtv(imagediff)
display.show_colorbar()
plt.show()
where imagediff
is a cutout of an image difference (deepDiff_differenceExp_sub
) performed by @mchbib on HSC data.
Here is a screenshot:
This is using %matplotlib ipympl
so that when I put my mouse cursor on the lower left, I can see that the masks in pink-ish are INEXACT_PSF and REJECTED.
But if I want to actually check what the colors are supposed to be, using
for maskName, maskBit in imagediff.mask.getMaskPlaneDict().items(): print('{}: {}'.format(maskName, display.getMaskPlaneColor(maskName)))
as suggested here, I get:
BRIGHT_OBJECT: None
CLIPPED: None
CR: magenta
CROSSTALK: None
DETECTED: blue
DETECTED_NEGATIVE: cyan
EDGE: yellow
FAKE: None
INEXACT_PSF: None
INTRP: green
NOT_DEBLENDED: None
NO_DATA: orange
REJECTED: None
SAT: green
SENSOR_EDGE: None
SUSPECT: yellow
UNMASKEDNAN: None
so REJECTED
and INEXACT_PSF
appear as None
.
Is this some kind of bug?
Best,
Ben