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.


From within your favorite python environment type:

$ pip install hamamatsu


import logging
from hamamatsu.dcam import dcam, Stream


with dcam:
    camera = dcam[0]
    with camera:
        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:
      "start acquisition")
                for i, frame_buffer in enumerate(stream):
                    frame = copy_frame(frame_buffer)
          "acquired frame #%d/%d: %s", i+1, nb_frames, frame)
      "finished acquisition")


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


Please refer to the Lima documentation


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.3.tar.gz (25.5 kB view hashes)

Uploaded source

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