Skip to main content

Pygellan

Pygellan is a Python library for enabling microscope acquisition control and data analysis. It works together with the Micro-manager plugin, Micro-magellan. Pygellan has two subpackages, pygellan.acquire and pygellan.magellan_data which are for data acquisition/hardware control and data anlysis, respectively. Pygellan is integrated with other projects in the scientific python ecosystem, including Napari (for data visualization) and Dask (for large scale data analysis). Pygellan development is currently in alpha--new features are being added and there are not yet guarantees on the stability of the API. Information about future development can be found on the issues page. Feel free to add comments, ideas, or other feedback on the issues page.

Setup

  1. Install pygellan using pip install pygellan (Pygellan is tested with Python 3.6 but should also work with other versions of Python3)

If using pygellan for acquisition control with micro-manager, you also must:

  1. Download and install Nico Stuurman's 2.0gamma build of micro-manager. Latest nightly builds can be found here

  2. Open Micro-manager, select tools-options, and check the box that says "Run server on port 4827"

Acquisition control

To use Pygellan for acqusition control, simply open the micro-manager2.0gamma GUI as usual and launch the Micro-magellan plugin. Start a python process in a way of your choosing (e.g. terminal, IDE, Jupyter notebook). Type:

from pygellan.acquire import PygellanBridge

bridge = PygellanBridge() #establish communication with Magellan

If the bridge object is created successfully, you are connected to Micro-Magellan and can use the rest of the pygellan.acquire API.

Controlling the Micro-manager core

The micro-manager core provides low-level functionality like capturing images and controlling individual devices. An example can be seen here.

The core API is discovered dynamically at runtime, though not every method is implemented. Typing core. and using autocomplete with IPython is the best way to discover which functions are available. Documentation on for the Java version of the core API (which Pygellan ultimately calls) can be found here.

Controlling Micro-magellan acquisitions

This area is still under active development. Future plans can be seen on the issues tab with the enhancement label. Comments/feedback./requests for different use cases are welcome.

In the mean time, some basic functionality is already available:

See this example for how to start and stop Micro-magellan acquisitions through Python.

This example shows how to call the various acquisition settings on the Micro-magellan GUI to automatically setup experiments

Reading data in Python

The pygellan.magellan_data API enables reading of data acquired with pygellan/Micro-magellan directly in python. Tiles can be loaded individually, or all data can be loaded simulataneously into a memory-mapped Dask array, which works like a numpy array and also allows scalable processing of large datasets and viewing data in Napari. More information can be seen in this example

Metadata

Release files for pygellan 0.2.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for pygellan 0.2.0
File Size Uploaded Provenance Actions
pygellan-0.2.0.tar.gz 13.1 kB Without provenance Details for pygellan-0.2.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for pygellan 0.2.0
File Interpreter ABI Platform Actions
pygellan-0.2.0-py3-none-any.whl Python 3 none any Details for pygellan-0.2.0-py3-none-any.whl

Total release size: 27.8 kB

Release files / pygellan-0.2.0.tar.gz

Download URL pygellan-0.2.0.tar.gz
Size 13.1 kB
Tags Source
SHA-256 checksum
How to use checksums
e3f0a3fedc2e99a9a79786c97b3d72adcd80ecc30c8478496c07300a6663daa9
BLAKE2b-256 checksum
How to use checksums
e7dfd3bd64d9d446e39f681140323359afc545134e0c9ccc4f449cfe511b1286
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.13.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.32.1 CPython/3.6.8

Release files / pygellan-0.2.0-py3-none-any.whl

Download URL pygellan-0.2.0-py3-none-any.whl
Size 14.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
3610f858462cd876c3cbe68e895add5fb4a9ad893736e69a0a7ae68d1550a788
BLAKE2b-256 checksum
How to use checksums
8f3e098dd4f97d40fea5a6c94a7044483dab3bee7a032b563d30fe37e790d6c0
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.13.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.32.1 CPython/3.6.8

Security for pygellan 0.2.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page