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

Enable filtering in galactic coordinates #196

Open
3 tasks done
nevencaplar opened this issue Mar 1, 2024 · 4 comments
Open
3 tasks done

Enable filtering in galactic coordinates #196

nevencaplar opened this issue Mar 1, 2024 · 4 comments
Labels
enhancement New feature or request

Comments

@nevencaplar
Copy link
Member

nevencaplar commented Mar 1, 2024

Enable the user to specify the filtering regions (e.g., box), in galactic coordinates.

Possibly API might be (do they use ra/dec for galactic?):

Catalog.box(ra=(340, 342), dec=(340, 342)), coordinates = 'galactic')

The initial suggestion is to have the galactic coordinates box/region transformed into polygon in Equatorial Coordinate System that is sampled with a ``sufficent'' density. From there use existing functionality.

In case that this turns out to be problematic, report back to consider alternative approaches (via e.g., astropy regions).

Connected with astronomy-commons/hats#152

Before submitting
Please check the following:

  • I have described the purpose of the suggested change, specifying what I need the enhancement to accomplish, i.e. what problem it solves.
  • I have included any relevant links, screenshots, environment information, and data relevant to implementing the requested feature, as well as pseudocode for how I want to access the new functionality.
  • If I have ideas for how the new feature could be implemented, I have provided explanations and/or pseudocode and/or task lists for the steps.
@nevencaplar nevencaplar added the enhancement New feature or request label Mar 1, 2024
@hombit
Copy link
Contributor

hombit commented Mar 1, 2024

Do you have a mathematic idea on how to build a great-circle polygon to contain a Galactic-coordinate box?

@hombit
Copy link
Contributor

hombit commented Mar 27, 2024

@nevencaplar we actually could do it with a combination of a cone search and polygon filtering.

For the galactic longitude l filtering we can do the same we are doing for RA — filter by a union of a couple of symmetric triangles: l, b = (0, ±90), (l_min, 0), (l_max, 0).

For the galactic latitude we may use an intersection of couple of cone searches — center is located in the Northern galactic pole and radii are 90 - b_min and 90 - b_max

@nevencaplar
Copy link
Member Author

nevencaplar commented Mar 30, 2024

@hombit Do you think this is "simple enough" to do it relatively quickly and "easily"? @mjuric expressed a concern about implementing all different coordinates separately, opting rather for a single solution that could take in many more coordinate systems. Having said, galactic is probably a second most important system, and I am worried about that it might be quite a bit time before we are able to incorporate a general solution.

@hombit
Copy link
Contributor

hombit commented Apr 1, 2024

@nevencaplar Yes, I think it is "simple enough" even for an arbitrary coordinate system input (while all coordinates of the box corners are in the same system). All we need is to support two cases: "ICRS" and "other", while we could relatively easily implement "other" system if we have a way to convert any coordinates from this system to ICRS

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
Status: No status
Development

No branches or pull requests

2 participants