spherematch¶
-
pydl.pydlutils.spheregroup.
spherematch
(ra1, dec1, ra2, dec2, matchlength, chunksize=None, maxmatch=1)[source]¶ Match points on a sphere.
Parameters: ra1, dec1, ra2, dec2 :
numpy.ndarray
The sets of coordinates to match. Assumed to be in decimal degrees
matchlength :
float
Two points closer than this separation are matched. Assumed to be in decimal degrees.
chunksize :
float
, optionalValue to pass to chunk assignment.
maxmatch :
int
, optionalAllow up to
maxmatch
matches per coordinate. Default 1. If set to zero, All possible matches will be returned.Returns: A tuple containing the indices into the first set of points, the indices into the second set of points and the match distance in decimal degrees.
Notes
If you have sets of coordinates that differ in size, call this function with the larger list first. This exploits the inherent asymmetry in the underlying code to reduce memory use.
Warning
Behavior at the poles is not well tested.