Searches for pairs of points that are at least as close as a specified distance in 3D space.
This is intended for use on coordinate objects with arrays of coordinates, not scalars. For scalar coordinates, it is better to use the separation_3d methods.
Parameters: | coords1 : BaseCoordinateFrame or SkyCoord
coords2 : BaseCoordinateFrame or SkyCoord
distlimit : Quantity with distance units
storekdtree : bool or str, optional
|
---|---|
Returns: | idx1 : integer array
idx2 : integer array
sep2d : Angle
dist3d : Quantity
|
Notes
This function requires SciPy (>=0.12.0) to be installed or it will fail.
If you are using this function to search in a catalog for matches around specific points, the convention is for coords2 to be the catalog, and coords1 are the points to search around. While these operations are mathematically the same if coords1 and coords2 are flipped, some of the optimizations may work better if this convention is obeyed.
In the current implementation, the return values are always sorted in the same order as the coords1 (so idx1 is in ascending order). This is considered an implementation detail, though, so it could change in a future release.