-
Notifications
You must be signed in to change notification settings - Fork 63
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
Spatial reproject not working for cubes with different rest frequencies #874
Comments
this appears to be a recent change in how spectral coordinate transforms are handled by astropy. I haven't found the origin of the issue. |
I'm officially endorsing the hackaround. @astrofrog do you happen to have any idea what caused this change? It was something in astropy that's getting called by reproject. The WCS is trying to convert back to frequency even though we're trying to get world coordinates in velocity, so all the hard work we did to get into matched velocity coordinates is getting undone. It's not easy to track exactly where this happens, though. |
It's probably related to the fact that reproject uses pixel_to_pixel in astropy which now uses SpectralCoord to do conversions in world coordinates for the spectral axis. I think it would be good to have the option of not converting back to frequency space though. |
I am attempting to spatially reproject one cube to another.
I am getting the following error:
The issue seems to be that reproject is trying to take the frequency space of the cubes into account when reprojecting, making the reprojected cube be full of NaNs.
A temporary fix is to make a copy of the target header and set its rest frequency to that of the cube you are trying to reproject.
The text was updated successfully, but these errors were encountered: