![](/html/f7/f73d/f73d9f0db48e0acef1e2201e175ae48b526e75360fcb37c0f1458aed8df1d0fa/bg1.png)
DECTRIS Ltd.
5405 Baden- Daettwil
Switzerland
www.dectris.com
Socket Interface
Specification
MYTHEN Detector System
![](/html/f7/f73d/f73d9f0db48e0acef1e2201e175ae48b526e75360fcb37c0f1458aed8df1d0fa/bg2.png)
Socket Interface Specification. MYTHEN Detector System. Version: 3.0.0, Document Version: 2 2/34
![](/html/f7/f73d/f73d9f0db48e0acef1e2201e175ae48b526e75360fcb37c0f1458aed8df1d0fa/bg3.png)
Socket Interface Specification. MYTHEN Detector System. Version: 3.0.0, Document Version: 2 3/34
Table of Contents
1. Document History 5
1.1. Current document 5
1.2. Changes 5
2. How to use this guide 6
2.1. Address and Support 6
2.2. Explanation of Symbols 7
2.3. Explanation of Terms 7
2.4. Disclaimer 8
3. Warnings 9
4. Introduction 10
5. Operation 11
5.1. Connecting to the server 11
5.2. Initialization 11
5.3. Settings 12
5.3.1. Predefined Settings 12
5.3.2. Setting Threshold and Energy 12
5.3.3. High frame rates 12
5.4. Acquisition control 12
5.5. Data corrections 13
5.6. Triggering and gating 13
5.7. Debugging 13
6. Example Applications 14
7. Commands 15
7.1. Command list 15
7.1.1. General commands 16
7.1.2. Acquisition control 18
7.1.3. Detector settings 20
7.1.4. Data correction 22
7.1.5. Trigger / Gate 23
7.1.6. Debugging 25
7.1.7. Deprecated commands 26
7.2. Error Codes 28
7.3. Decoding the raw data 29
8. Release Notes 30
8.1. Version 3.0.0 30
![](/html/f7/f73d/f73d9f0db48e0acef1e2201e175ae48b526e75360fcb37c0f1458aed8df1d0fa/bg4.png)
Socket Interface Specification. MYTHEN Detector System. Version: 3.0.0, Document Version: 2 4/34
8.1.1. Modifications 30
8.1.2. Migration notes 31
8.1.3. Legacy2 mode 31
8.2. Version 2.1.0 31
8.3. Version 2.0.5 31
8.4. Version 2.0.4 31
8.5. Version 2.0.3 32
8.6. Version 2.0.2 32
8.7. Version 2.0.1 32
8.8. Version 2.0.0 32
8.8.1. New Functionalities 33
8.8.2. Migration notes 33
8.8.3. Legacy Mode 33
9. Appendix 34
9.1. Table of Tables 34
9.2. Referenced Documents 34
![](/html/f7/f73d/f73d9f0db48e0acef1e2201e175ae48b526e75360fcb37c0f1458aed8df1d0fa/bg5.png)
Socket Interface Specification. MYTHEN Detector System. Version: 3.0.0, Document Version: 2 5/34
1. Document History
1.1. Current document
Simplified operation of the detector system
Better data quality due to optimized calibration
Restricted threshold and energy ranges
By default all commands affect all active modules
![](/html/f7/f73d/f73d9f0db48e0acef1e2201e175ae48b526e75360fcb37c0f1458aed8df1d0fa/bg6.png)
Socket Interface Specification. MYTHEN Detector System. Version: 3.0.0, Document Version: 2 6/34
2. How to use this guide
Before you start to operate the MYTHEN detector system please read the User Manual and the Technical
Documentation included in the documentation package carefully.
This document has been designed for the MYTHEN detector systems.
2.1. Address and Support
DECTRIS Ltd.
Taefernweg 1
5405 Baden-Daettwil
Switzerland
Phone: +41 56 500 21 02
Fax: + 41 56 500 21 01
Website:
www.dectris.com → support → Technical Notes → MYTHEN
www.dectris.com → support → FAQ
www.dectris.com → support → Problem Report
Email:
support@dectris.com
Should you have questions concerning the system or its use, please contact us via phone, mail or fax.
Do not ship the system back before you receive the necessary
transport and shipping information!
![](/html/f7/f73d/f73d9f0db48e0acef1e2201e175ae48b526e75360fcb37c0f1458aed8df1d0fa/bg7.png)
Socket Interface Specification. MYTHEN Detector System. Version: 3.0.0, Document Version: 2 7/34
2.2. Explanation of Symbols
Important or helpful notice
Caution. Please follow the instructions carefully to
prevent equipment damage or personal injury.
2.3. Explanation of Terms
Detector Control System for 1 detector module
Detector Control System for up to 6 detector modules
Detector Control System for up to 24 detector modules
The smallest fully functional unit of the detector (1280
channels).
Storage working according to the First In - First Out
principle
![](/html/f7/f73d/f73d9f0db48e0acef1e2201e175ae48b526e75360fcb37c0f1458aed8df1d0fa/bg8.png)
Socket Interface Specification. MYTHEN Detector System. Version: 3.0.0, Document Version: 2 8/34
2.4. Disclaimer
DECTRIS Ltd. has carefully compiled the contents on this manual according to the current state of knowledge.
Damage and warranty claims arising from missing or incorrect data are excluded.
DECTRIS Ltd. bears no responsibility or liability for damage of any kind, also for indirect or consequential damage
resulting from the use of this system.
DECTRIS Ltd. is the sole owner of all user rights related to the contents of the manual (in particular information,
images or materials), unless otherwise indicated. Without the written permission of DECTRIS Ltd. it is prohibited
to integrate the protected contents published in these applications into other programs or other Web sites or to
use them by any other means.
DECTRIS Ltd. reserves the right, at its own discretion and without liability or prior notice, to modify and/or
discontinue this application in whole or in part at any time, and is not obliged to update the contents of the
manual.
![](/html/f7/f73d/f73d9f0db48e0acef1e2201e175ae48b526e75360fcb37c0f1458aed8df1d0fa/bg9.png)
Socket Interface Specification. MYTHEN Detector System. Version: 3.0.0, Document Version: 2 9/34
3. Warnings
Please read these warnings before operating the detector system.
DO NOT TOUCH THE ENTRANCE WINDOW OF THE DETECTOR.
Place the protective cover on the entrance window of the detector when it is not in use.
The detector is not specified to withstand direct beam at a synchrotron. Such exposure will damage the
exposed channels.
The detector system should have enough space for proper ventilation. Operating the detector outside the
specified ambient conditions could damage the system.
The air inlets and outlets of the detector control system should not be blocked.
Power down the detector system before connecting or disconnecting any cable.
Before connecting the power supply to the mains-supply, check the supply voltage with the label on the
power supply. Using an improper main voltage will destroy the power supply and could damage the
detector.
Make sure the cables are connected and properly secured.
Avoid pressure or tension on the cables.
Opening the detector, the detector control system or the power supply housing without explicit instructions
from DECTRIS Ltd. will void the warranty.
The embedded Linux operating system on the detector control system has customized software for
controlling the MYTHEN detector system. Do not make any changes to the Linux operating system without
explicit instructions from DECTRIS Ltd.
![](/html/f7/f73d/f73d9f0db48e0acef1e2201e175ae48b526e75360fcb37c0f1458aed8df1d0fa/bga.png)
Socket Interface Specification. MYTHEN Detector System. Version: 3.0.0, Document Version: 2 10/34
4. Introduction
The detector control system (DCS) hosts an embedded Linux system, on which the MYTHEN Socket Server is
running. The DCS also stores the calibration files for the detector as well as some network settings. A client can
open a socket connection to the server and control the MYTHEN detector by sending the commands listed in
Chapter 7. Example applications in C++ for Linux and Windows are provided on the system memory stick. A spec
implementation based on this socket interface is available from http://www.certif.com.
To take advantage of new functionality and bug fixes, it is possible to update to a newer version of the MYTHEN
Socket Server within the same major release. The configuration files and the network settings stored on the DCS
will not be affected by the update. The required files can be downloaded from the DECTRIS Ltd. website
http://www.dectris.com.
An upgrade to a new major release usually requires a recalibration of the detector by DECTRIS Ltd. and is
therefore not possible to be performed by the customer. If you are interested in a major upgrade please contact
sales@dectris.com.
![](/html/f7/f73d/f73d9f0db48e0acef1e2201e175ae48b526e75360fcb37c0f1458aed8df1d0fa/bgb.png)
Socket Interface Specification. MYTHEN Detector System. Version: 3.0.0, Document Version: 2 11/34
5. Operation
5.1. Connecting to the server
As a first step, the client has to open a socket connection to the server. The user can choose whether he wants to
use UDP or TCP as protocol. While TCP is more reliable, UDP is faster and allows for higher frame rates.
To open the connection, the user has to specify the IP of the DCS, which is by default 192.168.0.90. The port of
the socket server is 1030 for the UDP and 1031 for the TCP protocol.
The commands sent to the server are ASCII strings. The response is a byte array, which has to be interpreted as
string, integer array or float array, depending on the command. All commands return responses of well defined
lengths. Since the response might be fragmented on its way through the network, the client might have to read
several packages, until the expected response length is reached.
In case of an error, the server will respond with a negative number. The meaning of the error codes can be found
in section 7.2.
5.2. Initialization
First of all it should be checked, that the socket server has the expected version. This is done with help of the
command "-get version".
Afterwards the detector system should be initialized by invoking the "-reset" command, which takes up to two
seconds per module. This command loads settings for Cu X-rays and enables the flatfield correction and the
interpolation for bad channels (more details on the default values after initialization can be found in section 7).
For proper operation all delivered modules have to be connected to the DCS. Nonetheless it is possible to read
out only the first few modules. The number of active modules to be used can be specified using the “-nmodules”
command. The MYTHEN system can also be operated with more than the delivered modules if the corresponding
calibration files are available on the DCS. When increasing the number of active modules, all modules are set
back to default settings.