PyDL:docs

- Index
- Modules

### Navigation

- next »
- « previous |
- pydl v1.0.0 »
- SDSS Utilities (`pydl.pydlutils`) »
- spherematch

# spherematch

pydl.pydlutils.spheregroup.spherematch(ra1, dec1, ra2, dec2, matchlength, chunksize=None, maxmatch=1)

  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`, optional

      Value to pass to chunk assignment.

    maxmatch `int`, optional

      Allow up to `maxmatch` matches per coordinate. Default 1. If set to zero, All possible matches will be returned.

  Returns:
    `tuple`

      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.