f4enix.output.cdgs.kernels.DistanceKernel#
- class f4enix.output.cdgs.kernels.DistanceKernel(radius: float | None = None, n_voxels: int | None = None)#
Bases:
SphereKernelMethods
__init__([radius, n_voxels])get_neighbours(source_coords, dest_coords[, ...])Given a KDTree of the source coordinates and
- get_neighbours(source_coords: ndarray, dest_coords: ndarray, voxel_size: float | None = None) ndarray#
Given a KDTree of the source coordinates and
- Parameters:
source_coords (np.ndarray) – cloud point coordinates of the source activity
dest_coords (np.ndarray) – coordinates of the destination points
- Returns:
matrix of indices of the neighbors for each source coordinate in the cloud point
- Return type:
np.ndarray