craftutils.observation.epoch.SkyCoord.search_around_3d(searcharoundcoords, distlimit)

Searches for all coordinates in this object around a supplied set of points within a given 3D radius.

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_3d.

For more on how to use this (and related) functionality, see the examples in astropy:/coordinates/matchsep.

Parameters

searcharoundcoords~astropy.coordinates.SkyCoord or ~astropy.coordinates.BaseCoordinateFrame

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.

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

The physical radius 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_3d SkyCoord.search_around_sky