qi2lab-OPM-v2 | Next generation control for iterative multiplexing and adaptive optics oblique plane microscopy (AO-OPM)
This package is the 2nd generation of the Arizona State University Quantitative imaging and Inference Lab (qi2lab) oblique plane microscopy (OPM) with adaptive optics (AO). This generation is built from Pymmcore-plus and Pymmcore-gui with the integration of custom hardware controls and multi-dimensional acquisition structures. A custom acquisition handler is used to format data to be compatible with our 2nd generation processing software.
The custom acquisition's core functions extend Pymmcore-gui capabilities to perform various imaging modalities including projection imaging, mirror scanning, stage scanning and standard 2d imaging.
The goal is to utilize Pymmcore-plus and Pymmcore-gui to the fullest and integrate custom features as needed.
- Sensorless AO with Imagine Optic Mirao52E and wavekitpy
- NIdaq control through PyDAQmx
- Fluidics program compatible
- Remote autofocus
- Configurator for setting custom acquisition settings
- Custom multi-dimensional acquisition event strutures
- OME-Zarr data handler using ome-writers with the TensorStore backend
Clone the repository:
git clone https://github.com/QI2lab/opm-v2.git
cd opm-v2Install the locked Python environment with uv:
uv sync --extra test --lockedpymmcore is intentionally not a direct project dependency. The pinned GitHub
revision of pymmcore-plus installs the compatible prebuilt pymmcore wheel.
Install Micro-Manager and its device adapters through the pymmcore-plus CLI:
uv run mmcore installVendor SDKs are still required for physical NI-DAQ and Imagine Optic hardware. They are not required for demo mode or automated tests.
Launch against Micro-Manager's installed demo devices and simulated external OPM controllers:
uv run opm-v2 --demoLaunch the physical instrument with an explicit Micro-Manager configuration:
uv run opm-v2 --config opm_config.json --mm-config OPM_mmgr.cfgInstall the official Micro-Manager test adapters and run the behavior suite:
uv run mmcore install --test-adapters --plain-output
uv run pytestRun scripts from the repository root through the locked environment. Every
script exposes its current arguments through --help:
uv run python scripts/stage_positions.py --help
uv run python scripts/ao_positions.py --help
uv run python scripts/ao_grid_mapping.py --helpstage_position_generation.py and stage_to_ao_grid_positions.py remain as
compatible entry points for the corresponding position utilities. Acquisition
inspection and GIF generation accept a TensorStore Zarr v3 array node (for
example, acquisition.ome.zarr/0). The AO inspection and plotting utilities
accept the current ao_results.zarr layout; the explicitly deprecated parser
is retained only for existing legacy AO result stores.
Hardware-facing utilities are configurable and safe to exercise without physical devices:
uv run python scripts/fluidics_triggering.py --simulate --rounds 1
uv run python scripts/push_pull.py --simulate-actuators 52