IndexMapper#

class cherab.lhd.emc3.IndexMapper#

Bases: IntegerFunction3D

Mapping integer array to function retuning its index value.

This instance is callable function returning the element of 1-D indices array, the index of which is given by a Index function defined in 3-D space.

If the index function returns an integer which is out of bounds or negative, an instance returns a default value defined by default_value.

Parameters:
index_funccallable()[[float, float, float], int]

Callable returning a index integer.

indices(N, ) array_like

An 1D array of indices.

default_valueint, optional

The value to return outside the indices size limits, by default -1.

Methods

__call__

Evaluate the function f(x, y, z)

inside_grids(x, y, z)

Mask function returning True if Point (x, y, z) in any grids, otherwise False.