ZwickyTransientFacility / simsurvey

Simulation for survey (cadence, strategy) based on Python
14 stars 16 forks source link

v2: region, bins, healpix, ztffields #52

Open MickaelRigault opened 2 years ago

MickaelRigault commented 2 years ago

Hi @mcoughlin you mentioned you wanted to use astropy regions, this is what you had in mind right ?

https://astropy-regions.readthedocs.io/en/stable/

mcoughlin commented 2 years ago

@MickaelRigault Yup! We have some example interactions coded up here: https://github.com/skyportal/skyportal/blob/main/skyportal/handlers/api/instrument.py#L519 too.

MickaelRigault commented 2 years ago

This seems close to shapely: https://shapely.readthedocs.io/en/stable/manual.html Which is a very powerful tool coupled with pandas inside geopandas (and super fast).

I'll have a closer look.

MickaelRigault commented 2 years ago

haha:

https://astropy-regions.readthedocs.io/en/stable/shapely.html

mcoughlin commented 2 years ago

@MickaelRigault Indeed. To me, the important thing is interactions with the healpix stuff.

MickaelRigault commented 2 years ago

do you have an example of that too (never used it before)

mcoughlin commented 2 years ago

@MickaelRigault 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.

MickaelRigault commented 2 years ago

@mcoughlin For simplicity, I have move the implementation of the refreshed simsurvey here: https://github.com/MickaelRigault/skysurvey

I currently call it skysurvey, we can easily merge it with simsurvey if we want to keep the simsurvey "brand".

Moving the discussion above there.

You will see basic implementation started.

mcoughlin commented 2 years ago

Really interesting @MickaelRigault! Personally I think that yes this should become the new simsurvey. Presumably the tag should be a 1.X release to indicate potentially breaking changes once it is ready.

MickaelRigault commented 2 years ago

Fine by me