Skip to main content

Python package for unified MMCore access through pymmcore or ZMQ-MMCoreJ + associated utilities

Project description

License PyPI

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


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.10.tar.gz (9.6 kB view details)

Uploaded Source

Built Distribution

mmpycorex-0.3.10-py2.py3-none-any.whl (10.2 kB view details)

Uploaded Python 2 Python 3

File details

Details for the file mmpycorex-0.3.10.tar.gz.

File metadata

  • Download URL: mmpycorex-0.3.10.tar.gz
  • Upload date:
  • Size: 9.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/5.1.0 CPython/3.12.5

File hashes

Hashes for mmpycorex-0.3.10.tar.gz
Algorithm Hash digest
SHA256 3eb4d7bddeeb919ddc6f203773f15f9dd42607cf8767b253591dd535958986e3
MD5 e77017d59c9a15bb2ed9169362bfca8e
BLAKE2b-256 7859211be6e51a0f01de60091dd1b96e212a9e385c8e590d35402fc783ed050f

See more details on using hashes here.

File details

Details for the file mmpycorex-0.3.10-py2.py3-none-any.whl.

File metadata

  • Download URL: mmpycorex-0.3.10-py2.py3-none-any.whl
  • Upload date:
  • Size: 10.2 kB
  • Tags: Python 2, Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/5.1.0 CPython/3.12.5

File hashes

Hashes for mmpycorex-0.3.10-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 21aa43f97427f3208e97c05d162f22e5facbc8428ae41ea867a8a276da7d504c
MD5 c138ef282e4146cf8e0a5d8fff7bbb47
BLAKE2b-256 ac042f45be0d35a51b98742b520f38bab41e0ddd98170daeab9c00c2289aef94

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page