[AstroPy] aplpy.FITSFIgure: Fortran-only origin workaround?
Gina Panopoulou
panopg at physics.uoc.gr
Thu Oct 22 13:06:19 EDT 2015
Hi everyone,
I'm having an issue with aplpy.FITSFigure's pixel2world.
When I try to overplot the center of a pixel on the image using
pixel2world (as shown below) it is misplaced ([1,1] is put where the
[0,0] pixel is). This offset obviously happens for all pixels.
import aplpy
import matplotlib.pyplot as plt
fig = aplpy.FITSFigure(fitsfilename)
fig.show_grayscale()
coords = fig.pixel2world([1],[1])
fig.show_circles(coords[0], coords[1], layer = 'l1', radius = 0.001)
plt.show()
I traced the root of the problem to the definitions of pixel2world (in
core.py) and pix2world (in wcs_util.py): they do not support non-Fortran
origins (i.e. 0) because when calling wcs_pix2world they use 1 as the
origin. I'm using aplpy version 0.9.13, but I checked and this has not
changed in v 1.0 .
So I wanted to ask if there is any way of telling FITSFigure that I want
it to use python-based indexing besides messing with the defs of these
functions, which is what I did now.
Thanks in advance,
Gina
--
G. V. Panopoulou
PhD student
Physics department
University of Crete
Heraklion, 71003, Greece
More information about the AstroPy
mailing list