-
-
Notifications
You must be signed in to change notification settings - Fork 54
Added specific cropping unit tests #884
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
Conversation
|
Hi @nabobalis. It looks to me that the time world axis is also coupled to the celestial world axes via a common pixel axis. So in order to unambiguously determine a point in the cube associated with a time, you also have to provide a I'm not sure that there is a general solution that gets around this problem with this WCS. Alternatively, you could use the tuple(val[0] for val in cube.extra_coords.cube_wcs.world_axis_object_classes.values())is (Time, Quantity, Quantity)In that case, I think your corners would become: lower_corner = (Time("2000-01-01T15:00:00", scale="utc", format="fits"), None, None)
upper_corner = (Time("2000-01-01T20:00:00", scale="utc", format="fits"), None, None) |
|
With that change, I get: If I add another None,
In that block, the order seems to be |
3212b0b to
ec89910
Compare
DanRyanIrish
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Minor name changes to the tests to better describe what that are actually testing.
| # ['spectral_0', 'celestial_0', 'temporal_1', 'PIXEL_1'] | ||
| lower_corner = (Time("2000-01-01T15:00:00", scale="utc", format="fits"), None, None) | ||
| upper_corner = (Time("2000-01-01T20:00:00", scale="utc", format="fits"), None, None) | ||
| output = cube.crop(lower_corner, upper_corner, wcs=HighLevelWCSWrapper(cube.extra_coords.cube_wcs)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What?! You have to explicitly wrap it? That's awful.
Why can't we just support passing in cube.extra_coords here?
Also just to clarify, this is cropping just based on EC right and not also cube.wcs?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Who knows.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No description provided.