-
-
Notifications
You must be signed in to change notification settings - Fork 572
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
3D WCS world coordinates are not SkyCoord objects #5341
Comments
This has some layers to it...
import astropy.wcs
import numpy as np
import astropy.units as u
import sunpy.coordinates
data = np.random.rand(4, 3, 5)
# Define WCS transformations in an astropy WCS object.
wcs = astropy.wcs.WCS(naxis=3)
wcs.wcs.ctype = 'DSUN', 'HGLT-TAN', 'HGLN-TAN'
wcs.wcs.cunit = 'm', 'deg', 'deg'
wcs.wcs.cdelt = 1000, 0.5, 0.4
wcs.wcs.crpix = 0, 2, 2
wcs.wcs.crval = 10, 0.5, 1
print(wcs.pixel_to_world(1, 1, 1))
closer.
I am not sure how we could teach astropy that |
Thanks for first fix. On the second point, I think it might even be modifications to |
I managed to make a |
Worth an example maybe? |
Maybe... this code I'm writing will at least end up in |
I think this is worth keeping open, if you read Thompson and the FITS specs this should work, so it would be good to be able to support it. |
I am trying to work with a 3D WCS, and extract SkyCoord coordinates from it. This is the code I'm using:
but this prints
[<Quantity 2010. m>, <Quantity 0.5 deg>, <Quantity 1. deg>]
instead of aSkyCoord
object. This might be an upstreamastropy
issue, or an issue with our registration of coordinate systems withastropy
.The text was updated successfully, but these errors were encountered: