Skip to main content

Library for interacting with Etaluma microscopes and stages

Project description

etalumacontrol

Introduction

This library provides a simplified Python interface for interacting with Etaluma microscopes and motorized stages (600 and 700 series). Essentially, the code provides a simplified wrapper for Etaluma's own C# SDK using Python.NET. This package requires Python 3.8 (or higher, but Python.NET currently supports only up to 3.8).

Current state and limitations

This library was written to facilitate our own use case, but may also be useful to others. If there's a particular feature that you feel is lacking, feel free to submit an issue or PR. Etalumacontrol has only been tested on our LS720, but should work on any 600 and 700 series microscope. 32-bit versions of the LumaUSB and WSC DLL's are included, but have not been tested.

Installation

You may install etalumacontrol from PyPI by entering the following into a shell prompt, preferably after activating a virtual environment:

py -m pip install etalumacontrol

Sample program

Here's a sample program which moves the stage to a specified position, acquires an image, and displays it on the screen.

from etalumacontrol import EtalumaStage, LumaScope

# use the "with" statement to automatically handle resource allocation
with EtalumaStage() as stage, LumaScope() as scope:
    # move stage to center of microscopy slide
    stage.move('x', -62.9)
    stage.move('y', -38)

    # turn on the brightfield led
    scope.set_led(brightness=20)

    # turn up the gain
    scope.gain = 10

    # set shutter speed to 150 ms
    scope.shutter = 150

    # acquire image and show it
    img = scope.get_image()
    img.show()

License

Etalumacontrol is licensed under a 2-clause BSD license.

Etalumacontrol contains microscope firmware and DLL files kindly provided by Etaluma, which are not subject to this license. These files may be distributed as part of the etalumacontrol package, but for other uses please contact Etaluma directly.

Etalumacontrol contains code written by John Kelley. See its separate license file in the CypressFX directory.

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

etalumacontrol-0.1.1.tar.gz (193.0 kB view hashes)

Uploaded Source

Built Distribution

etalumacontrol-0.1.1-py3-none-any.whl (191.7 kB view hashes)

Uploaded Python 3

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