-
Notifications
You must be signed in to change notification settings - Fork 28
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
Use skycell WCS in outlier detection #1615
Comments
One option for this would be to read the wcs from the association data linked to the |
I don't think an option to do outlier detection for the full field of view when we're only going to resample on a skycell is valuable. Unless the code is easier for some reason I wouldn't do that. Our intent is now to populate the skycell_wcs_info in the association files that includes enough information to construct the output WCS. I think I would probably key on that information rather than doing the lookup into the tessellation file. |
Do you expect there to be data differences (different outliers detected and data differences in the resampled to skycell image) when using the skycell wcs for outlier detection? So far I'm seeing differences for the output of
I'm unsure if this is due to the skycell pixels being a different size (perhaps combined with the other resample bugs like the failure to scale intensity) or if this is caused by a different bug. If the expectation is that the resampled results should be the same with this change I'd say we resolve some of the other resample/outlier detection issues first (fillval, use code from stcal, correct intensity scale) before updating outlier detection to use the skycell wcs. |
Thanks Brett. I don't expect the results to be identical---since the exact boundaries of the pixels that are used for making the median will move, that will have to tickle some pixels with values on the boundary of being cut. But conceptually I don't see a reason to prefer whatever the default WCS is that outlier detection constructs to cover the full footprint covered by the exposures to one that matches the skycell that we eventually output. I agree that for values outside the skycells there will be big differences, and changing the behavior of the code to not compare those nonsense values (e.g., via the fill value) seems like the right decision. i.e., another option would be not to look at the parts of the exposures that land off the skycell in the blot stage. I don't think there are big savings to be had there and the fill value change seems a better idea to me---just mentioning that we don't technically even need to compute those values. |
Thanks again. I spent some more time looking at this and convinced myself that a change in outliers within the bounding box is also not unexpected. Since the skycell wcs differs from the combined wcs (in pixel size, bounding box, etc) the computed median differs (leading to different outliers). We have quite a few resample changes and one way to queue these up would be:
|
@nden mentioned it may be useful to end users (and local runs) to continue to run outlier detection and resample using the combined wcs. I can think of 2 options for handling this:
The spec update seems most convenient for quick testing (doesn't require file changes) but does require updating several specs and we'll want to define what happens if a user says |
I am also in favor of this being controlled by a parameter. Is the name |
Exactly, thanks. I agree with everything you say re the median changing due to the exact boundaries of the output pixels. I'm fine with use_skycell_wcs or resample_on_skycell (though the latter feels a little more awkward in outlier detection). One thing I would add though is that we added the skycell_wcs_info to the association in order to avoid needing the 'target' name trigger any special behavior. Relying on skycell_wcs_info makes it easier for people to define their own skycells without needing to download and use our patch table, etc.. So I would try to have special behavior trigger on skycell_wcs_info rather than target. If someone includes skycell_wcs_info, it does seem to me that they probably want to use it for both outlier detection and resample. But as long as this parameter is default True, fine with me. |
Issue RCAL-1016 was created on JIRA by Eddie Schlafly:
For Roman our usual mode for creating coadded products is to create them on a common set of predefined WCSes which we call skycells. We support coadding onto skycells in resample but we do not currently support it in outlier detection. This means that we make larger coadds during outlier detection than we need, and detect outliers in those larger coadds, and then throw away those computed values.
We should instead use the skycell WCSes during the outlier detection step as well in order to save time and memory. An argument could be made that we should in fact use a WCS that is one or two pixels larger than the skycell WCS so that we guarantee the exact same treatment of outliers in the boundary region between skycells. If that's easy to support, we should do it, but if it's annoying, we should pass for now since it's certainly harder to think about.
The text was updated successfully, but these errors were encountered: