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

Functions

str pressure_curves_csv (dict[str, Any] results)

Variables

str HEADER = "Time (s),LOX Pressure (Pa),Fuel Pressure (Pa)\n"

Detailed Description

Layer 2/3 optimizer results as the pressure-curve CSV the UI downloads.

Used to be built in the browser (Layer2Optimization / Layer3Optimization
``downloadCSV``), so nothing but an open tab could produce it. Now the backend
writes it (GET /api/optimizer/layer{2,3}/results.csv) and the UI's button fetches
that, so the file is the same whoever asks -- the design-tools MCP included.

The format is unchanged: ``Time (s),LOX Pressure (Pa),Fuel Pressure (Pa)``, one
row per time, numbers written the way JavaScript's ``String(n)`` writes them
(``5`` not ``5.0``, stardesign.jsformat), since that is what the file has always held.

Function Documentation

◆ pressure_curves_csv()

str backend.results_csv.pressure_curves_csv ( dict[str, Any] results)

Definition at line 22 of file results_csv.py.

Variable Documentation

◆ HEADER

str backend.results_csv.HEADER = "Time (s),LOX Pressure (Pa),Fuel Pressure (Pa)\n"

Definition at line 19 of file results_csv.py.