Skip to main content

dt5810 — Python binding of the DT5810 SDK

Control the CAEN DT5810 / DT5810B Digital Detector Emulator (Nuclear Instruments) from Python: energy (fixed or spectrum), pulse shape, time base, noise, baseline drift, correlation, digital I/O, run control, monitoring, AWG / sequences and the analog input MCA. The package calls the native DT5810 library (dt5810.dll / libdt5810.so) through ctypes; a built-in simulator (sim://) lets you develop and test without hardware.

Installation

pip install dt5810

The wheels for Windows x64 and Linux x86_64 (glibc 2.34+) include the native library. Python 3.8 or later; no mandatory dependency (pip install dt5810[numpy] to get numpy arrays from the read functions with as_numpy=True).

With the source distribution, or to use another build of the library, point DT5810_LIBRARY at it (full path of dt5810.dll / libdt5810.so); otherwise the library is looked up in the package, then by the system loader.

Quick start

import dt5810

print(dt5810.version())
for d in dt5810.enumerate(dt5810.Bus.USB):
    print(d.serial, d.address)

with dt5810.open("sim://") as dev:          # or "usb://", "usb://NI050123"
    print(dev.info.model_name, dev.info.serial)
    ch = dev.channel(0)
    ch.set_fixed_energy(20000)              # LSB, 0..32767
    ch.set_drc(rise_ns=20, decay_ns=50000)
    ch.set_timebase(dt5810.TimebaseMode.POISSON, rate_hz=10000)
    ch.enable()
    print(ch.stats())

Errors raise dt5810.Dt5810Error subclasses (OutOfRangeError, InvalidParameterError, NoDataError, NotFoundError, DeviceTimeoutError, ...) carrying .status and .message. The examples/ folder has runnable scripts for every feature (python examples/01_info.py usb://).

Documentation

User guide and API reference: https://public-repo.pages.nuclearinstruments.eu/dt5810/dt5810-sdk/

Source: https://gitlab.nuclearinstruments.eu/public-repo/dt5810/dt5810-sdk — MIT License.

Metadata

Release files for dt5810 2.0.1

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

Source distribution (sdist)

Source distribution for dt5810 2.0.1
File Size Uploaded
dt5810-2.0.1.tar.gz 39.2 kB Details

Built distributions (wheels)

Table of built distributions (wheels) for dt5810 2.0.1
File Interpreter ABI Platform
dt5810-2.0.1-py3-none-win_amd64.whl Python 3 none Windows x86-64 Details
dt5810-2.0.1-py3-none-manylinux_2_34_x86_64.whl Python 3 none Linux glibc 2.34+ x86-64 Details

Total release size: 909.0 kB

Release files / dt5810-2.0.1.tar.gz

Download URL dt5810-2.0.1.tar.gz
Size 39.2 kB
Tags Source
SHA-256 checksum
How to use checksums
746e55a0a76e326dccafef11c92e4defa3fd8d6988fad899d955ca668b336cc4
BLAKE2b-256 checksum
How to use checksums
9384146137761b40ff126959e1fcf6ce5a702b19a5da6bb9a084944815af0d06
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.15

Release files / dt5810-2.0.1-py3-none-win_amd64.whl

Download URL dt5810-2.0.1-py3-none-win_amd64.whl
Size 271.7 kB
Tags Python 3 Windows x86-64
SHA-256 checksum
How to use checksums
c9935a62a99db2dd87a89eef38b0c23fcca9b389ddd5425a38334677edd092d8
BLAKE2b-256 checksum
How to use checksums
8b7cfe60cba4b81e356df24dd64229bee000de9c6b9dc9d90c836ca8a7d08200
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.15

Release files / dt5810-2.0.1-py3-none-manylinux_2_34_x86_64.whl

Download URL dt5810-2.0.1-py3-none-manylinux_2_34_x86_64.whl
Size 598.2 kB
Tags Linux glibc 2.34+ x86-64 Python 3
SHA-256 checksum
How to use checksums
7a12094d1805efcedf83eafa40e245d82f3f24c533c86aaac7aa8a36f6c087c2
BLAKE2b-256 checksum
How to use checksums
07c743698cdb721e550ca3823212b8886b50b072193e87da94120bf5fac81736
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.15

Release history Release notifications | RSS feed

2.1.0

3 release files

This release

2.0.1 This release

3 release files

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