Skip to main content

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.

Metadata

Release files for hamamatsu 0.1.3

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for hamamatsu 0.1.3
File Size Uploaded
hamamatsu-0.1.3.tar.gz 25.5 kB Details

Release files / hamamatsu-0.1.3.tar.gz

Download URL hamamatsu-0.1.3.tar.gz
Size 25.5 kB
Tags Source
SHA-256 checksum
How to use checksums
596b96900b20b40b3f6e6cd1dbdb15a756a577f502ce54d0db2bb424bdb93bbd
BLAKE2b-256 checksum
How to use checksums
d07ac48f0fe3f53c444868c0cbb930e488a92abe4b3d8465edf8ce54ddfa3034
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/0.0.0 importlib_metadata/4.6.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.0 CPython/3.9.6

Release history Release notifications | RSS feed

This release

0.1.3 This release

1 release file

0.1.2

1 release file

0.1.1

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page