Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

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

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 nside

nside=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 them

print(m.dtype.descr)
[('i1', '