-
-
Notifications
You must be signed in to change notification settings - Fork 408
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
Fixed galactic coord problem #3105
Conversation
Could you repost the original query here? I think this looks better. |
before
now
I think that because of the order it was intersecting the wrong range. Note that this is slightly larger than the original galactic range because in ICRS the range is "tilted" I would need to use a polygon to be more accurate. Is that acceptable? |
The unit test fails now because |
SkyCoord has a Yes, this is acceptable, but we should note the limitations, and particularly that searches aligned with the Galactic plane are not supported. I think that's the right interpretation of what you just said |
@keflavich - the crude translation between galactic range to ICRS range is a crude approximation that probably includes extra areas. The accuracy depends on the size of the range and position. It is however better than the bug that we have right now. A better alternative would be to approximate the galactic range with a polygon and use that in the ICRS intersect. To do that, we'd need to add more points to the polygon along the latitude parallels to keep the polygon vertices follow the parallels (and not on the spherical arc). More points means more accurate but also more complexity in executing the query. Is this worth from a practical point of view? Are queries like the one in the ticket common enough to justify the effort or the current approximation is sufficient? |
Let's use this workaround for now. I think the polygon approach is much better, but I'm not convinced demand is high enough right now to justify the extra work. |
Just an update here. I've tested the polygon approach with all transformation on the client side and it seems to work for the most part. An option to do the geometry transformation between different reference systems on the service side with a query function has been just endorsed by IVOA and we might follow that lead for this issue. |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #3105 +/- ##
=======================================
Coverage 67.38% 67.39%
=======================================
Files 233 233
Lines 18417 18421 +4
=======================================
+ Hits 12411 12415 +4
Misses 6006 6006 ☔ View full report in Codecov by Sentry. |
I think this will do it. @keflavich - please review. |
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, but please verify that the query syntax (lower case and
) is correct.
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 was user reported, so I'm afraid will need a changelog entry. If we merge without one, just leave the label off and I'll deal with it at release time.
It's case insensitive but I've changed it for consistency. Also, switched to using |
My bad. I wrongly assumed that it's not required because there are no API changes. |
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 is good to go, thanks!
fixes #2147
Does this look better?
