ParametrizedVisibleEdgesExtrapolator

class pyirf.interpolation.ParametrizedVisibleEdgesExtrapolator(grid_points, params, m=1)[source]

Bases: ParametrizedNearestSimplexExtrapolator

Extrapolator using blending over visible edges.

While the ParametrizedNearestSimplexExtrapolator does not result in a smooth extrapolation outside of the grid due to using only the nearest available simplex, this extrapolator blends over all visible edges as discussed in [1]. For one grid-dimension this is equal to the ParametrizedNearestSimplexExtrapolator, the same holds for grids consisting of only one simplex or constellations, where only one simplex is visible from a target.

Parameters:
grid_points: np.ndarray, shape=(N, …)

Grid points at which templates exist. May be one ot two dimensional. Have to be sorted in accending order for 1D.

params: np.ndarray, shape=(N, …)

Array of corresponding parameter values at each point in grid_points. First dimesion has to correspond to number of grid_points

m: non-zero int >= 1

Degree of smoothness wanted in the extrapolation region. See [1] for additional information. Defaults to 1.

Raises:
TypeError:

If m is not a number

ValueError:

If m is not a non-zero integer

References

[1]

P. Alfred (1984). Triangular Extrapolation. Technical summary rept., Univ. of Wisconsin-Madison. https://apps.dtic.mil/sti/pdfs/ADA144660.pdf

Methods Summary

__call__(target_point)

Providing a common __call__ interface

extrapolate(target_point)

Takes a grid of scalar values for a bunch of different parameters and extrapolates it to given value of those parameters.

Methods Documentation

__call__(target_point)

Providing a common __call__ interface

Parameters:
target_point: np.ndarray, shape=(1, n_dims)

Target for extrapolation

Returns:
Extrapolated result.
extrapolate(target_point)[source]

Takes a grid of scalar values for a bunch of different parameters and extrapolates it to given value of those parameters.

Parameters:
target_point: numpy.ndarray, shape=(1, n_dims)

Value for which the extrapolation is performed (target point)

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

Extrapolated values