-
Notifications
You must be signed in to change notification settings - Fork 43
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
WATA preview images: improve scaling #1604
Comments
Comment by Bryan Hilbert on JIRA: I've been trying different options using the example file above. So far the two best results are from astropy ZScaleInterval when using a very low contrast (~0.01), and using astropy's MinMaxInterval. Those two results look very similar. I think the underlying problem is that the number of pixels with very low signal is larger than the number of pixels with very high signal. So doing a percentile clipping removes the pixels in the peak of the source, as well as some fraction of the low pixels. What's left is the wings of the PSF as well as the surrounding background pixels, all of which have fairly similar signal levels. That means the resulting image doesn't highlight the source very well. The background level is brought up into the upper range of the colorbar. |
Comment by Bryan Hilbert on JIRA: ZScaleInterval with a contrast of 0.5, and a linear scaling seems best. This matches what Explore Image defaults to. |
Comment by Bryan Hilbert on JIRA: Looks like Explore Image uses ZScaling with a contrast of 0.25 |
Comment by Bryan Hilbert on JIRA: For a future PR: jwql/jwql/utils/interactive_preview_image.py Line 678 in c4c37f5
Then, in place of matplotlib.colors.LogNorm(), use matplotlib.colors.Normalize() You shouldn't need to shift the data to make it all positive, either. Although for some reason, in my testing just now, using the unshifted data gave a different-looking image than when it was shifted. Probably just a mistake on my part. Emily Wislowski, let me know if the NIRSpec team would rather switch to a preview image that matches the image in the default Explore Image, such as: In these cases, the background is much better separated from the PSF. However, the scaling is such that you can't see what's going on inside the PSF, because it's all above the top of the pixel range. |
Issue JWQL-244 was created on JIRA by Bryan Hilbert:
Sometimes with WATA data, the default scaling isn't very good. A couple of very low and/or very high signal pixels seem to be throwing off the scaling.
Example:
https://jwql.stsci.edu/NIRSpec/jw02784001001_02101_00001_nrs1/
Maybe we need to filter these pixels, or switch to a 99% scaling or something. (Although 99% of a 32x32 box means excluding only 9 pixels.
The text was updated successfully, but these errors were encountered: