- craftutils.observation.epoch.SkyCoord.search_around_sky(searcharoundcoords, seplimit)
Searches for all coordinates in this object around a supplied set of points within a given on-sky separation.
This is intended for use on ~astropy.coordinates.SkyCoord objects with coordinate arrays, rather than a scalar coordinate. For a scalar coordinate, it is better to use ~astropy.coordinates.SkyCoord.separation.
For more on how to use this (and related) functionality, see the examples in astropy:/coordinates/matchsep.
Parameters¶
- searcharoundcoordscoordinate-like
The coordinates to search around to try to find matching points in this |SkyCoord|. This should be an object with array coordinates, not a scalar coordinate object.
- seplimit~astropy.units.Quantity [‘angle’]
The on-sky separation to search within.
Returns¶
- idxsearcharoundint array
Indices into
searcharoundcoordsthat match the corresponding elements ofidxself. Shape matchesidxself.- idxselfint array
Indices into
selfthat match the corresponding elements ofidxsearcharound. Shape matchesidxsearcharound.- sep2d~astropy.coordinates.Angle
The on-sky separation between the coordinates. Shape matches
idxsearcharoundandidxself.- dist3d~astropy.units.Quantity [‘length’]
The 3D distance between the coordinates. Shape matches
idxsearcharoundandidxself.
Notes¶
This method requires SciPy to be installed or it will fail.
In the current implementation, the return values are always sorted in the same order as the
searcharoundcoords(soidxsearcharoundis in ascending order). This is considered an implementation detail, though, so it could change in a future release.See Also¶
astropy.coordinates.search_around_sky SkyCoord.search_around_3d