-
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
RA not returned correctly for cubes with orthographic/synthesis projection #864
Comments
Could you provide the header for said file? |
Hi Adam - of course, find that attached. CARTA and astropy.wcs seem to cope with it fine. |
I think there's just a difference in convention here since the However, it might be good to move the |
We're using the lower-level routines rather than the Coordinates routines in part for performance reasons; I think there is overhead in creating a huge array of coordinates. However, we could check what the performance cost is and see if switching to @TimothyADavis Could you verify that there is a genuine offset, not just a wrap? (-164 = 196, but your coordinates gave a difference of ~0.17 deg) |
After some investigation, it seems that it is just the wrap (I may have extracted the wrong pixel to compare before). Negative RAs just go on to break code further up my pipeline, which is why I started seeing the issue. I can always add the wrap myself- just thought I would bring it up as it seemed strange to get different results from these two routines. Cheers! |
I agree it is a bit weird. astropy coordinates have a |
Thanks for raising this, @TimothyADavis. I noticed in the header that the CRVALs are negative:
It'd be ideal if spectral-cube via astropy coords can handle the wrapping, but I'm wondering if anyone knows if the negative CRVALs are accepted under the FITS standard? This might be a bug upstream in WSClean and how it writes headers. |
@e-koch the fits standard only says CRVAL for a given coordinate system needs to be floating point no other specifications beyond that. Negative values are permissible but the question is does it make sense as a reference for the coordinate system? |
Dear spectral-cube team,
I have come across a fun issue where the RA coordinate grids returned by e.g. cube.world[:] are not correct when the FITS file has an orthographic/synthesis projection (e.g. RA---SIN and DEC--SIN).
For instance in my cube the RA coordinate predicted by cube.world for some given pixel is -164.004 deg, while cube.wcs.pixel_to_world returns the correct 195.819 deg.
Many thanks,
Tim Davis
The text was updated successfully, but these errors were encountered: