rizer.spice.backend.services.results_plotting.custom#

Custom quantity-vs-quantity plot data for the Results Explorer API.

Unlike the fixed per-plot-kind builders (each hardcoding which quantities go on which axis), every quantity here is returned for every run; the frontend picks which is x, which are y, and how each y is scaled.

Functions#

build_custom_plot_data(→ dict)

Build every custom-plot quantity's raw values for each of run_ids.

Module Contents#

rizer.spice.backend.services.results_plotting.custom.build_custom_plot_data(run_ids: list[str]) → dict#

Build every custom-plot quantity’s raw values for each of run_ids.

Parameters:

run_ids (list of str) – Run identifiers; must be non-empty.

Returns:

{“quantity_info”: {name: {“display_name”, “unit”}}, “runs”: […], “warnings”: […]}, matching rizer.spice.backend.models.results_schemas.CustomPlotResponse. Every run’s quantities dict has the exact same keys (all of _CUSTOM_QUANTITIES); values are per-run arrays (own length/time base), not aligned across runs. A quantity run predates the post-processor for is [] for that run, with a matching entry in warnings instead of a raised error.

Return type:

dict

Raises:

ValueError – If run_ids is empty.