Skip to main content

Python library to access Hamamatsu using DCAM or RemoteEX interface

Project description

Hamamatsu python library

Hamamatsu C11440-36U

This library is used to control basic features of Hamamatsu cameras. It is composed of a core library, an optional simulator and an optional lima plugin together with its tango device class.

It has been tested with C11440-36U model, but should work with other models.

Installation

From within your favorite python environment type:

$ pip install hamamatsu

Usage

import logging
from hamamatsu.dcam import dcam, Stream

logging.basicConfig(level=logging.INFO)

with dcam:
    camera = dcam[0]
    with camera:
        print(camera.info)
        print(camera['image_width'].value, camera['image_height'].value)

        # Simple acquisition example
        nb_frames = 10
        camera["exposure_time"] = 0.1
        with Stream(camera, nb_frames) as stream:
                logging.info("start acquisition")
                camera.start()
                for i, frame_buffer in enumerate(stream):
                    frame = copy_frame(frame_buffer)
                    logging.info(f"acquired frame #%d/%d: %s", i+1, nb_frames, frame)
                logging.info("finished acquisition")

Lima

Install extra dependencies with:

$ pip install hamamatsu[lima]

Command line usage:

$ limatb hamamatsu scan

$ limatb hamamatu -i 0 info

$ limatb hamamatu -i 0 dump

$ limatb hamamatu -i 0 acquire -n 10 -e 0.1

Tango

Please refer to the Lima documentation

Simulator

Only simulates a RemoteEx TCP interface. Under development.

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

hamamatsu-0.1.1.tar.gz (25.0 kB view details)

Uploaded Source

File details

Details for the file hamamatsu-0.1.1.tar.gz.

File metadata

  • Download URL: hamamatsu-0.1.1.tar.gz
  • Upload date:
  • Size: 25.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.3.0 pkginfo/1.7.0 requests/2.25.1 setuptools/51.3.3.post20210118 requests-toolbelt/0.9.1 tqdm/4.55.1 CPython/3.7.9

File hashes

Hashes for hamamatsu-0.1.1.tar.gz
Algorithm Hash digest
SHA256 b4b969714460535d421265430b462cf12c2a74759adf4beb42230c9d8df50286
MD5 3fe01f94467fb4dd5cf461ce2f1b21d6
BLAKE2b-256 d92b2535f884b923fd5fde724dbfb6f174799192a668582c446bdcf52984778d

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page