Python package for unified MMCore access through pymmcore or ZMQ-MMCoreJ + associated utilities
Project description
mmpycorex
This package contains modules for downloading and installing MM through python, and for accessing the Java core of a running micro-manager instance, creating a headless java core object for access through python, or creating and instance of the python wrapper of the core (pymmcore)
Installation
pip install mmpycorex
Programatically installing Micro-Manager
- Python utility functions for downloading and installing Micro-Manager
from mmpycorex import download_and_install_mm, find_existing_mm_install
# this automatically installs the latest nightly build
# specify destination="your/custom/path", otherwise it will default to 'C:/Program files/Micro-Manager/'
# on windows or the home directory on mac
installed_path = download_and_install_mm()
Accessing the Java core through python
### Java Core example
from mmpycorex import create_core_instance, terminate_core_instances, get_default_install_location
# If micro-manager is alread running, you can get access to the core directly
# (just make sure the "run server" in the tools options dialog is checked)
# Otherwise you must create an instance of the Core in headless mode
mm_location = get_default_install_location() # 'C:/Program files/Micro-Manager/'
config_file = 'MMConfig_demo.cfg'
create_core_instance(mm_location, config_file, python_backend=False) # Create a remote MMCoreJ object
# Now that a core is running (either through the MM App or headless mode), create an object to access it
core = Core()
#### use the core
terminate_core_instances()
Accessing the python core (pymmcore)
### pymmcore example
from mmpycorex import create_core_instance, terminate_core_instances
# Otherwise you must create an instance of the Core in headless mode
mm_location = get_default_install_location() # 'C:/Program files/Micro-Manager/'
config_file = 'MMConfig_demo.cfg'
create_core_instance(mm_location, config_file, python_backend=True) # Create pymmcore instance
# Now that a core is running (either through the MM App or headless mode), create an object to access it
core = Core()
#### use the core
terminate_core_instances()
Install issues on M1 Macs
https://github.com/conda-forge/miniforge/issues/165#issuecomment-860233092
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
mmpycorex-0.3.9.tar.gz
(9.5 kB
view hashes)
Built Distribution
Close
Hashes for mmpycorex-0.3.9-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 938e82e82841308308c713f1913a59ed2380c1653f892b2b0e89515942668bb7 |
|
MD5 | 482e86d1adc9fe79d09993be86d45df4 |
|
BLAKE2b-256 | 9bcab67533a6c6a33ed407974843b8d4c8146dc1d3af2def40859fc37be5b1e5 |