Hackee — CAEN DT5780 DPP-PHA Control & DAQ
Hackee is a lightweight, open-source Python library and PyQt6 graphical user interface for controlling the CAEN DT5780 dual-channel digital pulse processor (DPP-PHA) and integrated high-voltage power supply (HVPS).
Designed for high-resolution gamma-ray spectroscopy (such as HPGe detectors), Hackee communicates directly with the digitizer via libCAENComm, bypassing heavy vendor frameworks while providing full low-level register control, live oscilloscope traces, and real-time energy histograms.
Key Features
- Direct Hardware Control (
caen/): Nativectypeswrapper aroundlibCAENCommwith explicit bit-level register management and automatic workarounds for known firmware quirks (see CAEN Manual Errata). - 15-Bit Energy Resolution: Preserves the full 15-bit (
32768-channel) output from the FPGA trapezoidal filter accumulator rather than truncating to 14 bits. - Accurate Dead-Time Correction: Reconstructs true live time per readout cycle by tracking hardware dead-time markers and filtering pile-up / saturation flags in the
EXTRASword. - Interactive PyQt6 GUI (
tabs/,widgets/):- Oscilloscope Mode: Live dual-trace analog and digital virtual probes for tuning pole-zero cancellation, trapezoid shaping, and trigger thresholds.
- Spectrometer & Scalers: Real-time 32K-channel histograms (linear/log scale, pan/zoom,
chorkeVunits) with three configurable energy subranges (A,B,C) and live counting-rate plots. - HVPS Control: Built-in monitoring and control for the DT5780 dual-channel high-voltage power supply.
- Coincidence Mode: Software timestamp matching between channels within a configurable tick window.
- Self-Documenting Output: Saves compressed plain-text histograms (
.hist.gz), rate logs (.rate.gz), and list-mode event streams (.list.gz) with complete DPP-PHA register metadata in the headers (see Output Data Format).
Project Architecture
hackee/
├── hackee.py # Main PyQt6 application entry point
├── caen/ # Hardware abstraction & DPP-PHA logic
│ ├── comm.py # Low-level libCAENComm interface
│ ├── board.py # Board-level configuration & registers
│ ├── channel.py # Channel-level DPP-PHA parameters
│ ├── hvps.py # High-voltage power supply control
│ ├── readout.py # BLT memory readout & event decoding
│ └── dppp.py # Parameter definitions & TOML state management
├── tabs/ # GUI configuration tabs (Board, Channel, HV, Link)
├── widgets/ # Real-time Scope, Spectrometer, and Acquisition controls
└── docs/ # MkDocs documentation source
Requirements & Quick Start
- OS: Linux (tested with CAEN USB/Optical link drivers and
libCAENComm) - Python: 3.10+ with
PyQt6,numpy, andmatplotlib
git clone https://git.code.sf.net/p/hackee/code hackee
cd hackee
python3 hackee.py