The origin of the "wcs-rd2xy" module

36 views
Skip to first unread message

m105...@gm.astro.ncu.edu.tw

unread,
Mar 28, 2018, 10:33:25 AM3/28/18
to astrometry
Nice to meet all of you,

I have a question about where the origin (0, 0) of the coordinate given by wcs-rd2xy, the ordinary lower left or the upper left like array in python?

Dustin Lang

unread,
Mar 28, 2018, 1:10:08 PM3/28/18
to astrometry
Per the FITS standard, the first pixel is coordinate (1,1).  FITS does not say whether pixel (1,1) should be displayed as the *bottom*-left or *top*-left.  If you read a FITS image into a python array, array element [0,0] is pixel (1,1).

cheers,
--dustin

m105...@gm.astro.ncu.edu.tw

unread,
Mar 29, 2018, 5:31:17 AM3/29/18
to astrometry
Thanks for your reply!
So, if the result of wcs-rd2xy is (500, 1000), it implies that its position on python output data array is just right at array[1000][500] !?

Dustin Lang於 2018年3月29日星期四 UTC+8上午1時10分08秒寫道:

Dustin Lang

unread,
Mar 29, 2018, 9:27:25 AM3/29/18
to astrometry
Nope, wcs-rd2xy gives 1-indexed coordinates, so (500,1000) would be the python array position a[999,499].

cheers,
--dustin


Reply all
Reply to author
Forward
0 new messages