Last updated: 2026-03-13
Purpose: define how to build a complete Micro-Manager demo for labclaw that
plays the same strategic role that TopSpin plays today.
The bar is not "we can parse a TIFF". The bar is:
- no live microscope required
- acquisition path is real enough to exercise control logic
- output data is saved in production-like formats
- downstream processing and analysis can run on the result
- the entire flow is demoable for customers and repeatable in CI
For TopSpin, the important pattern is:
- software can be demonstrated meaningfully without a live instrument
- there is a believable data path for acquisition and processing
- the product story is end-to-end, not a disconnected parser demo
The Micro-Manager equivalent is not one single feature. It is the combination
of:
DemoCameraplus the official demo configuration for synthetic microscope hardwareFakeCamerafor replaying realistic image content from diskMMCore/pymmcorefor low-level controlpycro-managerfor acquisition orchestration and dataset handlingOME-TIFFandNDTifffor downstream analysis
From official documentation:
DemoCameracreates virtual demo devices across camera, filter wheel, light path, objective, stage, XY stage, autofocus, and shutter, and is explicitly described as useful for test-driving Micro-Manager without hardware.- Micro-Manager's Python story centers on
pymmcore/pymmcore-plusandpycro-manager. - The recommended way to load devices is via a Micro-Manager config file such as
MMConfig_demo.cfg. pycro-managersupports both GUI-attached use and headless mode.pycro-manageracquisitions save real datasets to disk and expose them through aDatasetAPI.- Micro-Manager supports three main save formats: separate TIFFs, OME-TIFF image
stacks, and
NDTiff. FakeCameracan load arbitrary images from disk and act like a virtual camera.
This is enough to build a fully usable no-hardware demo.
We should build the demo in two layers.
Goal:
- Show a working microscope control and acquisition path immediately.
Mechanism:
- Install Micro-Manager.
- Load
MMConfig_demo.cfg. - Start
pycro-managerorpymmcore. - Run a time / channel / z acquisition.
- Save the dataset to disk.
- Process and analyze it through
device-skills.
Why this matters:
- Fastest path to a believable "instrument control" story.
- Best fit for CI.
- Zero hardware dependency.
Goal:
- Make the demo outputs look like real biology instead of abstract demo frames.
Mechanism:
- Use
FakeCamerawith curated input images on disk. - Optionally vary images by stage position so XY moves look meaningful.
- Run the same acquisition pipeline as Layer A.
Why this matters:
- Closer to what
TopSpinexamdata does for NMR. - Better for customer demos, screenshots, and downstream analysis quality.
We should explicitly build two demo versions on top of one shared core.
Purpose:
- real execution path
- repeatable end-to-end pipeline
- CI and local developer workflow
- operational baseline we trust
What the user sees:
- structured progress logs
- saved dataset on disk
- generated preview image
- generated summary report
Primary value:
- this is the "truth path"
- fastest path to a stable MVP
- best path for automated testing
Purpose:
- customer-facing visual demonstration
- operator-friendly story
- closer experiential match to the way
TopSpindemos feel
What the user sees:
- the Micro-Manager GUI opens
- CUA interacts with visible controls
- acquisition starts from the GUI surface
- images and results update in a visible way
- the same downstream processor and report run at the end
Primary value:
- better sales demo
- easier for a user to understand than a terminal-only flow
- useful later as a guided operator surface
Version B must not become a separate implementation stack.
The correct architecture is:
- shared acquisition and processing core
- API / headless path executes directly
- GUI / CUA path is a presentation and control wrapper over the same core
If GUI mode has separate business logic, it will drift and become unreliable.
Both versions should share the same internal layers.
Responsibilities:
- locate Micro-Manager install
- select runtime mode: native GUI, headless, or GUI-attached
- select config file
- select simulation source:
DemoCameraorFakeCamera
Responsibilities:
- load config
- expose device list
- snap / acquire through Python interfaces
- save datasets
- report progress and errors
Recommended split:
pymmcore-plusfor config and direct device accesspycro-managerfor acquisition orchestration and dataset handling
Responsibilities:
- reopen saved dataset
- normalize metadata
- generate summary
- generate preview images
- feed brain / report layer
Mode-specific:
- API version presents logs, artifacts, and summaries
- GUI / CUA version presents windows, visible interactions, and the same output artifacts at the end
For MVP, the preferred deployment is native macOS.
Reasoning:
- Micro-Manager supports macOS directly.
- The no-hardware demo story does not require virtualization.
- Native setup is less fragile than GUI automation through a VM display stack.
- Headless and GUI-attached Python integration are easier to debug natively.
VM should be treated as optional later packaging, not the first target.
Use VM only if we later need:
- tightly isolated demo environments
- controlled customer-facing appliance packaging
- a reproducible GUI automation box that should not depend on the host machine
The same principle applies as with TopSpin: VM can help packaging, but it
should not define the architecture.
This should be the first complete demo.
Flow:
- Start Micro-Manager headlessly with the demo config.
- Run a multi-dimensional acquisition from Python.
- Save to disk in a format our processor supports.
- Re-open the saved dataset.
- Produce a structured summary.
- Produce one or two visualization artifacts.
- Feed the summary into a simple imaging brain prompt.
Why first:
- It is the smallest demo that proves the full product chain.
- It does not depend on GUI automation.
- It is testable in CI.
This should come right after Demo 1.
Flow:
- Launch with
FakeCameraor a realistic synthetic dataset source. - Run a scripted acquisition with channel, z, and XY variation.
- Save to disk.
- Show one acquisition preview and one analysis summary.
- Optionally expose a simple UI or notebook wrapper for operator interaction.
Why second:
- Same architecture as Demo 1, but better storytelling quality.
- Better analog to the "TopSpin with examdata" experience.
This should follow only after Demo 1 is stable and Demo 2 has credible image content.
Flow:
- Launch Micro-Manager GUI on macOS.
- Use CUA to activate the window and navigate to a prepared acquisition setup.
- Trigger the acquisition from visible controls.
- Let the shared backend save the dataset.
- Run the same processor / visualizer / brain path as the API version.
- Present a final report with links to saved artifacts.
Why third:
- it improves sales and operator trust
- but it should never precede the stable API baseline
- otherwise we risk building a nice-looking demo with weak execution integrity
"Run one command and show that labclaw can operate a simulated microscope, produce data, and analyze the result without any hardware."
- Micro-Manager install path
- config file path, defaulting to
MMConfig_demo.cfg - acquisition recipe:
- channels
- time points
- z range
- output directory
- saved dataset path
- JSON-like acquisition summary
- preview image path
- short report text
Even without GUI, the effect is visible through:
- progress logs during acquisition
- event counters
- one live or post-run preview image
- one structured summary at the end
- saved artifacts on disk
This is enough for engineering validation and internal demos.
The first runnable interface should be a script such as:
python devices/micro-manager/demo_headless.py --output /tmp/mm-demoAnd optionally a repo-level wrapper later:
make micromanager-demo"Show a user that labclaw can visibly operate Micro-Manager like an operator, while still producing a real saved dataset and downstream analysis."
- Micro-Manager GUI installed and runnable on macOS
- a stable demo configuration
- a prepared acquisition layout with limited branching
- screenshot / accessibility / input permissions configured
Do not let CUA improvise across the entire GUI.
Instead:
- predefine the acquisition workspace
- restrict the GUI flow to a small number of stable actions
- use CUA mainly for:
- app activation
- config selection
- acquisition start
- confirming completion state
If we later find useful accessibility hooks on macOS, they should be preferred over purely visual automation.
GUI mode should show:
- the Micro-Manager window
- visible acquisition starting
- image updates or acquisition counters
- final preview artifact and report outside or alongside the app
GUI mode should not own:
- dataset parsing
- metadata normalization
- report generation
- acquisition semantics beyond the visible launch sequence
Those all belong in the shared core.
Use two control surfaces, not one:
pymmcore-plusorpymmcorefor direct low-level control and config loading.pycro-managerfor acquisition orchestration, saving, callbacks, and headless execution.
Reasoning:
pymmcoreis the simplest path for loadingMMConfig_demo.cfg, discovering devices, and snapping images.pycro-manageris the right surface for multi-dimensional acquisition and dataset management.
For GUI mode:
- the CUA layer should invoke a bounded orchestration command or adapter method, not duplicate acquisition logic through clicks alone
- the GUI path should be thought of as "visible initiation and monitoring" rather than "all logic lives in the GUI"
Support both:
OME-TIFFNDTiff
Reasoning:
OME-TIFFis the safer interoperability story for a broad ecosystem.NDTiffis the more native high-performance story for Micro-Manager and Pycro-Manager.
For the first demo, we should accept either, but strongly prefer supporting
NDTiff in the processor because that aligns with current Pycro-Manager usage.
The first MicroManagerProcessor should support:
- opening a saved dataset from disk
- reading summary metadata
- reading image planes by axis
- building a normalized imaging stack abstraction
- computing at least one projection or preview image
- exporting a compact text summary for LLM context
The first MicroManagerBrain does not need to be fancy.
It should:
- read normalized stack metadata
- describe channels, time points, z planes, dimensions, and basic quality cues
- explain what was acquired in human-readable language
- make simple next-step suggestions
The first reproducible script should look conceptually like this:
from pycromanager import Acquisition, multi_d_acquisition_events, start_headless
mm_app_path = "/path/to/Micro-Manager"
config_file = mm_app_path + "/MMConfig_demo.cfg"
start_headless(mm_app_path, config_file)
with Acquisition(directory="/tmp/demo_data", name="mm_demo", show_display=False) as acq:
events = multi_d_acquisition_events(
num_time_points=4,
z_start=0,
z_end=4,
z_step=1,
order="tz",
)
acq.acquire(events)
dataset = acq.get_dataset()After that, our own processor should take over.
The GUI wrapper should conceptually look like this:
adapter = MicroManagerAdapter(mode="gui", simulation="demo")
adapter.connect()
adapter.prepare_demo_workspace()
adapter.launch_gui()
# CUA performs a bounded set of visible actions:
# - focus app
# - confirm config
# - start acquisition
result = adapter.acquire(recipe)
summary = adapter.process(result["dataset_path"])
report = adapter.summarize(summary)In other words, GUI mode still delegates to the same adapter contract.
Initial target:
devices/micro-manager/skill.yamldevices/micro-manager/SOUL.mddevices/micro-manager/profile.yamldevices/micro-manager/adapter.pydevices/micro-manager/processor.pydevices/micro-manager/brain.pydevices/micro-manager/visualizer.pydevices/micro-manager/tests/test_micro_manager.py
Responsibilities:
- load a config file, defaulting to demo config when in simulation mode
- start headless, attach to a running server, or coordinate GUI mode
- enumerate loaded devices
- run basic acquisitions through
pycro-manager - expose a stable
acquire()andlist_datasets()interface - expose progress events for both API and GUI presentation layers
Responsibilities:
- load
NDTiffandOME-TIFF - normalize metadata into a common imaging structure
- provide summary and preview utilities
Responsibilities:
- consume processor outputs
- provide acquisition summary and lightweight interpretation
Success means:
MMConfig_demo.cfgloads- a headless acquisition completes
- a dataset is saved to disk
- processor can open it
Success means:
adapter.acquire()produces dataprocessor.extract()returns structured resultsvisualizercreates one artifactbrain.analyze()returns a readable report
Success means:
FakeCamerareplays curated image content- the same pipeline works unchanged
- the demo looks plausible to a microscopy user
Success means:
- Micro-Manager GUI launches and is controllable in a bounded workflow
- CUA can reliably start the prepared demo acquisition
- the same downstream pipeline runs after acquisition
- GUI mode does not fork business logic away from API mode
Success means:
- one command or script runs the whole flow
- no hardware is required
- the output is stable enough for repeated demos
Do now:
- headless demo config path
pycro-manageracquisition- saved dataset processing
- one summary artifact
- one visual artifact
- GUI demo design and contract definition
Do shortly after MVP:
- bounded GUI / CUA wrapper over the same core
- prepared workspace for customer walkthroughs
- optional
FakeCamerarealism mode
Defer:
- broad open-ended GUI automation
- exotic plugins
- adaptive acquisition complexity
- hardware triggering complexity
- large-scale UI work
Mitigation:
- Require the demo to run through
device-skillsadapter and processor classes, not only ad hoc notebook code.
Mitigation:
- Add a second-layer
FakeCamerareplay demo early.
Mitigation:
- Normalize everything into a shared imaging stack abstraction from the start.
Mitigation:
- Make headless demo success the first gate.
Mitigation:
- enforce one shared adapter contract
- keep GUI mode as a thin wrapper
- test that GUI mode and API mode produce the same structured result shape
The first complete Micro-Manager demo for labclaw should be:
- headless
- simulation-first
- driven by
MMConfig_demo.cfg - acquired through
pycro-manager - saved to disk in
NDTifforOME-TIFF - reopened by our processor
- summarized and visualized by our own code
Then immediately after that, we should add:
- a
FakeCamerarealism mode using curated biological images on disk - a bounded GUI / CUA walkthrough that triggers the same core pipeline
That combination is the closest Micro-Manager equivalent to the role TopSpin
plays for us today.
- prove native macOS install
- prove headless demo config acquisition
- define output format choice
- implement
MicroManagerAdapter - implement
MicroManagerProcessor - implement one visual artifact and one summary report
- add
FakeCamerarealism path - harden dataset reopening and normalization
- package one command end-to-end demo
- implement bounded GUI / CUA wrapper
- script the prepared workspace walkthrough
- validate that GUI mode still uses the same result pipeline
- Micro-Manager homepage: https://micro-manager.org/
- DemoCamera: https://micro-manager.org/DemoCamera
- FakeCamera: https://micro-manager.org/FakeCamera
- Using the Micro-Manager python libraries: https://micro-manager.org/Using_the_Micro-Manager_python_library
- Micro-Manager file formats: https://micro-manager.org/Micro-Manager_File_Formats
- pycro-manager README: https://github.com/micro-manager/pycro-manager
- pycro-manager acquisitions overview: https://pycro-manager.readthedocs.io/en/latest/acq_overview.html
- pycro-manager API reference: https://pycro-manager.readthedocs.io/en/latest/apis.html
- pycro-manager saved image callbacks: https://pycro-manager.readthedocs.io/en/latest/image_saved_callbacks.html
- pycro-manager acquisition hooks: https://pycro-manager.readthedocs.io/en/latest/acq_hooks.html