Repository navigation
getting_started
The application connects through IIO to iiod, normally on TCP port
30431. This is the implementation qualified for current Scope, MCA,
list-mode, IDS/HV, and diagnostic devices.
The removed gRPC/ZMQ implementation is preserved on the grpc-final
branch for older images that still expose those services.
| Function | Expected IIO device |
|---|---|
| Scope control, viewer, and DMA | vdpp_scope |
| Scope analogue offset | vdpp_afe_dac |
| MCA histogram and DSP configuration | vdpp_pulse_processor |
| MCA input filter and IIR current | vdpp_input_filter |
| MCA list-mode DMA and PSD | vdpp_lm_frame |
| Shared two-channel start | vdpp_sync_trigger |
| IDS/HV and diagnostics |
ad5686r, mcp3564/mcp3564r, tmp117, plus optional diagnostic devices |
Scope can remain usable when MCA or IDS devices are absent. The GUI disables unsupported workspaces instead of failing the complete connection.
The front panel carries the labelled signal and channel connections: SYNC, CH0 IN, CH1 IN, LOGIC IN, the two SiMP & GPIO connectors, and the separate CH0 HV and CH1 HV connectors. Use the printed CH0/CH1 labels as the physical starting point, then confirm channel identity with a known live signal before acquiring data.

The CH0 and CH1 HV connectors can carry high voltage. Make or change detector and HV connections only with the output disabled and according to the laboratory’s approved procedure.
The back panel contains the serial USB connection, Ethernet port, second USB connection, status indicators and microSD slot, and the DC power input. The Ethernet connection is used for the IIO workflow described below.

Install the libiio command-line tools and inspect the remote context:
iio_info -u "ip:192.168.10.128:30431"Check device names, IP versions, advertised frame geometry, and channel
identity. Current pulse-processor and list-mode drivers publish
channel_index. Scope and input-filter discovery may fall back to
sorted iio:deviceN order, which is deterministic but does not prove
physical A/B mapping after a firmware or device-tree change.
Requirements:
- Python 3.12 or newer;
-
uv; - the platform libiio native runtime (the project targets libiio 0.26);
- Qt system libraries required by PySide6 on the host platform.
git clone https://github.com/nucliflare/nlab-digitizer-community.git
cd nlab-digitizer-community
uv sync --locked --extra dev
python scripts/build_ui.pyGenerated Qt modules are intentionally untracked. Regenerate them after a fresh clone and whenever their source forms or resource files change.
uv run nlabIn the connection dialog:
- select a discovered board or enter its address;
- keep port
30431unless the target is configured differently; - select the number of exposed channels and connect.
Select Offline / Replay Mode instead when no board should be contacted. The application opens a read-only hardware workspace while keeping waveform, PSD-event, spectrum, calibration, peak-analysis, timing-validation, and session replay tools available. Use Connection -> Connect… later to validate every requested IIO channel and replace the offline workspace without restarting.

A saved YAML configuration can pre-fill the connection and hardware settings:
uv run nlab --config experiment.yaml --ip 192.168.10.128 --port 30431Explicit command-line address options override the saved file. The
dialog also remembers the last successful connection. It scans local
DNS-SD/mDNS services and directly probes the USB-network endpoint at
192.168.3.1:30431; Rescan repeats both checks.
Discovered entries show the advertised hostname beside its IP, for
example nucliflare-xxxxx.local (192.168.10.128). Connections and saved
history use the associated address. No additional wiring, firmware, or
decoder choices are required for a standard connection.
Open Help → About for read-only digitizer details grouped by board and channel: target-reported firmware/image and board metadata, IIO/core versions, MCA ABI, list-mode geometry/decoder, selected DAC output, and detected IIO devices. Copy Digitizer Details copies the complete connection snapshot for support. Reconnect to refresh it. Missing build identity appears as unknown; the MCA hardware/software ID registers are shown separately and do not establish physical qualification of a deployed image. Opening About performs no additional hardware polling.
After one board is live, Connection -> Add Digitizer… appends
another independent endpoint. Channel labels include their physical
source (D1:CH0, D1:CH1, D2:CH0, and so on), and each board keeps
separate Global controls. Resolved IPv4/IPv6 addresses are compared so a
board already connected by numeric address cannot be added again through
an mDNS hostname. Coincidence still selects two channels from one
physical digitizer; adding boards does not establish cross-board clock
synchronization. Disconnect Digitizer… removes one endpoint and
returns to offline analysis after the final board is removed.
- Open Global and the system log; confirm that expected devices were discovered without pairing warnings.
- Open one Scope, keep DMA off, and run Auto Setup or load a known hardware configuration.
- Verify physical channel identity and signal polarity with the live viewer.
- Open MCA only if its pulse-processor/input-filter devices are present.
- Start with a short acquisition. Stop it before changing ownership to list-mode DMA, Current DMA, or Coincidence.
- Save a configuration only after checking channel identity, trigger/DAC values, timing, and output location.
The following reference images were captured from live hardware with a Cs-137 source on both detector channels. Detector bias had already been prepared outside this workflow, so the application did not read or change either PSU channel. Do not copy a bias value or assume that another detector is safe to operate with the same settings.
After a verified Auto Setup, CH0 showed this inverted detector pulse:

With negative polarity, threshold trigger at raw -1024, and binning
32, the stopped CH0 MCA spectrum showed the uncalibrated Cs-137
photopeak near raw channel 4448:

Raw channel positions depend on detector gain and processing. Calibrate the energy axis before reporting peak energies from another measurement.
On shutdown, the application stops acquisition workers before closing
hardware connections. In scripts, use try/finally, stop Scope/MCA
explicitly, and close the Digitizer; a crashed script can leave
enable=1 and make the next configuration write fail with EBUSY.
IIO channel numbers are zero-based:
from nlab.hardware.digitizer import Digitizer
digitizer = Digitizer.from_iio(
channel=0,
uri="ip:192.168.10.128:30431",
with_ids=False,
)
try:
frame = digitizer.scope.acquire_frame()
print(frame.shape)
finally:
digitizer.scope.stop()
digitizer.close()Pass with_ids=False when only Scope/MCA access is required. If IDS
hardware was requested but required devices are absent, the application
logs a warning and continues with HV unavailable.
- Home
- Getting started
- Acquisition
- Showcases
- Files and analysis
- Support
- Internals
- Repository