[AstroPy] Object within region

Miguel Gutiérrez Páez mgutierrez at gmail.com
Sun Jun 12 07:17:24 EDT 2022


Hi all,

I'm trying to figure out how to determine if a particular object falls
within a certain sky region.
First, please note I'm a complete noob with astropy, so I guess I'm
probably missing some concept.

I've read examples about regions and sky regions:
https://astropy-regions.readthedocs.io/en/stable/contains.html

I've been trying some examples by myself but I get some wrong results. That
is, the script reports an object falls within the region, but after
checking with stellarium for example, clearly is not.

One of my questions is why the "contains" method requires a wcs. If my only
inputs are skycoords in icrs, why is needed to perform wcs transformations?
This is a concept that I don't fully understand.
The wcs I'm passing to the contains method, is the one described in the
link above, the mentioned example.

As stated, I'm pretty sure I'm failing due to some missing concepts. Glad
to hear from your for any clarification.

Thanks in advance.

Regards

PS: if you with I can paste some lines of my code
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.python.org/pipermail/astropy/attachments/20220612/fd457f8c/attachment.html>


More information about the AstroPy mailing list