Katherine Satellite#
Name |
Katherine |
|---|---|
Description |
Satellite to control the Timepix3 readout system Katherine |
Category |
Readout Systems |
Language |
C++ |
Website |
|
Version |
v1.2.0 |
Description#
This satellite controls the Katherine readout system for Timepix3 detectors. The readout system is connected to the controlling computer via Gigabit Ethernet and consequently supports maximum hit rates of up to 16MHits/s.
The satellite allows to operate the Timepix3 detector in any of its matrix operation modes. i.e. the combined time-of-arrival
and time-over-threshold mode (TOA_TOT), the time-of-arrival mode (TOA) or the counting mode with integrated TOT
(EVT_ITOT). The detector can be operated either in data-driven mode (sequential_mode = false) or frame-based mode. In the
latter case, the number of frames to acquire has to be configured via no_frames.
Building#
The Katherine satellite requires the libkatherine library. For Meson versions
starting with 1.3.0 it can be installed automatically, otherwise it can be installed via
git clone -b v1.1.0 https://github.com/petrmanek/libkatherine.git
cd libkatherine
mkdir build && cd build
cmake .. -GNinja -DCMAKE_BUILD_TYPE=RelWithDebInfo -DCMAKE_INSTALL_PREFIX=/opt # Adjust install path if wanted
ninja install
The satellite requires Meson for building. It can be built and installed via:
meson setup build -Dbuildtype=debugoptimized -Dprefix=/opt # Adjust install path if wanted
meson compile -C build
meson install -C build
Pixel Configuration / Trim DACs#
The individual per-pixel trimming DAC settings are read from a file. The BMC and BPC formats of Katherine as well as a
simple ASCII text format are supported, the file type is inferred from the file extension (either .txt, .bmc or .bpc).
The ASCII text format expects the following layout:
<column> <row> <trim> <mask> <testpulse>
Where <trim> is a 4-bit trim DAC value, <mask> is a Boolean for masking the pixel, and <testpulse> a Boolean to enable
sending test pulses to this pixel.
Data Format & Data Decoding#
Timepix3 sends its data in individual packages, which are buffered by the Katherine readout system and then sent to the
satellite as 6-byte data packets. The parameter decode_data controls whether the Katherine library decodes these words
into pixel hits before sending them, or whether the raw Timepix3 data packets are sent.
Each data record sent by the satellite contains one data block per pixel hit or per data packet. The format of the data in a
specific run can be inferred from the parameters op_mode, fast_vco and decode_data provided in the satellite
configuration in the begin-of-run message. All multi-byte fields are stored little-endian and without padding.
Decoded Pixel Data#
When decoding data, each data record contains the pixel hits of one flush of the pixel buffer. The buffer is flushed when
it holds pixel_buffer pixel hits, when no data has arrived for 500 ms, and at the end of the run. Each block holds one
pixel hit with the following layout:
|
|
Block layout |
Bytes |
|---|---|---|---|
|
|
|
13 |
|
|
|
13 |
|
|
|
11 |
|
|
|
11 |
|
|
|
7 |
|
|
|
6 |
Both TOA_TOT layouts have the same size, the fast_vco parameter decides whether it contains ftoa or the hit count.
Raw Measurement Data#
When data is sent without decoding, each data record holds the content of one data packet received from the Katherine readout
system. Each block holds one 6-byte with the word type stored in the upper four bits. These data packets can be decoded e.g.
with the decoding routines of libkatherine.
Parameters#
The following parameters are read and interpreted by this satellite. Parameters without a default value are required unless noted otherwise.
Parameter |
Description |
Type |
Default Value |
|---|---|---|---|
|
IP address of the Katherine system |
String |
- |
|
ID of the chip to be operated. Optional setting, this will only be checked when provided. If it does not match, an error is reported. |
String |
- |
|
Configuration section with DAC settings, see below for details. |
Section |
- |
|
Path to file with individual pixel trim settings, in |
String |
- |
|
Threshold polarity switch |
Bool |
|
|
Switch to enable/disable sequential mode |
Bool |
|
|
Operation mode, can be |
String |
|
|
Enable the fast VCO for fine ToA measurements, at the cost of the hit counter in |
Boolean |
|
|
Choose whether Katherine should already decode the pixel data or send the raw Timepix3 data out. |
Boolean |
|
|
Shutter operation mode, can be |
String |
|
|
Width of the shutter window, only relevant for shutter modes |
Int |
|
|
Depth of the pixel buffer. This many pixel hits are accumulate before sending. The default corresponds to one full Timepix3 frame |
Int |
65536 |
|
Depth of the data buffer in units of Timepix3 packets (6 bytes each). Data is either decoded or sent directly from this buffer. The default corresponds to 200 MB memory. |
Int |
34952533 |
|
Number of frames to acquire. Needs to be set to 1 for data-driven mode ( |
Int |
1 |
|
Bias voltage applied to the sensor, in volts |
Float |
0 |
DACs Section#
The section dacs holds the DACs to be set for Timepix3, all configuration keys are interpreted case-insensitively.
The following DAC settings are available:
Parameter |
Description |
Type |
Default Value |
|---|---|---|---|
|
Int |
128 |
|
|
Int |
8 |
|
|
Int |
128 |
|
|
Int |
128 |
|
|
Int |
128 |
|
|
Int |
256 |
|
|
Int |
8 |
|
|
Int |
128 |
|
|
Int |
8 |
|
|
Int |
128 |
|
|
Int |
8 |
|
|
Int |
128 |
|
|
Int |
128 |
|
|
Int |
128 |
|
|
Int |
128 |
|
|
Int |
256 |
|
|
Int |
128 |
|
|
Int |
128 |
The fine (VTHRESH_FINE) and coarse (VTP_COARSE) threshold values can be converted to a linearized threshold value via:
threshold = coarse * 160 + (fine - 352)
# with: 352 <= fine < 511
coarse = floor(threshold / 160)
fine = (threshold % 160) + 352
Configuration Example#
The following example configuration could be used to control a Katherine readout system satellite with a Timepix3 detector.
The satellite is configured to connect to the system at 192.168.1.182 and to use the provided local file for the pixel
matrix configuration. The pixel buffer is set to 300 pixel hits, two DACs are changed from their default values. All other
settings are left at their defaults:
[Katherine.TPX3]
ip_address = "192.168.1.182"
px_config_file = "E2-W0005_trimdacs.txt"
pixel_buffer = 300
bias_voltage = 230.0
[Katherine.TPX3.dacs]
VTHRESH_FINE = 200
IBIAS_PIXELDAC = 127
Custom Commands#
The following custom commands are exposed to the command interface by this satellite:
Command |
Description |
Arguments |
Return Value |
Allowed States |
|---|---|---|---|---|
|
Read the current temperature from the Katherine readout board |
- |
Temperature in degree Celsius, |
|
|
Read the current temperature from the temperature sensor |
- |
Temperature in degree Celsius, |
|
|
Read the voltage from the ADC channel provided as parameter |
channel number, |
channel reading, |
|
|
Read the chip ID of the attached sensor |
- |
Chip ID, |
|
|
Read hardware revision and other information from the device |
- |
List of strings with HW type, revision, serial number and firmware version |
|
|
Read chip communication link status from the device |
- |
List of strings with line mask, data rate and chip presence flag |
|
Miscellaneous Information#
Timepix3 Packet Headers and Header Filters#
Packets coming from the chip have a header identifying the type of information contained. The following table relates them:
packet header filter bit
AnalogPeriphery 0000 (0x0) 0
OutputBlockConfig 0001 (0x1) 1
PLLConfig 0010 (0x2) 2
GeneralConfig 0011 (0x3) 3
Timer 0100 (0x4) 4
0101 (0x5) 5
Trigger (SPIDR) 0110 (0x6) 6
ControlOperation 0111 (0x7) 7 <- Marks e.g. EndOfCommand
LoadConfigMatrix 1000 (0x8) 8
ReadConfigMatrix 1001 (0x9) 9
ReadMatrixSequential 1010 (0xA) 10 <- Pixel data
ReadMatrixDataDriven 1011 (0xB) 11 <- Pixel data
LoadCTPR 1100 (0xC) 12
ReadCTPR 1101 (0xD) 13
ResetSequential 1110 (0xE) 14
StopMatrixReadout 1111 (0xF) 15
Framework Parameters#
This satellite interprets the following configuration parameter that are provided through the Constellation framework. Parameters have to be placed in their respective configuration section.
Data Transmission#
The following parameters control the data transmission of this satellite and have to be provided in the _data section:
Parameter |
Type |
Description |
Default Value |
|---|---|---|---|
|
Boolean |
Disable data transmission. This parameter turns off transmission of data to receiver satellites and instead ignores and drops all data records. |
|
|
Unsigned integer |
Timeout in seconds to send the BOR message. The satellite will attempt for this interval to send the message and goes into |
10 |
|
Unsigned integer |
Timeout in seconds to send the EOR message. The satellite will attempt for this interval to send the message and goes into |
10 |
|
Unsigned integer |
Timeout in seconds to send the data message. The satellite will attempt for this interval to send the message and goes into |
10 |
|
Unsigned integer |
Threshold for sending data messages in KiB. The satellite will only send queued data records after the combined payload size of the data records has reached this threshold. |
128 |
|
Unsigned integer |
Size of the queue for the data records. Small values might lead to performance issues, large values lead to larger memory usage. |
32768 |
|
String |
License this data is recorded under. Defaults to the Open Data Commons Attribution License. This information will be added to the run metadata. |
|
Autonomous Operation#
Parameters to control autonomy in the _autonomy section:
Parameter |
Type |
Description |
Default Value |
|---|---|---|---|
|
Role name |
Role this satellite should take in the Constellation. Accepted values are |
|
|
Unsigned integer |
Maximum interval in seconds between heartbeats to be sent to other Constellation components. The time between heartbeat is adjusted automatically according to the number of nodes in the Constellation but will never exceed this value. |
|
Conditional Transitions#
Parameters to control conditional transitions in the _conditions section:
Parameter |
Type |
Description |
Default Value |
|---|---|---|---|
|
List of strings |
List of canonical names of remote satellites for conditional transitioning in |
- |
|
List of strings |
List of canonical names of remote satellites for conditional transitioning in |
- |
|
List of strings |
List of canonical names of remote satellites for conditional transitioning in |
- |
|
List of strings |
List of canonical names of remote satellites for conditional transitioning in |
- |
|
List of strings |
List of canonical names of remote satellites for conditional transitioning in |
- |
|
Unsigned integer |
Timeout in seconds to wait for all conditions to be satisfied for conditional transitioning |
|
Framework Metrics#
This satellite provides the following metrics that are defined by the Constellation framework.
Data Transmission#
Metric |
Description |
Value Type |
Interval |
|---|---|---|---|
|
Amount of bytes transmitted during current run |
Integer |
5s |
|
Number of data blocks transmitted during current run |
Integer |
5s |
|
Number of data records transmitted during current run |
Integer |
5s |
Basic Satellite Metrics#
Metric |
Description |
Value Type |
Interval |
|---|---|---|---|
|
Current run identifier. Updated whenever it changes. |
String |
- |
|
Current satellite state. Updated when changed. |
String |
- |
|
CPU load average over the past 1 minute, provided in percent. |
Float |
10s |
|
Available memory in Megabytes. |
Integer |
10s |