Skip to content

Commit

Permalink
Consistent association of i,j with x,y in gnom axes
Browse files Browse the repository at this point in the history
  • Loading branch information
rwogburn committed Oct 20, 2015
1 parent 1b4d53d commit 52344e5
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions healpy/projector.py
Original file line number Diff line number Diff line change
Expand Up @@ -337,9 +337,9 @@ def ij2xy(self, i=None, j=None):
dx = reso/60. * dtor
xc,yc = 0.5*(xsize-1), 0.5*(ysize-1)
if i is None and j is None:
idx=np.outer(np.ones(xsize),np.arange(ysize))
idx=np.outer(np.ones(ysize),np.arange(xsize))
x=(idx-xc) * dx # astro= '-' sign, geo '+' sign
idx=np.outer(np.arange(xsize),np.ones(ysize))
idx=np.outer(np.arange(ysize),np.ones(xsize))
y=(idx-yc)*dx #(idx-yc) * dx
elif i is not None and j is not None:
x=(np.asarray(j)-xc) * dx
Expand All @@ -356,7 +356,7 @@ def ij2xy(self, i=None, j=None):
def get_extent(self):
xsize,ysize = self.arrayinfo['xsize'],self.arrayinfo['ysize']
left,bottom = self.ij2xy(0,0)
right,top = self.ij2xy(xsize-1,ysize-1)
right,top = self.ij2xy(ysize-1,xsize-1)
return (left,right,bottom,top)

def get_fov(self):
Expand Down

0 comments on commit 52344e5

Please sign in to comment.