hipspy / hips

Python library to handle HiPS
https://hips.readthedocs.io
12 stars 16 forks source link

HipsTileMeta returns the four corners of the tile clockwise #145

Open almicol opened 4 years ago

almicol commented 4 years ago

The example in your documentation: https://hips.readthedocs.io/en/latest/api/hips.HipsTileMeta.html shows a returned skycoord_corners with the corners listed clockwise.

The convention within the Virtual Observatory is that internal part of a polygon is on the left of each side as seen from the center of the sphere. Because of that a polygon containing a certain region (e.g. a Healpix tile) must be written counterclockwise.

It would hence seem useful to have HipsTileMeta outputing the corners counterclockwise, to avoid any confusion. Could that be done? Thanks!

PS: The effect of a wrong headedness is here described: If I build a polygon using the corners ordered clockwise, that is, in the order provided by skycoord_corners, and query the ESO obscore service for any product contained in that polygon, I would get exactly the opposite of what I'd expect: the result set would contain all the products with footprints "outside" of the provided polygon.

tboch commented 4 years ago

Hi Alberto. I agree, this sounds like a sensible request.