Watching a Run

# Follow the newest run live
uv run python -m plesty.pow_pl.viz monitor

# Replay a stored run, two rows per refresh, and record the window
uv run python -m plesty.pow_pl.viz monitor --replay 2 --record run.mp4

# Render a stored run to <run-id>.mp4 offscreen — no window needed
uv run python -m plesty.pow_pl.viz render --run <run_id>

The manifest names this viewer (viz: plesty.pow_pl.viz), so the PLESTY bench opens it on the runs it starts, in its Visualization pane or in a window of its own. Everything around the views — which run, the share, live, replay, render, record — is plesty.lib.monitor.Viz, the same for every experiment.

Four views, two columns:

View

Shows

Spectrum

the newest spectrum, as recorded

Spectral map

every spectrum so far against the wave-plate angle, in counts per second (so the exposures of one angle compare) and without cosmic rays

Excitation power

the power read during each exposure, against the angle

Integrated emission against power

each spectrum’s emission summed over analysis.region_nm, on log–log axes, with the running exponent k of $I \propto P^k$

The last view uses the same reduction as the analysis after the sweep, so its k is the one the report gives for the integrated emission. A run without the powermeter block has no power, and those two views stay empty.

Watching is passive: the views read the records the experiment already committed and the spectra they point at, so a viewer can be opened, closed and reopened mid-run without disturbing the measurement. Each spectrum file is read once (read_spectrum) and shared by the views. The panel arrangement is remembered for the next run.

render draws the same views on Qt’s offscreen platform and encodes one video next to the run directory, stopping when the last record is drawn; it works headless, for any run.

Runs are looked for under --run-root (default pow-pl under PLESTY_DATA) by every run-id generation (pow_pl_*, and pol_pl_* and qd_fss_* from before the rename). A record names its spectrum relative to the shared disk, which the viewer joins to this machine’s PLESTY_DATA.

The report

After the sweep, one analysis step per dot (analysis.enabled) saves analysis/<qd>.report.json in the run directory. When a run started from the bench ends, the bench compiles the run — configuration, instruments, this report and the raw records — into report.html beside it; Export HTML writes the same file elsewhere. A finished run is analysed again with python -m plesty.pow_pl.analysis <run_dir> <qd>.