PyDL:docs

- Index
- Modules

### Navigation

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

# spheregroup

pydl.pydlutils.spheregroup.spheregroup(ra, dec, linklength, chunksize=None)

  Perform friends-of-friends grouping given ra/dec coordinates.

  Parameters
    ra, dec `numpy.ndarray`

      Arrays of coordinates to group in decimal degrees.

    linklength `float`

      Linking length for the groups in decimal degrees.

    chunksize `float`, optional

      Break up the sphere into chunks of this size in decimal degrees.

  Returns
    `tuple`

      A tuple containing the group number of each object, the multiplicity of each group, the first member of each group, and the next member of the group for each object.

  Raises
    `PydlutilsException`

      If the array of coordinates only contains one point.

  Notes

  It is important that `chunksize` >= 4 * `linklength`. This is enforced.

  Warning

  Behavior at the poles is not well tested.