-
-
Notifications
You must be signed in to change notification settings - Fork 54
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
BUG: SIA2 position search to be SkyCoord aware #459
Conversation
Codecov Report
@@ Coverage Diff @@
## main #459 +/- ##
==========================================
- Coverage 80.00% 79.98% -0.02%
==========================================
Files 52 52
Lines 6027 6036 +9
==========================================
+ Hits 4822 4828 +6
- Misses 1205 1208 +3
📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I like it. While we're doing this: is there any concept of spherical circle and polygon in astropy that we ought to understand here, too? I'm also asking because it'd be nice to support these in Registry discovery.
I suppose we could use astropy regions https://astropy-regions.readthedocs.io/en/stable/index.html? Cc'ing @keflavich and @andamian as astroquery.alma already uses it on the user api (but then I suppose it just wraps back to this under the hood, I'll check it when I'm back at the keyboard) |
I'm not sure I understood the question, but yes, I would advocate for using astropy regions anywhere we're talking about sky regions. |
I'm not sure how to make the RANGE and POLYGON easily work with SkyCoord as well as to support vector SkyCoord queries. Maybe the logic could be: check whether the first element is a SkyCoord. Check whether the last one if an angle. If so, do a CIRCLE query, if not, then use the vector SkyCoord elements as points in the RANGE or POLYGON? |
61572e5
to
11376f1
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks good. I don't think it will interfere with the new features you've mentioned.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM also.
11376f1
to
6e50499
Compare
OK, given the approvals, let's have this in as a bugfix, the more comprehensive solution (something along the line of #459 (comment)) will come in a follow-up enhancement |
BUG: SIA2 position search to be SkyCoord aware
To fix #305
However, this is very much the bare minimum, as it still doesn't handle the case of vector skycoord input, neither non circular search, so eventually a more thorough overhaul will be required.