-
Notifications
You must be signed in to change notification settings - Fork 65
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
Invalid WCS when saving moment0 maps of non-spectral axes #111
Comments
This is a more general error with the WCS, and not just a saving issue:
|
Right... WCS doesn't like having one of its celestial axes dropped. That should probably be allowed, but I guess it may not be at a deep level? |
I think we need @mdboom's input - if we want an RA - frequency image plane (and it is genuinely aligned with RA), should that be allowed by WCS? @ChrisBeaumont - What are we doing for non-aligned axes? I think in |
For non-aligned axes, I suspect the WCS is wrong (that is, I think it just drops the integrated-over axis). A generic offset axis (or two) is probably a better idea in these cases |
That's an interesting question. I think wcslib doesn't like having a single celestial axis, because all of the projections are written assuming two, of course. You'd need to (somehow) define a constant for the missing axis, and I don't believe wcslib has a way of doing that. We could get Mark Calabretta involved in the discussion -- if you can boil this down to the minimum raw astropy.wcs calls that produces the situation, I can further convert that to C for his consideration of the problem. |
Here's a method I wrote for SunPy that adds a useless axis. It's (mostly) untested, and it's a hack that doesn't really address the underlying problem. But still:
|
The more we dig into slicing, projecting, etc., the more it appears we need to preserve the full WCS when slicing. A 1D slice should have a length-1 coordinate for each of the sliced-out coordinates, and so on. This is fine and pretty easy for slices, but nontrivial for projections (what coordinate do you use when taking the One of the main reasons I'd avoided this solution previously was the inconvenience and unexpected behavior of getting an array with shape The solution I'm proposing will solve the related issue: #367 |
Works:
Fails:
The text was updated successfully, but these errors were encountered: