Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/esheldon/smatch
Code to match points on the sphere using the healpix scheme
https://github.com/esheldon/smatch
Last synced: 11 days ago
JSON representation
Code to match points on the sphere using the healpix scheme
- Host: GitHub
- URL: https://github.com/esheldon/smatch
- Owner: esheldon
- License: other
- Created: 2012-02-07T18:37:45.000Z (over 12 years ago)
- Default Branch: master
- Last Pushed: 2024-01-10T18:27:14.000Z (10 months ago)
- Last Synced: 2024-10-11T19:25:51.958Z (27 days ago)
- Language: C
- Homepage:
- Size: 331 KB
- Stars: 12
- Watchers: 5
- Forks: 3
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
A python code for matching points on the sphere using healpix.
This code is about 5-10 times faster than HTM in the esutil library.
Examples
--------```python
# For quick matches, use the match() function
import smatch
# This code uses the ring configuration. This means nside can be any positive
# integer between 1 and 2**28=268435456, although beware the memory usage grows
# with nsidenside=4096 # healpix nside
maxmatch=1 # return closest match# ra,dec,radius in degrees
matches = smatch.match(ra1, dec2, radius, ra2, dec2,
nside=nside, maxmatch=maxmatch)# in the above call, radius can be a scalar or the
# same size as ra1,dec1# the output matches structure holds the indices of the matches from each data
# set, and the cosine of the distance between themprint(m.dtype.descr)
[('i1', '