Skip to main content

Control Leica microscopes with python

Project description

leicacam

build-badge pypi-version wheel Documentation Status

Overview

Control Leica microscopes with python

Installation

  • The latest version of leicacam requires Python 3.5+
  • If you need to keep using Python 2.7, pin your version of leicacam to 0.3.0.

Install using pip:

pip3 install leicacam

Example

Communicate with microscope

from leicacam import CAM

cam = CAM()   # initiate and connect, default localhost:8895

# some commands are created as short hands
# start matrix scan
response = cam.start_scan()
print(response)

# but you could also create your own command with a list of tuples
command = [('cmd', 'enableall'),
           ('value', 'true')]
response = cam.send(command)
print(response)

# or even send it as a bytes string (note the b)
command = b'/cmd:enableall /value:true'
response = cam.send(command)
print(response)

Documentation

See available commands in the API reference: http://leicacam.rtfd.org.

Development

Install dependencies and link development version of leicacam to pip:

pip install -r requirements_dev.txt

Code formatting

We use black code formatter to automatically format the code. This requires Python 3.6 for development.

black ./

Testing

tox

Build documentation locally

To build the documentation:

pip install -r docs/requirements.txt
make docs

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

leicacam-0.4.2.tar.gz (11.1 kB view details)

Uploaded Source

Built Distribution

leicacam-0.4.2-py3-none-any.whl (8.2 kB view details)

Uploaded Python 3

File details

Details for the file leicacam-0.4.2.tar.gz.

File metadata

  • Download URL: leicacam-0.4.2.tar.gz
  • Upload date:
  • Size: 11.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/47.1.1 requests-toolbelt/0.9.1 tqdm/4.46.1 CPython/3.7.7

File hashes

Hashes for leicacam-0.4.2.tar.gz
Algorithm Hash digest
SHA256 e3cc2757b74f55e51b8667af352580c4efb655be212fa3f9f98abd4ccb287d94
MD5 537314ce6c3c4466a68cd0a27060823e
BLAKE2b-256 22809738892c7fe191ca360a536cbd4f9f8ec4e8594264a3ee5eec7f1f1848f8

See more details on using hashes here.

File details

Details for the file leicacam-0.4.2-py3-none-any.whl.

File metadata

  • Download URL: leicacam-0.4.2-py3-none-any.whl
  • Upload date:
  • Size: 8.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/47.1.1 requests-toolbelt/0.9.1 tqdm/4.46.1 CPython/3.7.7

File hashes

Hashes for leicacam-0.4.2-py3-none-any.whl
Algorithm Hash digest
SHA256 1fc056a7d874a7b1ac44fcb848ff497f854e4238d59cb228a7f96c15ea98431f
MD5 6ec08b1dfd2cea08e69cc8fd981e73d7
BLAKE2b-256 f09ce1eb5f12dcfaf82f64a01691f6238c1b53d3e27ffa733dcece8349930c10

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