rizer.spice.backend.services.results_plotting.loading#

Run loading and YAML config I/O for the Results Explorer API.

Attributes#

Classes#

RunData

One loaded run: its full state array plus radius-change segmentation.

Functions#

load_run(→ RunData)

Load one run's states and radius-change segments from disk.

load_yaml_config(→ dict)

Load a plot_annotations.yaml-shaped file, or {} if it doesn't exist yet.

save_yaml_config(→ None)

Write config back to path, preserving comments on every untouched key.

Module Contents#

rizer.spice.backend.services.results_plotting.loading.ANNOTATIONS_YAML_NAME = 'plot_annotations.yaml'#
class rizer.spice.backend.services.results_plotting.loading.RunData#

One loaded run: its full state array plus radius-change segmentation.

run_id: str#
label: str#
disambiguated_label: str#
states: rizer.pipeline.post_process.results_io.SimulationData#
segments: list[rizer.pipeline.post_process.results_io.SimulationData]#
change_times: list[float]#
rizer.spice.backend.services.results_plotting.loading.load_run(run_id: str) → RunData#

Load one run’s states and radius-change segments from disk.

Mirrors the loading sequence in scripts/2T0D_constant_mass_NRP/plot_results_2T0D_constant_mass_simulation.py. Cached by run_id; see _run_cache.

rizer.spice.backend.services.results_plotting.loading.load_yaml_config(path: pathlib.Path) → dict#

Load a plot_annotations.yaml-shaped file, or {} if it doesn’t exist yet.

rizer.spice.backend.services.results_plotting.loading.save_yaml_config(path: pathlib.Path, config: dict) → None#

Write config back to path, preserving comments on every untouched key.