lpsinger / ligo.skymap

Localization of gravitational-wave transients. Mirror of https://git.ligo.org/lscsoft/ligo.skymap
22 stars 18 forks source link

Check if position within countour? #2

Closed gnarayan closed 5 years ago

gnarayan commented 5 years ago

Hi Leo,

Given a position, and a set of contours from an LVC skymap, say from: https://lscsoft.docs.ligo.org/ligo.skymap/ligo/skymap/postprocess/contour.html#module-ligo.skymap.postprocess.contour

Is there any way to check if the point is within one of the contours within ligo.skymap itself?

Right now, the only options seem to be a) plot it and look or b) use OpenCV or something else to construct the contours and check, but I'm not sure this is right because I think the latter is assuming the geometry is flat, and these are contours on the surface of a sphere.

Also,right now we're querying a region with a 2 degree radius around the RA, Dec and determining what the total probability in that disc is. Is there any LVC guidelines on what a reasonable threshold is for the total probability in a disc around some RA, Dec for a potential EM counterpart?

Cheers, -Gautham

lpsinger commented 5 years ago

Hi @gnarayan, I have made a merge request to add the recipe that we use to the sky map tutorial section of the LIGO/Virgo Public Alerts User Guide. Please see the merge request in GitLab here:

https://git.ligo.org/emfollow/userguide/merge_requests/59

lpsinger commented 5 years ago

Now live:

https://emfollow.docs.ligo.org/userguide/tutorial/skymaps.html#test-if-a-sky-location-is-in-the-90-credible-region

gnarayan commented 5 years ago

Thanks!