[AstroPy] Running wcs_pix2world for all image pixels
Maik Riechert
maik.riechert at arcor.de
Wed Oct 16 08:48:23 EDT 2013
Hi,
I'm quite new to python and astropy and got stuck at the following which
probably is extremely easy to do.
I created a WCS object out of a FITS header and wanted to get the RA/Dec
coordinates of each image pixel. I tried:
w.wcs_pix2world(np.ndindex(4256, 2832), 0)
where 4256x2832 are the image dimensions. This returns 'ValueError:
object of too small depth for desired array'. I was trying to avoid
allocating an array with all pixel coordinates and thought an iterator
would work too.
What would you recommend for my case (translating every pixel)?
Cheers and thanks,
Maik
More information about the AstroPy
mailing list