\This page provides an overview of the status and inner workings of the TES Readout development and eventual implementation.
Description of TES
PseudoCode
This is a proposed algorithm to handle the data produced by the TES detectors for LCLS-II.
The data is assumed to consist of several time streams per FPGA (250) sampled at 1 MHz. The beam repetition rate is 10 kHz, for a total of 100 samples minimum between valid (photon generated) events. The samples are assumed to be 16 bits.
Parfor : Parallel For
NumberOfChannels : number of channels to be handles by the FPGA
Samples per Window : Number of samples in a single pulse window
TotalNumberOfWindows : Maximum number of windows to be kept in memory for the configured filters. Currently only 3 for a total of four cases. The active window, the preceding one and the following one. Possibly more windows to be added before/after for more precision in the energy measurement.
Active Window : Window on which we are performing the filter calculation
Current Window : Window that is currently loading in buffers.
EventMatrix : Matrix containgin information about the presence of events in each window of each channel.
Benchmarks
This table lists the latest benchmarks.
Currently, it evaluates the average time (over 1e6 iterations) to complete the number of products indicated as well as the sum of the resulting vector. The length of the vector varies according to the number of samples.
For a fixed number of samples, the code uses if statements to directly indicates how many filters to use. For the code using the binary decision tree, the number of filters is passed as a prepocessor argument. Once we know how many filters are necessary this will become a fixed value.
These benchmarks were obtained os psanagpu116, using O3 and vectored optimization. As a reference, 10 kHz operation gives a time window of 100 µs.
g++ -std=c++11 -O3 -DNDEBUG -march=native -IEigen main.cpp
All values are in μs.
Number of products Number of samples | 1 | 2 | 3 | 4 | 5 |
---|---|---|---|---|---|
100 | 0.061 | 0.074 | 0.091 | 0.108 | |
200 | 0.113 | 0.145 | 0.176 | 0.210 | |
300 | 0.150 | 0.190 | 0.241 | 0.296 | |
400 | 0.200 | 0.266 | 0.329 | 0.397 | |
500 | 0.239 | 0.321 | 0.402 | 0.486 | |
600 | 0.279 | 0.378 | 0.476 | 0.576 | |
700 | 0.318 | 0.435 | 0.549 | 0.667 | |
Decision tree | 0.092 | 0.117 | 0.138 | 0.161 | 0.203 |
Latest code :
Code with switch case (Clemens)
References
Ullom and Bennet. Review of superconducting transition sensors for X-ray and gamma-ray spectroscopy
Irwin and Hilton. Transition-edge sensors.
Tasks
Task | Status | Comment |
---|---|---|
Create fake data vectors | NOT STARTED | Using random number vectors |
Implement event detection algorithm | NOT STARTED | |
Program arguments for benchmarking | DONE | Arguments for the size of the vectors and the number of array products used Preprocessor arguments |
Decision tree for event cases | DONE | Switch case tree for given number of filters - reusable for different cases |
Input data from simulation | NOT STARTED | |
Create circular buffer | NOT STARTED | |