Skip to content
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

Merged
merged 3 commits into from
Jul 28, 2023

Conversation

bsipocz
Copy link
Member

@bsipocz bsipocz commented Jul 25, 2023

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.

@bsipocz bsipocz added this to the v1.4.2 milestone Jul 25, 2023
@codecov
Copy link

codecov bot commented Jul 25, 2023

Codecov Report

Merging #459 (6e50499) into main (b96a950) will decrease coverage by 0.02%.
The diff coverage is 72.72%.

@@            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     
Files Changed Coverage Δ
pyvo/dal/params.py 85.71% <72.72%> (-0.67%) ⬇️

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

Copy link
Contributor

@msdemlei msdemlei left a 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.

@bsipocz
Copy link
Member Author

bsipocz commented Jul 26, 2023

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)

@keflavich
Copy link
Contributor

I'm not sure I understood the question, but yes, I would advocate for using astropy regions anywhere we're talking about sky regions.

@bsipocz
Copy link
Member Author

bsipocz commented Jul 26, 2023

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?

Copy link
Contributor

@andamian andamian left a 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.

Copy link
Contributor

@tomdonaldson tomdonaldson left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM also.

@bsipocz
Copy link
Member Author

bsipocz commented Jul 28, 2023

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

@bsipocz bsipocz merged commit feda0f0 into astropy:main Jul 28, 2023
10 of 12 checks passed
bsipocz added a commit that referenced this pull request Aug 16, 2023
BUG: SIA2 position search to be SkyCoord aware
@bsipocz bsipocz deleted the SIA2_skycoord_aware branch April 17, 2024 15:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

sia query doesn't accept scalar coordinate
5 participants