Multidimensional Acquisition#
Note
There is much more extensive documentation on the MDA acquisition engine in the Acquisition Engine guide
pymmcore-plus includes a basic Multi-dimensional Acquisition (mda) engine
CMMCorePlus.run_mda that accepts
experimental sequences defined using
useq-schema.
| run_mda.py | |
|---|---|
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 | |
pymmcore-plususesuseq-schemato define experimental sequences. You can either construct auseq.MDASequenceobject manually, or from a YAML/JSON file.- Access global singleton:
CMMCorePlus.instance - See
CMMCorePlus.loadSystemConfiguration - For info on all of the signals available to connect to, see the MDA Events API
- To avoid blocking further execution,
run_mdaruns on a new thread. (run_mdareturns a reference to the thread in case you want to do something with it, such as wait for it to finish with threading.Thread.join)
Cancelling or Pausing#
You can pause or cancel the mda with the
CMMCorePlus.mda.toggle_pause
or CMMCorePlus.mda.cancel
methods.
Registering a new MDA Engine#
By default the built-in MDAEngine will be used
to run the MDA. However, you can create a custom acquisition engine and register
it use
CMMCorePlus.register_mda_engine.
Your engine must conform to the engine protocol defined by
pymmcore_plus.mda.PMDAEngine. To ensure that your engine conforms you can
inherit from the protocol.
You can be alerted to the the registering of a new engine with the
core.events.mdaEngineRegistered
signal.
@mmc.events.mdaEngineRegistered
def new_engine(new_engine, old_engine):
print('new engine registered!")