dt5800: Python binding of the DT5800 SDK
Control the CAEN DT5800 / DT5800D Digital Detector Emulator (Nuclear Instruments, front
panel "DPPE") from Python: energy (fixed, spectrum, isotopes, sequences), pulse shape (fast
exponential, digital RC, custom shapes, multi-shape), time base, pile-up and dead time,
noise, interference, baseline drift, reset preamplifier, correlation of the two channels
with the delay line, digital I/O, run control, waveform generator, Peltier, statistics and
the signal monitor. The package calls the native DT5800 library (dt5800.dll /
libdt5800.so) through ctypes. A built-in simulator (sim://) lets you develop and test
without hardware.
Installation
pip install dt5800
The wheels for Windows x64 and Linux x86-64 / aarch64 (glibc 2.34+) include the native
library. Python 3.8 or later. There are no mandatory dependencies: pip install dt5800[numpy]
gets numpy arrays from the read functions with as_numpy=True. Every function also takes
numpy arrays as input.
USB driver
The instrument is reached over USB 2 through its FTDI FT2232H and FTDI's D2XX driver:
- Windows: FTDI's CDM driver, installed by the DT5800 SDK setup
(
DT5800-SDK-Setup-<version>.exe) or downloaded from FTDI (any recent version works). It providesftd2xx.dll, which the library loads at run time. - Linux: the wheel includes FTDI's D2XX library (
libftd2xx.so, next tolibdt5800.so). The udev rule must still be installed. It gives every user access to the instrument and detaches the kernel'sftdi_siodriver from the DT5800 only. The rule is installed by thedt5800-sdkpackage (apt install dt5800-sdk/dnf install dt5800-sdk). It is also in the SDK sources: copysdk/cpp/udev/60-dt5800.rulesto/etc/udev/rules.d/, then runsudo udevadm control --reload-rulesand plug the instrument in again.
dt5800.d2xx_info() tells which D2XX library was loaded, or why none could be.
dt5800.supported_buses() lists Bus.USB only when it loads. Other FTDI devices on the
same PC (USB-serial adapters, other instruments) are never opened: the library lists and
opens only the devices whose USB description is a DT5800's.
Another build of the library
With the source distribution, or to use another build, point DT5800_LIBRARY at the
library (full path of dt5800.dll / libdt5800.so). Otherwise the library is looked up
in the package (dt5800/_native/), then by the system loader.
Quick start
import dt5800
print(dt5800.version())
for d in dt5800.enumerate(dt5800.Bus.USB):
print(d.serial, d.address, d.description)
with dt5800.Device("sim://") as dev: # or "usb://", "usb://<FTDI serial>"
print(dev.info.model_name, dev.info.serial)
ch = dev.channel(0)
ch.set_energy_fixed(16000) # LSB, 0..32767
ch.set_shape_exponential(dt5800.ShapeMode.AUTO, rise_ns=50, decay_ns=10000)
ch.set_timebase(dt5800.TimebaseMode.POISSON, 10000)
ch.enable()
print(ch.stats())
Spectra come from files of the DT5800 software (load_values, process_spectrum), from
the Spectrum Editor (spectrum_from_peaks), or from the isotope database
(isotope_lines("Co-60"), spectrum_from_lines). Program them with
Channel.program_spectrum.
Errors raise subclasses of dt5800.Dt5800Error (OutOfRangeError,
InvalidParameterError, NoDataError, NotFoundError, DeviceTimeoutError,
InvalidHardwareError, ...). Each one carries .status and .message (the text of
dt5800_last_error).
Examples
The examples/ folder has a runnable script for each feature. Each takes the address as
its first argument (default sim://):
| Script | What |
|---|---|
01_list_and_info.py |
instruments, identity, activation, climate, calibration |
02_pulser.py |
fixed amplitude at a constant rate, statistics |
03_spectrum.py |
a spectrum from peaks or from a file, Poisson rate, loop-back histogram |
04_monitor.py |
signal monitor, statistics, loop-back histogram |
05_awg.py |
function generator and arbitrary waveform |
06_firmware_info.py |
.NIU firmware package, FPGA update (simulator, or --update) |
07_isotopes.py |
Co-60 + Cs-137 from the isotope database |
08_noise_and_baseline.py |
noise, interference, baseline drift, reset preamplifier |
09_correlation.py |
delayed copy, partial correlation, Peltier |
pip install -r examples/requirements.txt
python examples/02_pulser.py usb://
Firmware
info = dt5800.firmware_file_info("DT5800D_2_4.NIU")
dt5800.fpga_update("usb://FT5800AB", "DT5800D_2_4.NIU",
progress=lambda stage, f: print(stage, f"{f:.0%}"))
# then power cycle the instrument
Documentation
User guide and API reference: https://public-repo.pages.nuclearinstruments.eu/dt5800/
Source: https://gitlab.nuclearinstruments.eu/public-repo/dt5800. MIT License.
Metadata
Release files for dt5800 1.0.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| dt5800-1.0.2.tar.gz | 49.1 kB | Without provenance | Details for dt5800-1.0.2.tar.gz |
Built distributions (wheels)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| dt5800-1.0.2-py3-none-win_amd64.whl | Python 3 | none | Windows x86-64 | Details for dt5800-1.0.2-py3-none-win_amd64.whl |
| dt5800-1.0.2-py3-none-manylinux_2_34_x86_64.whl | Python 3 | none | Linux glibc 2.34+ x86-64 | Details for dt5800-1.0.2-py3-none-manylinux_2_34_x86_64.whl |
| dt5800-1.0.2-py3-none-manylinux_2_34_aarch64.whl | Python 3 | none | Linux glibc 2.34+ ARM64 | Details for dt5800-1.0.2-py3-none-manylinux_2_34_aarch64.whl |
Total release size: 4.1 MB
Release files / dt5800-1.0.2.tar.gz
| Download URL | dt5800-1.0.2.tar.gz |
|---|---|
| Size | 49.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
80ab8b0718f54a0e0440a478a48a1072401ef4af8e404c5b0b6d2688f9f39ce4
|
|
BLAKE2b-256 checksum How to use checksums |
644919e58896a0de1667c0164fa7bde6ebdc5e61ed4cf0b94867f920ba164167
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.12.16
|
Release files / dt5800-1.0.2-py3-none-win_amd64.whl
| Download URL | dt5800-1.0.2-py3-none-win_amd64.whl |
|---|---|
| Size | 1.1 MB |
| Tags | Python 3 Windows x86-64 |
|
SHA-256 checksum How to use checksums |
62603047e080af9a73e0b7b463942ed36aca288f03b6046476b0a525c060435d
|
|
BLAKE2b-256 checksum How to use checksums |
b7a61ce194ebac4eb1e0210572fe58e29fb228e4181374a7a50ad48e8cabd292
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.12.16
|
Release files / dt5800-1.0.2-py3-none-manylinux_2_34_x86_64.whl
| Download URL | dt5800-1.0.2-py3-none-manylinux_2_34_x86_64.whl |
|---|---|
| Size | 1.6 MB |
| Tags | Linux glibc 2.34+ x86-64 Python 3 |
|
SHA-256 checksum How to use checksums |
9a9b6a327ae27dd08d38334d2dd88a9deb8eab3f687ef451d8f77c1ded5dc880
|
|
BLAKE2b-256 checksum How to use checksums |
245ecb6b16f3d2f1d28effa414cc9fc30edd3af39390fdd267610556d5c566e9
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.12.16
|
Release files / dt5800-1.0.2-py3-none-manylinux_2_34_aarch64.whl
| Download URL | dt5800-1.0.2-py3-none-manylinux_2_34_aarch64.whl |
|---|---|
| Size | 1.4 MB |
| Tags | Linux glibc 2.34+ ARM64 Python 3 |
|
SHA-256 checksum How to use checksums |
0541196261012c8d3679e011ecd69577581b7d60d64998cae368dd3b4e20d0c3
|
|
BLAKE2b-256 checksum How to use checksums |
88ac0b5a3d5fa412ee02c6b604637fabe0a7bb0cf4cf3fd8a5b63872b9d381a5
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.12.16
|
Security for dt5800 1.0.2
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.