Skip to content

v1 VANTAstar: simulation, VANTAstar(simulation=True) - #1585

Open
niklashoelter wants to merge 3 commits into
PyLabRobot:mainfrom
niklashoelter:vantastar-simulator
Open

niklashoelter wants to merge 3 commits into
PyLabRobot:mainfrom
niklashoelter:vantastar-simulator

Conversation

@niklashoelter

@niklashoelter niklashoelter commented Nov 2, 2026 •

Copy link
Copy Markdown
Contributor

Builds on #1584 (declared_configuration_json): its commit shows here until that one is merged; the new commit is the last one.

The Problem

As requested in #1574: automated protocols with a VANTAstar could not run without the reader. The CLARIOstar has a simulator for this; the VANTAstar did not.

PR Content

VANTAstar(simulation=True), built as the CLARIOstar's simulator:

  • VANTAstarSimulationDriver: nothing reaches a wire. The configuration comes from declared_configuration_json, by default the tested reader's recording (RECORDING_VANTASTAR). Status comes from the simulated state; the drawer, the shaker and the temperature controller act at once (without a target there is no temperature, as on the CLARIOstar).
  • Absorbance (endpoint, spectra), fluorescence (endpoint, one to five channels) and luminescence reads check their arguments with the same code as a reader's read, refuse with the drawer out, and return random values: optical densities of 0-3.5 (where Voyager caps its exports), fluorescence counts up to 260,000 or 750,000,000 with enhanced dynamic range (the ceilings the reader states in its data). Luminescence stays within the fluorescence ceiling: no luminescence ceiling is known.
  • simulated_data: given an earlier result, a simulated read returns its values for the measured wells, checked against the read (wavelengths, optics, wells). A reader's reads take simulated_data too and ignore it.
  • Not simulated (NotImplementedError): fluorescence spectra, adjust_gain_and_focus, measure_z_profile, estimate_duration.
  • In the driver: the USB link is built in _build_io (the simulator builds none), and each read's check-and-build step is a helper shared with the simulator.
  • Guide section, API reference, changelog.

Testing

  • Simulator tests: setup from the recording, the device needing a configuration and no link, nothing sent, drawer and plate state, every simulated read with random values and with simulated_data (and the mismatches it refuses), argument checks and the drawer as on a reader, the temperature controller, the shaker, stop with a plate left in, a simulated read in run_cycles, the methods not simulated.
  • A reader's read with simulated_data returns what it read.
  • The existing VANTAstar tests pass unchanged.

🤖 Generated with Claude Code

https://claude.ai/code/session_01GjS7QqcG9eMHsBzAi58Xf3

…configuration

- the configuration decodes the fitted hardware from the INIT reply's modules: photomultipliers,
  temperature controller, pumps, spectrometer, monochromator slides, atmospheric control unit,
  stirrer, stacker and barcode readers
- `driver.save_configuration(path)` writes it, the serial number a placeholder;
  `declared_configuration_json` makes `setup` refuse a reader that disagrees with it on what is
  fitted (`FITTED_FIELDS`), as on the CLARIOstar
- the tested reader's configuration is kept as a recording (`RECORDING_VANTASTAR`)
- `VANTAstarSimulationDriver`: nothing reaches a wire; the configuration comes from a declared
  configuration (by default `RECORDING_VANTASTAR`), the drawer, shaker and temperature controller
  act at once, as on the CLARIOstar
- absorbance (endpoint, spectra), fluorescence (endpoint) and luminescence reads check their
  arguments as a reader's do and return random values, or those of `simulated_data`; a reader's
  reads take `simulated_data` and ignore it
- fluorescence spectra, `adjust_gain_and_focus`, `measure_z_profile` and `estimate_duration` are
  not simulated
@niklashoelter
niklashoelter requested review from a team and BioCam as code owners November 2, 2026 16:16

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants