lsdb.core.crossmatch.kdtree_utils#
Functions#
|
Finds n_neighbors within a distance range for all points in a pair of partitions |
|
Converts longitude and latitude to cartesian coordinates on the unit sphere |
|
Calculates the distance between two points on the surface of the unit sphere, |
Module Contents#
- _find_crossmatch_indices(left_xyz: numpy.typing.NDArray[numpy.float64], right_xyz: numpy.typing.NDArray[numpy.float64], n_neighbors: int, max_distance: float, min_distance: float = 0) tuple[numpy.typing.NDArray[numpy.float64], numpy.typing.NDArray[numpy.int64], numpy.typing.NDArray[numpy.int64]] [source]#
- _query_min_max_neighbors(tree: scipy.spatial.KDTree, left_xyz: numpy.typing.NDArray[numpy.float64], right_xyz: numpy.typing.NDArray[numpy.float64], n_neighbors: int, min_distance: float, max_distance: float) tuple[numpy.ndarray, numpy.ndarray] [source]#
Finds n_neighbors within a distance range for all points in a pair of partitions
- _lon_lat_to_xyz(lon: numpy.typing.NDArray[numpy.float64], lat: numpy.typing.NDArray[numpy.float64]) numpy.typing.NDArray[numpy.float64] [source]#
Converts longitude and latitude to cartesian coordinates on the unit sphere
- Parameters:
lon (np.ndarray[np.float64]) – longitude in radians
lat (np.ndarray[np.float64]) – latitude in radians
- _get_chord_distance(radius_arcsec: float) float [source]#
Calculates the distance between two points on the surface of the unit sphere, for a given radius, in arcseconds
- Parameters:
radius_arcsec (float) – Tbe radius, in arcseconds
- Returns:
The chord distance between the two points on the unit sphere.