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 searcharoundcoords that match the corresponding elements of idxself. Shape matches idxself.

idxselfint array

Indices into self that match the corresponding elements of idxsearcharound. Shape matches idxsearcharound.

sep2d~astropy.coordinates.Angle

The on-sky separation between the coordinates. Shape matches idxsearcharound and idxself.

dist3d~astropy.units.Quantity [‘length’]

The 3D distance between the coordinates. Shape matches idxsearcharound and idxself.

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 (so idxsearcharound is 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