[SciPy-user] FITS images with header-supplied axes?
Perry Greenfield
perry at stsci.edu
Sun Mar 30 10:54:04 EDT 2008
On Mar 28, 2008, at 8:28 PM, Keflavich wrote:
> Is there any plotting routine in scipy / matplotlib that can plot a
> fits image with correct WCS coordinates on the axes? I know pyfits
> can load fits files, astLib has routines to interpret header
coordinates, and I think you can make the axes different using
> matplotlib transforms, but is there anything that puts all three
> together currently available?
> Thanks,
> Adam
Well, we (STScI) recently wrapped WCSLIB to obtain a mapping function between pixel and sky coordinates for python (you can find it as pywcs in astrolib on scipy; that may have been what you were referring to).
But I'm not sure you understand what you are asking for with regard to matplotlib. The new transforms stuff should make it much easier to display the sky coordinates in the interactive display. The axis labeling is a different matter. Suppose your image (let's say it's 1Kx1K for the sake of discussion) is rotated 45 degrees with regard to north (either way, it doesn't really matter). What would you expect to see for axis labels? I don't think it is at all obvious how people would want labeling to be done along the edges of the image. I can imagine someone wanting axes or grids superimposed on the image itself, but that's not quite the same thing. Do you want the image rotated so that it is resampled on to RA and Dec and displayed that way?
In any event, no we haven't yet done anything to try to integrate all three things. Among other things we wanted to make sure that the api for the wcs info was suitable before doing a lot with it (and in the meantime, Mike is working on rewriting drizzle which is taking a lot of his time).
Perry
More information about the SciPy-User
mailing list