Until now a new plesty-bench user started with an empty window and had to find the demo modules and wire them up by hand before seeing anything measure. In plesty-bench 0.5.0 the first start of an empty bench opens a Welcome page. One button installs a real PLESTY experiment, creates its first run and starts it, with no instrument attached and no second PC. Ten minutes after the download you have a complete run, with its data, its plots and its report.html.

First startAn empty bench (no module, device or experiment) opens Welcome to PLESTY Bench
→
Install the demoplesty-pol-pl from its repository at its release tag v0.2.0, which pins the stage and the spectrometer too, through the same install job as any Hub module
→
Declare + createThe experiment is declared as pol-pl and its first run is created from config/demo.yaml
→
Devices come upThe run starts its two devices from the experiment's setup.yaml
→
Completed90 spectra, the journal and report.html in the run's folder

Using it

For users
  1. Install plesty-bench and open the console. On a fresh bench, Welcome to PLESTY Bench opens by itself. Help ▸ Welcome… opens it again later.
  2. Enter your name as Operator. It is stored with the run and suggested for the next one.
  3. Leave Start the run once it is created ticked to measure straight away. If you untick it, the run waits for Run.
  4. Press Install the demo. The install window closes by itself once the install succeeds, and stays open if it fails. Not now closes the page, which then does not open by itself again.

The install needs the network for a few minutes, plus git (on Windows the bench installs git itself if none is present). No measurement data leaves the PC.

What it sets up

PartWhat it is
Experimentpol-pl, polarisation-resolved photoluminescence: the experiment turns a half-wave plate and takes a spectrum at each angle. It is the module plesty-pol-pl, installed at main.
First runpol-pl-<date>-001, with angles from 0° to 178° in 2° steps: 90 angles at 3 s exposure each.
Stage hwpThe Thorlabs K10CR1 rotation stage (plesty-k10cr1), running in its simulator.
Spectrometer specThe demo/pol-pl branch of the LightField spectrometer module. It replays spectra that were really measured on a sample in the lab instead of opening a camera.
Folder<home>/demo/pol-pl, shared by the runs and by the spectrometer that replays them.
There is no demo mode in the experiment. It cannot tell the replay from an instrument. config/demo.yaml is an ordinary hardware configuration that happens to be set to the sweep that was recorded. The spectrometer rejects any other angle rather than return a spectrum that does not match it. What you get is a real run, with real data and a real report.

Watching the run

While the run measures, a new status banner above the tabs (plesty-bench#41) shows which run is live, how far it has got and how many of its devices are up:

When nothing runs, the banner is hidden. On the Experiments tab, select the run to see its Log (one line per angle), its Data (each step's angle, spectrum file and analysis result) and its Visualization (the experiment's own plots). The card buttons are now icons, and hovering over one shows what it does.

When the run reads completed, its folder holds raw/spec/ with the 90 spectra, the run's journal, records and configuration, and report.html. Open run opens the folder.

Afterwards

The console tells you when a newer bench is out

Before this, operators only learned about a release from Help ▸ Check for updates…, and benches ran old versions for weeks. Now the console checks PyPI when it starts (plesty-bench#39). The check runs off the GUI thread, at most once a day. A newer release shows as one line in the status bar, Update available: plesty-bench 0.5.1, which opens Check for updates…. With no network it shows nothing, and a source checkout is never checked. To turn it off, untick Server ▸ Configure… ▸ Check for updates at start.

Building on it

For developers & contributors

The welcome adds no special demo path to the bench. It reuses the steps any experiment takes: install module → declare experiment → create run → run starts its devices. In plesty/server/presenter/bench.py it comes down to one small description of the demo plus two methods:

DEMO = {
    "name": "pol-pl",
    "package": "plesty-pol-pl",
    "git": "https://gitlab.com/plesty/hub/experiments/plesty-pol-pl.git",
    "ref": "main",
    "config": "config/demo.yaml",
    # the device of its setup that replays the runs
    "replay_device": "spec",
}

install_demo()       # → install_module(package, git=…, ref=…): the Hub install job
set_up_demo(operator) # → declare_experiment(ExperimentSpec(…)), create_experiment_run(…)

welcome_due() opens the page only on the first start of a bench that holds nothing. A welcome-seen marker in the bench home records that the page has been offered, and a bench that already has a module, device or experiment never sees it.

The devices come from the experiment, not the bench

The bench installs only the experiment. Its setup.yaml names the devices, and the run installs and starts them on this bench like it does for any experiment:

devices:
  hwp:
    package: plesty-k10cr1
    host_name: bench-local
    git: https://gitlab.com/plesty/hub/devices/thorlab/plesty-k10cr1.git
    args: [--mock]                # the stage's simulator
    autostart: true
  spec:
    package: plesty-lightfield-spectrometer
    host_name: bench-local
    ref: demo/pol-pl              # replays measured spectra
    args: [--replay-run-root, /tmp/pol-pl]
    autostart: true

Settings that reach one device, only while one experiment serves it

The replaying spectrometer has to read and write where the demo's runs are. A /tmp flag that works on Linux points to a different folder on Windows, depending on which drive a process starts on. The welcome therefore passes the folder in the experiment's declaration, as environment entries named <DEVICE_STEM>__<NAME>. They reach the spec device only while this experiment serves it:

LOCAL_DATA, PLESTY_DATA                   → <home>/demo
SPEC__DEVICE_REPLAY_RUN_ROOT              → <home>/demo/pol-pl   # beats the setup.yaml flag
SPEC__DEVICE_DATA_ROOT / _DATA_PATH / PLESTY_DATA → <home>/demo
The first version wrote these into the spectrometer's own .env, which leaked them into every later experiment that also used a device called spec. If a device needs settings for one experiment only, put them in that experiment's declaration and keep them out of the device's .env.

Making your own experiment demo-ready

Experiment module

  • Ship a config/<name>.yaml that is a real configuration. Do not add a demo flag in code.
  • List every device in setup.yaml with autostart: true, so a single run brings the whole bench up.
  • Keep data paths as ${LOCAL_DATA}-style variables, never hard-coded folders.

Device module

  • Offer a simulator (--mock) or a replay of recorded data, selected by an argument.
  • Let an environment variable override path flags, so the bench can redirect them on any OS.
  • When asked for data the recording does not hold, refuse instead of returning something close.

The banner and the icon buttons are in plesty/server/view/. The icons are Lucide SVGs under plesty/server/assets/icons/ (ISC, REUSE-annotated), stroked in the theme's colours. Each button keeps its text label as its accessible name and tooltip. The start-up update check lives in plesty/server/services/updates.py. It caches its last answer in <home>/update-check.json and is switched by check_updates in agent.yaml.