Fix scaling in WATA and MIRI TA preview images#1686
Fix scaling in WATA and MIRI TA preview images#1686mfixstsci merged 7 commits intospacetelescope:developfrom
Conversation
|
At the moment these changes are looking good. Just need to test on a greater diversity of subarray shapes and sizes. |
|
Fixed the colorbar tick marks for the linear scaling case, and tested on a few other types of files. I'm happy with this now. I think it's ready for review, merge, and then a more comprehensive test on the test server. @mfixstsci |
mfixstsci
left a comment
There was a problem hiding this comment.
Looks good to me @bhilbert4 the inline comments made it very easy to follow. Since we are dealing with preview images here, will they need to be regenerated with the new scaling?
Yep. A manual run on WATA data is needed, or I think we can simply delete the existing preview images once this is released, and the next run of the preview image generator should re-create them. |
Adjust scaling when creating preview images for NIRSpec WATA and MIRI non-full-frame TA images.
Trial and error with historical data shows that the WATA images look better when linearly scaled (rather than log). For MIRI non-full-frame TA images, it turns out that all the pixels in the subarrays were flagged as non-science. This meant there were no pixels left to use for scaling, and so scaling was falling back to a default scaling of 0 to 1. This fix instead checks for the case where all pixels are flagged as non-science, and when that happens, it declares all pixels as good for the purposes of scaling. This results in images that look decent, especially compared to the solid yellow squares we had previously.
I've also added an if statement to call the AutoMinorLocator function only when the scaling is linear. This should suppress all of the warnings that AutoMinorLocator does not work with log scaling.