Open wtbarnes opened 3 years ago
I agree this would be really useful but some things to consider are:
wcs_to_celestial_frame
is astropy.wcs.WCS
specific and wouldn't work for gWCS or other APE14 compatible WCSes (an equivalent could easily be written for gwcs)coordinate_frame
or frame
attribute that looks at the type of WCS you have and then applies the appropriate translation from WCS to frame. Initially we astropy.wcs.WCS
and gWCS could be supported and maybe provide some sort of entry point for translations from other WCSesframe
attribute would then only live on that subclass. This of course would be less appropriate for ndcube and more appropriate for say sunpy. This also definitely feeds into our discussion about the Map
refactor.
It is often useful to know the celestial coordinate frame corresponding to a particular WCS, e.g. when overplotting a coordinate on a single slice of 3D data cube, where that slice corresponds to a particular dimension in time. It would be useful to expose this coordinate frame as an attribute on an
NDCube
. This can presumably be derived from the WCS usingwcs_to_celestial_frame
.