BaseNearestNeighborSearcher

class pyirf.interpolation.BaseNearestNeighborSearcher(grid_points, contents, norm_ord=2)[source]

Bases: BaseInterpolator

Dummy NearestNeighbor approach usable instead of actual Interpolation/Extrapolation

Methods Summary

interpolate(target_point)

Takes a grid of IRF contents for a bunch of different parameters and returns the contents at the nearest grid point as seen from the target point.

Methods Documentation

interpolate(target_point)[source]

Takes a grid of IRF contents for a bunch of different parameters and returns the contents at the nearest grid point as seen from the target point.

Parameters:
target_point: numpy.ndarray

Value for which the nearest neighbor should be found (target point)

Returns:
content_new: numpy.ndarray, shape=(1,…,M,…)

Contents at nearest neighbor