Skip to content

engines

static_interpolation.engines

Classes:

Name Description
InterpolationEngine

Base class for all Engines execute interpolations based on an InterpolationPlan an ImageLayout and an InterpolationPolicy instance.

NumbaEngine

Numba interpolation engine

InterpolationEngine [source]

Base class for all Engines execute interpolations based on an InterpolationPlan an ImageLayout and an InterpolationPolicy instance.

Attributes:

Name Type Description
plan InterpolationPlan

plan storing all constants for the interpolation

layout ImageLayout

image layout defining the input data shape

policy InterpolationPolicy

options

Methods:

Name Description
__call__

Do the interpolation for a given data chunk.

__call__(data, masks=None, out=None, out_masks=None) [source]

Do the interpolation for a given data chunk.

Parameters:

Name Type Description Default
data NDArray

(bunch,n_panels,num_x,num_y) input data bunch.

required
masks NDArray | None

(bunch,n_panels,num_x,num_y) Optional masks for input data (good values = True bad = False)

None
out NDArray | None

self.plan.out_shape Optional output array to store interpolation results to.

None
out_masks NDArray | None

self.plan.out_shape Optional output array to store the mask resulting from the interpolation.

None

Returns:

Type Description
None | NDArray | tuple[NDArray, NDArray]

None|NDArray|tuple(NDArray,NDArray): If only data is given a single NDArray is returned, If in addition out is specified then None is returned. If only data and mask are given a tuple of two NDArrays storing the interpolation result for the data and the mask is returned. If all inputs are given None is returned.

NumbaEngine [source]

Bases: InterpolationEngine

Numba interpolation engine That ties toghether the above defined numba kernels.