eMorpho Data Server V3 Reference

eMorpho

Introduction

USB driver

bpi_device

Data structures

Overview

Module Constants

Controls

Statistics

Results

Histogram

List Mode

Oscilloscope Trace

Summation Weights

Time Slices

Two-bank List Mode

API

Overview

Data Server

Overview

Version 3 vs Version 2

Version 3 of the eMorpho Data Server has a new structure, a new API and a new command set, compared to version 2. Version 3 has become more modular and follows the same model that is used to service the newer ARM-enhanced devices. Those include an embedded ARM M0+ controller for a simpler USB interface and more embedded intelligence to support gain stabilization and data analysis tasks – up to radio-isotope identification.

Most importantly, most ARM-enhanced devices support radiation detectors with silicon photo-multipliers.

The eMorpho Programmer's Model

The eMorpho has a non-programmable USB interface. Attached to the USB interface is an FPGA that receives a continuous data stream from a waveform-digitizing ADC. The MCA function and all other data acquisition is implemented inside the FPGA.

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

Layer Purpose Description
ftdi.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
emorpho_data.py Data descriptor This layer provides one class for each set of control and data registers within the eMorpho. The classes have standardized functions to communicate with the API layer.
emorpho_api.py API Level This is the API layer used to process commands directed at a single eMorpho or at an array of such devices.
emorpho_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 eMorpho 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 complex super client.