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

neighbours search in the k-th ring around a cell #1

Merged
merged 23 commits into from
May 17, 2024

Conversation

keewis
Copy link
Member

@keewis keewis commented May 17, 2024

healpy (or rather, the healpix C++ library wrapped by healpy) currently allows searching the immediate neighbours using an algorithm that:

  1. splits the cell ids into the local x, y, and face coordinates
  2. adds offsets to determine the neighbours
  3. adjusts these in case the offset crosses base pixel boundaries
  4. combines the new local coordinates back to cell ids

As long as we don't cross multiple pixel boundaries (i.e. ring <= nside, with ring the step size), this procedure can actually be used to find more than just the immediate neighbours.

This PR implements the extended neighbour search in a numba-accelerated, dask-aware function.

@keewis keewis merged commit de6ef29 into IAOCEA:main May 17, 2024
6 checks passed
@keewis keewis deleted the neighbours branch May 17, 2024 12:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant