-
Notifications
You must be signed in to change notification settings - Fork 76
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
Ensure aperture is correct when images linked by WCS #2139
Comments
As a test, I did the following in two separate sessions. In the
Session 1I only load image 2 so that it is the reference image. I draw Subsets as such and calculate aperture photometry for Subset 1 (red) while using Subset 2 (green) to estimate the background: Session 2I load both images 1 and 2, so now image 2 is not the reference image. I link them by WCS and draw what appear to be the same subsets as Session 1 above. However, this time, subsets are actually defined on image 1 that is twice the pixel dimension of image 2. Since we currently grab just the parameters defined in pixel space, while we adjust for WCS dithering for its center, the subset radius on image 2 is now twice as large even though it shows otherwise on display. This is when I redraw the aperture subset with the radius defined in image 1 on yet another session with only image 2 loaded. This is what we are really measuring in this session for image 2: What does this mean?Depending on which image is the reference and their pixel and sky dimensions, aperture photometry on a non-reference image may be wrong. In the In the use case presented above, the result is that image 2 accidentally got more photons counted in the aperture sum, contradicting to how the aperture is represented in the image display.
How do we fix this?Perhaps as @bmorris3 suggested, we could use sky region under the hood, but more thoughts needed for cases like:
|
My idea for the "worst case scenario" test case:
Have them all loaded into Imviz and link by WCS. Maybe we can use photutils fake data generator to fill in a scene. But check the photutils test suite first so we can also copied over the correct answer of aperture sum. Preferably ellipse or rectangle so we can also play with theta. If we are able to define the subset in image 2 correctly, aperture sum would agree (+/- 1%?). Even if we cannot figure out a fix and has to disable aperture photometry for image 2, this test case will tell us what checks we need to implement. Maybe check the projected mask shape somehow? |
Reporter: pllim
Consider the following use case: Load two images in Imviz and link them by WCS. The second image has different resolution (e.g., covering the same area in sky but with twice as many pixels) or has different sky orientation.
Do the Subsets (circle, ellipse, rectangle) give correct answers when applied to the second (non-reference) image? If not, how do we fix this (a rectangle might not even be a rectangle anymore when projected on the second image)? If there is no easy fix, should we disable aperture photometry for non-reference images?
To test the seriousness of this situation, measure the correct answers first by loading only the second image in an Imviz session (maybe start with Circle, the easiest of the shapes) and run some aperture photometry. Then draw what you think is the same circle but now with this image as a non-reference image (the reference image should have different sky resolution to test this). Rerun the aperture photometry. Do the aperture sums agree within uncertainty?
The JWST images in the Imviz example notebook might be a good start, as they have different sky resolutions, I think.
🐱
Blocked by
DISCLAIMER: This issue was autocreated by the Jdaviz Issue Creation Bot on behalf of the reporter. If any information is incorrect, please contact Duy Nguyen
The text was updated successfully, but these errors were encountered: