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

Uploaded Source

Built Distribution

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

Uploaded Python 3

File details

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

File metadata

  • Download URL: leicacam-0.4.1.tar.gz
  • Upload date:
  • Size: 24.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.4.2 requests/2.22.0 setuptools/46.1.3 requests-toolbelt/0.8.0 tqdm/4.23.4 CPython/3.6.5

File hashes

Hashes for leicacam-0.4.1.tar.gz
Algorithm Hash digest
SHA256 b40f855806170361baa088370a725fe828d6360dac5d137436131439d2e66563
MD5 3b11b02355d6a38cb1f7b3020c5b6f34
BLAKE2b-256 732ad58b39e92f0498a2aac56f943803ae9002d830471225abb813ec857d7664

See more details on using hashes here.

File details

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

File metadata

  • Download URL: leicacam-0.4.1-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.4.2 requests/2.22.0 setuptools/46.1.3 requests-toolbelt/0.8.0 tqdm/4.23.4 CPython/3.6.5

File hashes

Hashes for leicacam-0.4.1-py3-none-any.whl
Algorithm Hash digest
SHA256 e08a8e02ee50e134f1f811a7cdb745171dbf4826c3b3d74e9476f50800bdaea5
MD5 66611f5bff647984a86ac9165c0208d0
BLAKE2b-256 49011a6fcf1121d3c1514e005e2515e08bdcd13e21a85e04edea20948299c486

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