A Micro-Manager GUI based on pymmcore-widgets and pymmcore-plus.
It has been designed to record calcium imaging experiments with or without optical stimulation using Arduino and Thorlabs Components (paper in press...).
20250711_SupplementaryVideo1.mp4
- Installation
- Run the Micro-Manger GUI
- Run the Micro-Manger GUI with SlackBot
- Run the Plate Viewer GUI
If you have uv installed, you can run micromanager-gui directly without installing it using:
uvx --from "git+https://github.com/fdrgsp/micromanager-gui" mmgui
Create a virtual environment and install the package using uv (pip):
uv pip install "git+https://github.com/fdrgsp/micromanager-gui"Note: this is also installing the PyQt6 library for the GUI.
You also need to install the Micro-Manager device adapters and C++ core provided by mmCoreAndDevices. This can be done by following the steps described in the pymmcore-plus documentation page.
mmguiBy passing the -c or -config flag, you can specify the path of a micromanager configuration file you want to load. For example:
mmgui -c path/to/config.cfgBy passing the -s or -slack boolean flag, you will be able to use a SlackBot to control the microscope. In particular, you will be able to start and stop the acquisition and to get the progress of the acquisition.
For example:
mmgui -c path/to/config.cfg -s TrueTo enable the SlackBot, you first need to follow the instructions in the Slack Bolt documentation to create your Slack App and get your SLACK_BOT_TOKEN and SLACK_APP_TOKEN. In particular, go through the Create an app, Tokens and installing apps and Setting up your project sections (NOTE: you can use this App Manifest to create your Slack App).
The OAuth & Permissions Scope required are:
channels:historychannels:readchat:writecommands
Since this SlackBot communicates with the Micro-Manager through a set of Slack commands, you also need to set up the following command in your Slack App Slash Commands section:
/run: Start the MDA Sequence/cancel: Cancel the current MDA Sequence/progress: Get the current MDA Sequence progress/clear: Clear the chat from the SlackBot messages/mda: Get the current MDASequence
Now that you have your SLACK_BOT_TOKEN and SLACK_APP_TOKEN, you can either create a .env file in the root of this project containing the SLACK_BOT_TOKEN and SLACK_APP_TOKEN variables (e.g. SLACK_BOT_TOKEN=xoxb-... and SLACK_APP_TOKEN=xapp...) or set them as global environment variables (e.g. export SLACK_BOT_TOKEN=xoxb-... and
export SLACK_APP_TOKEN=xapp...).
The last step is to grant access to the desired Slack channel to the Slack App. This can be done by inviting the Slack App to the desired Slack channel: right-click on the channel name, select View channel details, select the Integrations tab and Add Apps. You now need to add to the .env file (or as global environment) a variable named CHANNEL_ID containing the Slack channel ID.
After that, you can run the GUI with the -s or -slack flag set to True and start using the Slack commands to interact with the microscope.
display_information:
name: Eve
description: A SlackBot for MicroManager & pymmcore-plus
background_color: "#737373"
features:
bot_user:
display_name: Eve
always_online: false
slash_commands:
- command: /run
description: Run the MDA Acquisition
should_escape: true
- command: /cancel
description: Cancel the ongoing MDA Acquisition
should_escape: true
- command: /progress
description: Return the progress of the ongoing MDA Acquisition
should_escape: true
- command: /clear
description: Clear the chat form the bot messages
should_escape: true
- command: /mda
description: Return the current MDASequence.
should_escape: true
oauth_config:
scopes:
bot:
- chat:write
- channels:read
- channels:history
- commands
settings:
interactivity:
is_enabled: true
org_deploy_enabled: false
socket_mode_enabled: true
token_rotation_enabled: falseTo explore the calcium imaging data acquired with micromanager-gui, you can use cali, a GUI that allows you to segment, analyze and visualize the calcium imaging data.
To run micromanager-gui and cali together, you can use:
-
uvx -p 3.12 --from "git+https://github.com/fdrgsp/micromanager-gui[cali4]" mmguifor Cellpose 4.x (cellpose-sam) (use python 3.11 or greater) -
uvx -p 3.12 --from "git+https://github.com/fdrgsp/micromanager-gui[cali3]" mmguifor Cellpose 3.x (use python 3.11 or greater)
If you open the console widget from the micromanager-gui menu (Widget > Console), you can run cali by typing cali() in the console.
To install micromanager-gui with cali support, you can use:
-
uv pip install "git+https://github.com/fdrgsp/micromanager-gui[cali4]"for Cellpose 4.x (cellpose-sam) (use python 3.11 or greater) -
uv pip install "git+https://github.com/fdrgsp/micromanager-gui[cali3]"for Cellpose 3.x (use python 3.11 or greater)