Skip to main content
This is the API surface available when your script runs as a pipeline — executed by the Braven worker against one experiment’s files, rather than run directly on your own machine. See Write a pipeline script for how execution works.
Defining a top-level process(braven=None) function is supported for backward compatibility; a plain top-level script (no wrapper function) works identically and is the simpler default.

Logging helpers

→ None
Queue an input parameter for this pipeline run. value is stored as a string — format numbers yourself, e.g. f"{slope:.4f}".
→ None
Queue an output metric for this pipeline run. Same string-value rule as log_config.
→ None
Queue a numeric list as a plottable Series (stored as JSON).
→ None
Log a labeled interactive-plot trace. Call again with the same name and a different y_label to group multiple traces onto one chart (e.g. one line per device on a shared axis).
→ None
Upload a file, or a live matplotlib Figure. A Figure is saved as a PNG and best-effort auto-extracted into an interactive companion (line/scatter data only — see Series vs. Figures). Works from a bare top-level script exactly like it does in direct logging.
→ None
Upload a plain file attached to the pipeline’s experiment. Equivalent to upload() for a non-Figure file; kept as a separate name for backward compatibility.
→ Device
Return a device-scoped handle — every value logged on it is tagged to that device instead of the whole experiment. See Link a device.

Reading experiment context

dict[str, str]
Filename → local temp path, for every file attached to this experiment.
→ dict
Parses filenames in braven.files for common scientific naming conventions and returns them as a dict. Recognizes patterns like 30Ctemperature, 3v3vdd, run_5run_index, Sample_2sample, 10degangle_deg, 2.4MHzfreq_mhz, and similar.
dict
Canonical parameter values already extracted for this experiment, if the pipeline has field mappings configured (raw CSV/column names mapped to canonical names). Missing keys return None with a printed warning rather than raising — safe to use even for experiments missing an expected column.
dict[str, str]
Raw → canonical column name map, populated the same way as braven.params — useful for df.rename(columns=braven.column_maps).

Removed helpers

braven.log(key, value) and braven.log_plot(fig, name) (Plotly) are removed. Both still exist as stubs — calling them raises a RuntimeError with migration guidance, instead of an opaque AttributeError, since some older stored pipeline scripts still reference them.
  • Replace braven.log(...) with braven.log_config(...) or braven.log_summary(...) — state which one explicitly.
  • Replace braven.log_plot(fig, name) with braven.upload(fig, name) using a matplotlib Figure. Plotly is no longer the plotting API.

Full cheat sheet