STAR
Cal STAR — firmware, DAQ server, and engine design
Loading...
Searching...
No Matches
controller_lut.export_lut_for_fsw Namespace Reference

Functions

None export_lut (Path npz_path, Path out_path)
None main ()

Variables

str MAGIC = b"LUTC"
int VERSION = 1

Detailed Description

Export controller LUT from .npz to a C++-readable binary format.

The binary format is designed for ControllerLUT.cpp:
  - Magic "LUTC" (4 bytes)
  - Version u8 = 1
  - num_axes u8, num_outputs u8
  - For each axis: name_len u8, name bytes, grid_len u32, grid (float64 LE)
  - For each output: name_len u8, name bytes, shape (num_axes × u32), data (float64 LE)

Usage:
  python -m scripts.controller_lut.export_lut_for_fsw --input output/lut/controller_lut_ddp_small.npz --output output/lut/controller_lut.bin

Function Documentation

◆ export_lut()

None controller_lut.export_lut_for_fsw.export_lut ( Path npz_path,
Path out_path )
Export .npz LUT to FSW binary format.

Definition at line 29 of file export_lut_for_fsw.py.

References min.

Referenced by main().

◆ main()

None controller_lut.export_lut_for_fsw.main ( )

Definition at line 82 of file export_lut_for_fsw.py.

References export_lut(), and main().

Referenced by main().

Variable Documentation

◆ MAGIC

str controller_lut.export_lut_for_fsw.MAGIC = b"LUTC"

Definition at line 25 of file export_lut_for_fsw.py.

◆ VERSION

int controller_lut.export_lut_for_fsw.VERSION = 1

Definition at line 26 of file export_lut_for_fsw.py.