Skip to main content

Control Leica microscopes with python

Project description

leicacam

build-status-image 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.0.tar.gz (23.1 kB view details)

Uploaded Source

Built Distribution

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

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for leicacam-0.4.0.tar.gz
Algorithm Hash digest
SHA256 2d34e55f9d3dc9faa722e4611a597df10bf95c77130f7ef8bb443cbfa22e1b6d
MD5 c9444be3fa9cc5bc0491c39b70894921
BLAKE2b-256 6708cab753d9cdb6f4b5bad85753d2c56bff4edc81d1ea652c2c432d9366b06c

See more details on using hashes here.

File details

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

File metadata

  • Download URL: leicacam-0.4.0-py3-none-any.whl
  • Upload date:
  • Size: 8.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/2.0.0 pkginfo/1.4.2 requests/2.22.0 setuptools/41.6.0 requests-toolbelt/0.8.0 tqdm/4.23.4 CPython/3.6.5

File hashes

Hashes for leicacam-0.4.0-py3-none-any.whl
Algorithm Hash digest
SHA256 57070d6df000775b24fe632ce06a46f40ee501e859e6ba9bfe2b55936d8eafff
MD5 fa6325516aba408c26f407d81b6f585b
BLAKE2b-256 4dfc8456d516893e833dc33ea6fd3b39df5a66ec18c85b0a3dc46df9521b5943

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