MCA-2K Data Server V3 Reference

MCA-1K

Introduction

USB driver

MCA-2K Device

Data structures

Overview

Module Constants

ARM Data structures

Version

Status

Controls

Calibration

Histogram

Two-channel Logger

Pulse capture

Lossless listmode

Perceptron-powered PSD

API

Overview

The MCA-2K Programmer's Model

The MCA-2K has an embedded ARM M0+ MCU (Atmel SAM L21J), which includes a 32-bit ARM processor with a USB interface. Event processing is performed in real time by an embedded FPGA. The user control all data acquisitions, gain stabilization, alarming and data analysis functions through registers in the ARM processor. The MCA-2K software serves PMT-based and SiPM-based MCA-2K devices, such as the PMT-2000 and SiPM-2000.

The software is structured into four layers as shown in the table below. It is written in Python and is compliant with 3.5 or higher.

Layer Purpose Description
mca_device.py USB driver This layer provides a Python interface to libusb0.1 using ctypes. Compiled libusb0.1 modules are provided for a number of platforms, and are also included by default in most commercial Linux computers. The most recent version also supports libusb1.0 directly via Python, without the need for explicit bindings via ctypes; cf https://libusb.info
mca1k_data.py Data descriptor This device-specific layer provides one class for each set of control and data registers within the MCA-2K. The classes have standardized functions to communicate with the API layer.
mca_api.py API Level This is the API layer used to process commands directed at a single MCA-2K or at an array of such devices.
mca_server.py Data server The data server is implemented using zero message queue ( zeromq.org). The server not only acts as a bridge between the detectors on the USB bus and the Internet, but also as a bridge between programming languages. All data are serialized using JSON strings. While the server is written in Python, clients can access the MCA-2K using any programming language they like. Further, complex tasks can be distributed over independent clients, eg DAQ, reach back and gain stabilization, rather than creating one very complex super client.