STAR
Cal STAR — firmware, DAQ server, and engine design
Loading...
Searching...
No Matches
controller_lut.engine_lut.EngineLUT Class Reference

Public Member Functions

 __init__ (self, str|Path path)
List[LoadedAxis] axes (self)
List[str] outputs (self)
Dict[str, float] evaluate (self, Mapping[str, float] point)

Public Attributes

 meta = meta
 path = path

Protected Attributes

list _axes = []
dict _axis_name_to_index = {axis.name: i for i, axis in enumerate(self._axes)}
dict _outputs = {}

Detailed Description

N-dimensional engine/controller lookup table with multilinear interpolation.

This class is intentionally independent of engine_sim internal types so it
can be used from both Python tooling and (via a thin wrapper) C++ FSW.

Definition at line 21 of file engine_lut.py.

Constructor & Destructor Documentation

◆ __init__()

controller_lut.engine_lut.EngineLUT.__init__ ( self,
str | Path path )

Definition at line 29 of file engine_lut.py.

Member Function Documentation

◆ axes()

List[LoadedAxis] controller_lut.engine_lut.EngineLUT.axes ( self)

Definition at line 92 of file engine_lut.py.

References _axes.

◆ evaluate()

Dict[str, float] controller_lut.engine_lut.EngineLUT.evaluate ( self,
Mapping[str, float] point )
Evaluate the LUT at an arbitrary point using multilinear interpolation.

Parameters
----------
point:
    Mapping from axis name -> coordinate value in that axis' units.
    All axes defined in the LUT must be present; extra keys are ignored.

Returns
-------
dict:
    Mapping from output name -> interpolated value.

Definition at line 99 of file engine_lut.py.

References _axes, and _outputs.

Referenced by engine.core.runner.PintleEngineRunner.evaluate_arrays().

◆ outputs()

List[str] controller_lut.engine_lut.EngineLUT.outputs ( self)

Definition at line 96 of file engine_lut.py.

References _outputs.

Member Data Documentation

◆ _axes

controller_lut.engine_lut.EngineLUT._axes = []
protected

◆ _axis_name_to_index

dict controller_lut.engine_lut.EngineLUT._axis_name_to_index = {axis.name: i for i, axis in enumerate(self._axes)}
protected

Definition at line 58 of file engine_lut.py.

◆ _outputs

dict controller_lut.engine_lut.EngineLUT._outputs = {}
protected

◆ meta

controller_lut.engine_lut.EngineLUT.meta = meta

Definition at line 88 of file engine_lut.py.

◆ path


The documentation for this class was generated from the following file: