使用DCAM或RemoteEX接口通过Python访问滨松的库
项目描述
滨松Python库
此库用于控制滨松相机的基本功能。它由一个核心库、一个可选的模拟器和可选的lima插件及其tango设备类组成。
它已在C11440-36U型号上进行了测试,但应适用于其他型号。
安装
在您喜欢的Python环境中输入
$ pip install hamamatsu
使用方法
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
使用以下命令安装额外依赖项
$ pip install hamamatsu[lima]
命令行使用
$ limatb hamamatsu scan
$ limatb hamamatu -i 0 info
$ limatb hamamatu -i 0 dump
$ limatb hamamatu -i 0 acquire -n 10 -e 0.1
Tango
请参阅Lima文档
模拟器
仅模拟RemoteEx TCP接口。正在开发中。
项目详情
关闭
hamamatsu-0.1.3.tar.gz的哈希值
算法 | 哈希摘要 | |
---|---|---|
SHA256 | 596b96900b20b40b3f6e6cd1dbdb15a756a577f502ce54d0db2bb424bdb93bbd |
|
MD5 | f876092eb6e9db2869765b849cd2ad41 |
|
BLAKE2b-256 | d07ac48f0fe3f53c444868c0cbb930e488a92abe4b3d8465edf8ce54ddfa3034 |