MickaelRigault / skysurvey

Simulate transients within the sky
Apache License 2.0
9 stars 7 forks source link

request: use of astropy regions #1

Closed MickaelRigault closed 2 years ago

MickaelRigault commented 2 years ago

There are request to use astropy's regions to build Survey see: https://github.com/ZwickyTransientFacility/simsurvey/issues/52

important part: the important thing is interactions with the healpix stuff.

healpy has nice utility functions for extracting indices from shapes: https://healpy.readthedocs.io/en/latest/generated/healpy.query_polygon.html @lpsinger has nice utility functions too in ligo.skymap: https://git.ligo.org/lscsoft/ligo.skymap/-/tree/main/ligo/skymap/tool depending on what exactly is needed. He also made an overlap calculator for doing the overlaps in postgres directly: https://github.com/skyportal/healpix-alchemy which has nice examples too.

Note: skysurvey.survey.healpix already contain healpy interaction.

MickaelRigault commented 2 years ago

survey.polygon.parse_feilds() now supports dict of {fieldid: ds9/astropy's regions}