Using Multi-Dimensional Acquisition of Micro-Manager from Python

Micro Manager (MM) allows to call the core functionalities in Python, which is very convenient to control the hardware without opening the Micro Manager software.

The GUI allows to set an acquisition (Objective, Autofocus, Exposure, Channel…) and to save it as a file.
However I could not find a way to load and run the resulting SequenceSettings file using the Python binding.

It seems that the necessary AcquisitionManager and AcquisitionEngine are not available in Python, only the MMcore functions.

Any idea of possible workaround ?

You are right, here is a relevant thread on MM github issues: https://github.com/micro-manager/micro-manager/issues/666#issuecomment-452970872

I am not aware of any full implementation of Acquisition Engine in python, depends on what you want to do, you can potentially do that in python.

Here is a demo plugin for using MicroManager in ImJoy: https://github.com/oeway/ImJoy-Plugins/blob/master/repository/microManager.imjoy.html

What we do is to first set the properties, then start an acquisition thread , and run mmc.startContinuousSequenceAcquisition(0). In the acquisition thread, there is an infinite loop to check remaining images in the ring buffer, if there is any image, we update the display at the moment, but you can add a line to save it with tiffWriter.

You can also try and test the plugin in ImJoy directly: https://imjoy.io/#/app?plugin=oeway/ImJoy-Plugins:MicroManager . After installed the plugin, you can click the plugin icon, choose edit to change the micromanager folder path and configuration file path, then save it, you should be able to get it running. Also notice that you will need to install and run the plugin engine.

1 Like