diff --git a/ToString.html b/ToString.html index aaeda54..2abc8ac 100644 --- a/ToString.html +++ b/ToString.html @@ -1,13 +1,15 @@ - +
Receiver Files
Receiver ZMQ Stream
Troubleshooting
Installation:
C++ API
Python API
Command line
Developer
Firmware
Detector Server
Detector UDP Header
Receiver
This is the default file format that can be configured using command fformat.
+sls_detector_put fformat binary + + +
sls_detector_put fformat binary +
File Name: [fpath]/[fname]_master_[findex].json Details here
It is in json format and created for every acquisition.
It contains attributes relevant to the acquisition. This can vary with detector type shown in master json file examples here.
It shows the **SLS Receiver Header** format used in data files.
Enabled/disabled using command fmaster.
File Name: [fpath]/[fname]_dx_fy_[findex].raw Details here
It store multiple frames sequentially, with total number of frames determined by rx_framesperfile parameter.
Each frame includes a **sls_receiver_header** structure, followed by the actual frame data.
{ + "Version": 7.2, + "Timestamp": "Wed Nov 13 15:46:30 2024", + "Detector Type": "Eiger", + "Timing Mode": "auto", + "Geometry": { + "x": 2, + "y": 1 + }, + "Image Size in bytes": 262144, + "Pixels": { + "x": 512, + "y": 256 + }, + "Max Frames Per File": 10000, + "Frame Discard Policy": "nodiscard", + "Frame Padding": 1, + "Scan Parameters": "[disabled]", + "Total Frames": 1, + "Receiver Roi": { + "xmin": 4294967295, + "xmax": 4294967295, + "ymin": 4294967295, + "ymax": 4294967295 + }, + "Dynamic Range": 16, + "Ten Giga": 0, + "Exptime": "1s", + "Period": "1s", + "Threshold Energy": -1, + "Sub Exptime": "2.62144ms", + "Sub Period": "2.62144ms", + "Quad": 0, + "Number of rows": 256, + "Rate Corrections": "[0]", + "Frames in File": 1, + "Frame Header Format": { + "Frame Number": "8 bytes", + "SubFrame Number/ExpLength": "4 bytes", + "Packet Number": "4 bytes", + "Bunch ID": "8 bytes", + "Timestamp": "8 bytes", + "Module Id": "2 bytes", + "Row": "2 bytes", + "Column": "2 bytes", + "Reserved": "2 bytes", + "Debug": "4 bytes", + "Round Robin Number": "2 bytes", + "Detector Type": "1 byte", + "Header Version": "1 byte", + "Packets Caught Mask": "64 bytes" + } +} +
{ + "Version": 7.2, + "Timestamp": "Wed Nov 13 13:03:53 2024", + "Detector Type": "Jungfrau", + "Timing Mode": "auto", + "Geometry": { + "x": 1, + "y": 1 + }, + "Image Size in bytes": 1048576, + "Pixels": { + "x": 1024, + "y": 512 + }, + "Max Frames Per File": 10000, + "Frame Discard Policy": "nodiscard", + "Frame Padding": 1, + "Scan Parameters": "[disabled]", + "Total Frames": 1000, + "Receiver Roi": { + "xmin": 4294967295, + "xmax": 4294967295, + "ymin": 4294967295, + "ymax": 4294967295 + }, + "Exptime": "10us", + "Period": "2ms", + "Number of UDP Interfaces": 1, + "Number of rows": 512, + "Frames in File": 10, + "Frame Header Format": { + "Frame Number": "8 bytes", + "SubFrame Number/ExpLength": "4 bytes", + "Packet Number": "4 bytes", + "Bunch ID": "8 bytes", + "Timestamp": "8 bytes", + "Module Id": "2 bytes", + "Row": "2 bytes", + "Column": "2 bytes", + "Reserved": "2 bytes", + "Debug": "4 bytes", + "Round Robin Number": "2 bytes", + "Detector Type": "1 byte", + "Header Version": "1 byte", + "Packets Caught Mask": "64 bytes" + } +} +
{ + "Version": 7.2, + "Timestamp": "Wed Nov 13 14:18:17 2024", + "Detector Type": "Gotthard2", + "Timing Mode": "auto", + "Geometry": { + "x": 1, + "y": 1 + }, + "Image Size in bytes": 2560, + "Pixels": { + "x": 1280, + "y": 1 + }, + "Max Frames Per File": 20000, + "Frame Discard Policy": "nodiscard", + "Frame Padding": 1, + "Scan Parameters": "[disabled]", + "Total Frames": 10, + "Receiver Roi": { + "xmin": 4294967295, + "xmax": 4294967295, + "ymin": 4294967295, + "ymax": 4294967295 + }, + "Exptime": "0ns", + "Period": "0ns", + "Burst Mode": "burst_internal", + "Frames in File": 10, + "Frame Header Format": { + "Frame Number": "8 bytes", + "SubFrame Number/ExpLength": "4 bytes", + "Packet Number": "4 bytes", + "Bunch ID": "8 bytes", + "Timestamp": "8 bytes", + "Module Id": "2 bytes", + "Row": "2 bytes", + "Column": "2 bytes", + "Reserved": "2 bytes", + "Debug": "4 bytes", + "Round Robin Number": "2 bytes", + "Detector Type": "1 byte", + "Header Version": "1 byte", + "Packets Caught Mask": "64 bytes" + } +} +
{ + "Version": 7.2, + "Timestamp": "Wed Nov 13 14:39:14 2024", + "Detector Type": "Mythen3", + "Timing Mode": "auto", + "Geometry": { + "x": 1, + "y": 1 + }, + "Image Size in bytes": 15360, + "Pixels": { + "x": 3840, + "y": 1 + }, + "Max Frames Per File": 10000, + "Frame Discard Policy": "nodiscard", + "Frame Padding": 1, + "Scan Parameters": "[disabled]", + "Total Frames": 1, + "Receiver Roi": { + "xmin": 4294967295, + "xmax": 4294967295, + "ymin": 4294967295, + "ymax": 4294967295 + }, + "Dynamic Range": 32, + "Ten Giga": 1, + "Period": "2ms", + "Counter Mask": "0x7", + "Exptime1": "0.1s", + "Exptime2": "0.1s", + "Exptime3": "0.1s", + "GateDelay1": "0ns", + "GateDelay2": "0ns", + "GateDelay3": "0ns", + "Gates": 1, + "Threshold Energies": "[-1, -1, -1]", + "Frames in File": 1, + "Frame Header Format": { + "Frame Number": "8 bytes", + "SubFrame Number/ExpLength": "4 bytes", + "Packet Number": "4 bytes", + "Bunch ID": "8 bytes", + "Timestamp": "8 bytes", + "Module Id": "2 bytes", + "Row": "2 bytes", + "Column": "2 bytes", + "Reserved": "2 bytes", + "Debug": "4 bytes", + "Round Robin Number": "2 bytes", + "Detector Type": "1 byte", + "Header Version": "1 byte", + "Packets Caught Mask": "64 bytes" + } +} +
{ + "Version": 7.2, + "Timestamp": "Wed Nov 13 14:41:32 2024", + "Detector Type": "Moench", + "Timing Mode": "auto", + "Geometry": { + "x": 1, + "y": 1 + }, + "Image Size in bytes": 320000, + "Pixels": { + "x": 400, + "y": 400 + }, + "Max Frames Per File": 100000, + "Frame Discard Policy": "discardpartial", + "Frame Padding": 1, + "Scan Parameters": "[disabled]", + "Total Frames": 1, + "Receiver Roi": { + "xmin": 4294967295, + "xmax": 4294967295, + "ymin": 4294967295, + "ymax": 4294967295 + }, + "Exptime": "10us", + "Period": "2ms", + "Number of UDP Interfaces": 1, + "Number of rows": 400, + "Frames in File": 1, + "Frame Header Format": { + "Frame Number": "8 bytes", + "SubFrame Number/ExpLength": "4 bytes", + "Packet Number": "4 bytes", + "Bunch ID": "8 bytes", + "Timestamp": "8 bytes", + "Module Id": "2 bytes", + "Row": "2 bytes", + "Column": "2 bytes", + "Reserved": "2 bytes", + "Debug": "4 bytes", + "Round Robin Number": "2 bytes", + "Detector Type": "1 byte", + "Header Version": "1 byte", + "Packets Caught Mask": "64 bytes" + } +} +
{ + "Version": 7.2, + "Timestamp": "Wed Nov 13 15:16:19 2024", + "Detector Type": "Gotthard", + "Timing Mode": "auto", + "Geometry": { + "x": 1, + "y": 1 + }, + "Image Size in bytes": 2560, + "Pixels": { + "x": 1280, + "y": 1 + }, + "Max Frames Per File": 20000, + "Frame Discard Policy": "nodiscard", + "Frame Padding": 1, + "Scan Parameters": "[disabled]", + "Total Frames": 1, + "Receiver Roi": { + "xmin": 4294967295, + "xmax": 4294967295, + "ymin": 4294967295, + "ymax": 4294967295 + }, + "Exptime": "1.00001ms", + "Period": "1s", + "Detector Roi": { + "xmin": 4294967295, + "xmax": 4294967295 + }, + "Frames in File": 1, + "Frame Header Format": { + "Frame Number": "8 bytes", + "SubFrame Number/ExpLength": "4 bytes", + "Packet Number": "4 bytes", + "Bunch ID": "8 bytes", + "Timestamp": "8 bytes", + "Module Id": "2 bytes", + "Row": "2 bytes", + "Column": "2 bytes", + "Reserved": "2 bytes", + "Debug": "4 bytes", + "Round Robin Number": "2 bytes", + "Detector Type": "1 byte", + "Header Version": "1 byte", + "Packets Caught Mask": "64 bytes" + } +} +
{ + "Version": 7.2, + "Timestamp": "Wed Nov 13 15:32:59 2024", + "Detector Type": "ChipTestBoard", + "Timing Mode": "auto", + "Geometry": { + "x": 1, + "y": 1 + }, + "Image Size in bytes": 48018, + "Pixels": { + "x": 3, + "y": 1 + }, + "Max Frames Per File": 20000, + "Frame Discard Policy": "nodiscard", + "Frame Padding": 1, + "Scan Parameters": "[disabled]", + "Total Frames": 1, + "Receiver Roi": { + "xmin": 4294967295, + "xmax": 4294967295, + "ymin": 4294967295, + "ymax": 4294967295 + }, + "Exptime": "0ns", + "Period": "0.18s", + "Ten Giga": 0, + "ADC Mask": "0x2202", + "Analog Flag": 1, + "Analog Samples": 8003, + "Digital Flag": 0, + "Digital Samples": 1000, + "Dbit Offset": 0, + "Dbit Bitset": 0, + "Transceiver Mask": "0x3", + "Transceiver Flag": 0, + "Transceiver Samples": 1, + "Frames in File": 1, + "Frame Header Format": { + "Frame Number": "8 bytes", + "SubFrame Number/ExpLength": "4 bytes", + "Packet Number": "4 bytes", + "Bunch ID": "8 bytes", + "Timestamp": "8 bytes", + "Module Id": "2 bytes", + "Row": "2 bytes", + "Column": "2 bytes", + "Reserved": "2 bytes", + "Debug": "4 bytes", + "Round Robin Number": "2 bytes", + "Detector Type": "1 byte", + "Header Version": "1 byte", + "Packets Caught Mask": "64 bytes" + } +} +
Commands can be used either with sls_detector_get or sls_detector_put
sls_detector_get vrf +sls_detector_get exptime @@ -155,6 +170,15 @@ Help # get help for a particular command sls_detector_get -h fpath sls_detector_help fpath + +# list of deprecated commands +list deprecated + +# autocompletion +# bash_autocomplete.sh or zsh_autocomplete.sh must be sourced from the +# main package folder to enable auto completion of commands and arguments +# for the command line on that shell. +source bash_autocomplete.sh
sls_detector_get exptime
- +pedestalmode [0] + [Jungfrau] Disable pedestal mode. Disabling pedestal mode will set back the normal mode values of #frames and #triggers. - - -period [duration] [(optional unit) ns|us|ms|s] + + +period [duration] [(optional unit) ns|us|ms|s] Period between frames -periodl -[Gotthard][Jungfrau][Moench][CTB][Mythen3][Gotthard2] Period left for current frame. +periodl +[Gotthard][Jungfrau][Moench][Ctb][Mythen3][Gotthard2][Xilinx Ctb] Period left for current frame. [Gotthard2] only in continuous mode. -polarity [pos|neg] +polarity [pos|neg] [Mythen3] Sets negative or positive polarity. Default is positive -port [n] +port [n] Port number of the control server on detector for detector-client tcp interface. Default is 1952. Normally unchanged. Set different ports for virtual servers on same pc. -powerchip [0, 1] -[Jungfrau][Moench][Mythen3][Gotthard2] Power the chip. +powerchip [0, 1] +[Jungfrau][Moench][Mythen3][Gotthard2][Xilinx Ctb] Power the chip. [Jungfrau][Moench] Default is 0. Get will return power status. Can be off if temperature event occured (temperature over temp_threshold with temp_control enabled. Will configure chip (only chip v1.1) [Mythen3][Gotthard2] Default is 1. If module not connected or wrong module, powerchip will fail. +[Xilinx Ctb] Default is 0. Also configures the chip if powered on. -powerindex [name] -[ChipTestBoard] Get the power index for the given name. +powerindex [name] +[Ctb][Xilinx_Ctb] Get the power index for the given name. -powerlist [powername1 powername2 .. powername4] -[ChipTestBoard] Set the list of power names for this board. +powerlist [powername1 powername2 .. powername4] +[Ctb][Xilinx_Ctb] Set the list of power names for this board. -powername [0-4][name] -[ChipTestBoard] Set the power at the given position to the given name. +powername [0-4][name] +[Ctb][Xilinx_Ctb] Set the power at the given position to the given name. -powervalues [name] -[ChipTestBoard] Get values of all powers. +powervalues [name] +[Ctb][Xilinx_Ctb] Get values of all powers. -programfpga [fname.pof | fname.rbf (full path)][(opitonal)–force-delete-normal-file] +programfpga [fname.pof | fname.rbf (full path)][(opitonal)–force-delete-normal-file] [Jungfrau][Moench][Ctb] Programs FPGA from pof file (full path). Then, detector controller is rebooted. Use –force-delete-normal-file argument, if normal file found in device tree, it must be deleted, a new device drive created and programming continued. @@ -863,31 +948,31 @@ Commands[Mythen3][Gotthard2] Programs FPGA from rbf file (full path). Then, detector controller is rebooted. -pulse [n_times] [x] [y] +pulse [n_times] [x] [y] [Eiger] Pulse pixel n number of times at coordinates (x, y). Advanced User! -pulsechip [n_times] +pulsechip [n_times] [Eiger] Pulse chip n times. If n is -1, resets to normal mode (reset chip completely at start of acquisition, where partialreset = 0). Advanced User! -pulsenmove [n_times] [x] [y] +pulsenmove [n_times] [x] [y] [Eiger] Pulse pixel n number of times and moves relatively by (x, y). Advanced User! -pumpprobe [0, 1] +pumpprobe [0, 1] [Mythen3] Enables or disables pump probe mode. Default is disabled. Pump probe mode only enables vth2. Disabling sets back to previous value. -quad [0, 1] +quad [0, 1] [Eiger] Sets detector size to a quad. 0 (disabled) is default. (Specific hardware required). -ratecorr [n_rate (in ns)] +ratecorr [n_rate (in ns)] [Eiger] Dead time correction constant in ns. -1 will set to default tau of settings from trimbit file. 0 will unset rate correction. -readnrows +readnrows [1-256] [Eiger] Number of rows to readout per half module starting from the centre. Options: 0 - 256. 256 is default. The permissible values depend on dynamic range and 10Gbe enabled. @@ -899,18 +984,17 @@ Commands +readout [Mythen3] Starts detector readout. Status changes to TRANSMITTING and automatically returns to idle at the end of readout. -readoutspeed +readoutspeed [0 or full_speed|1 or half_speed|2 or quarter_speed] - - -[Eiger][Jungfrau][Moench] Readout speed of chip. +[Eiger][Jungfrau][Moench][Mythen3] Readout speed of chip. [Eiger][Moench] Default speed is full_speed. -[Jungfrau] Default speed is half_speed. full_speed option only available from v2.0 boards and is recommended to set number of interfaces to 2. Also overwrites adcphase to recommended default. - +[Jungfrau][Mythen3] Default speed is half_speed. +[Jungfrau] full_speed option only available from v2.0 boards and is recommended to set number of interfaces to 2. Also overwrites adcphase to recommended default. + [144|108] [Gotthard2] Readout speed of chip in MHz. Default is 108. @@ -918,225 +1002,231 @@ Commands +readoutspeedlist List of readout speed levels implemented for this detector. -rebootcontroller -[Jungfrau][Moench][Ctb][Gotthard][Mythen3][Gotthard2] Reboot controller of detector. +rebootcontroller +[Jungfrau][Moench][Ctb][Gotthard][Mythen3][Gotthard2][Xilinx Ctb] Reboot controller of detector. -reg [address] [32 bit value] -Reads/writes to a 32 bit register in hex. Advanced Function! +reg [address] [32 bit value][(optional)–validate] +[Mythen3][Gotthard2] Reads/writes to a 32 bit register in hex. Advanced Function! Goes to stop server. Hence, can be called while calling blocking acquire(). + +Use –validate to force validation when writing to it. + [Eiger] +0x100 for only left, +0x200 for only right. -resetdacs [(optional) hard] +resetdacs [(optional) hard] [Eiger][Jungfrau][Moench][Gotthard][Gotthard2][Mythen3]Reset dac values to the defaults. A ‘hard’ optional reset will reset the dacs to the hardcoded defaults in on-board detector server. -resetfpga -[Jungfrau][Moench][Ctb] Reset FPGA. +resetfpga +[Jungfrau][Moench][Ctb][Xilinx Ctb] Reset FPGA. -roi [xmin] [xmax] +roi [xmin] [xmax] [Gotthard] Region of interest in detector. Options: Only a single ROI per module. Either all channels or a single adc or 2 chips (256 channels). Default is all channels enabled (-1 -1). -romode [analog|digital|analog_digital|transceiver|digital_transceiver] -[CTB] Readout mode. Default is analog. +romode [analog|digital|analog_digital|transceiver|digital_transceiver] +[Ctb][xilinx Ctb] Readout mode. [Ctb] Default is analog. [Xilinx Ctb] Default is Transceiver (only one implemented so far) -row [value] +row [value] Set Detector row (udp header) to value. Gui uses it to rearrange for complete image -runclk [n_clk in MHz] +runclk [n_clk in MHz] [Ctb] Run clock in MHz. -runtime [(optional unit) ns|us|ms|s] -[Jungfrau][Moench][Mythen3][Gotthard2][CTB] Time from detector start up. +runtime [(optional unit) ns|us|ms|s] +[Jungfrau][Moench][Mythen3][Gotthard2][Ctb][Xilinx Ctb] Time from detector start up. [Gotthard2] not in burst and auto mode. -rx_arping [0, 1] +rx_arping [0, 1] Starts a thread in slsReceiver to arping the interface it is listening to every minute. Useful in 10G mode. - -rx_clearroi Resets Region of interest in receiver. Default is all channels/pixels enabled. - -rx_dbitlist [all] or [i0] [i1] [i2]… +rx_clearroi +Resets Region of interest in receiver. Default is all channels/pixels enabled. + + +rx_dbitlist [all] or [i0] [i1] [i2]… [Ctb] List of digital signal bits read out. If all is used instead of a list, all digital bits (64) enabled. Each element in list can be 0 - 63 and must be non repetitive. -rx_dbitoffset [n_bytes] +rx_dbitoffset [n_bytes] [Ctb] Offset in bytes in digital data to skip in receiver. -rx_discardpolicy [nodiscard (default)|discardempty|discardpartial(fastest)] +rx_discardpolicy [nodiscard (default)|discardempty|discardpartial(fastest)] Frame discard policy of receiver. nodiscard does not discard frames, discardempty discards empty frames, discardpartial discards partial frames. -rx_fifodepth [n_frames] +rx_fifodepth [n_frames] Set the number of frames in the receiver fifo depth (buffer between listener and writer threads). -rx_frameindex +rx_frameindex Current frame index received for each port in receiver during acquisition. -rx_framescaught +rx_framescaught Number of frames caught by each port in receiver. -rx_framesperfile [n_frames] +rx_framesperfile [n_frames] Number of frames per file in receiver in an acquisition. Default depends on detector type. 0 is infinite or all frames in single file. -rx_hostname [hostname or ip address] +rx_hostname [hostname or ip address] [hostname or ip address]:[tcp port] [hostname1]:[tcp_port1]+[hostname2]:[tcp_port2]+ Receiver hostname or IP. If port included, then the receiver tcp port. Used for TCP control communication between client and receiver to configure receiver. Also updates receiver with detector parameters. Also resets any prior receiver property (not on detector). -rx_jsonaddheader [key1] [value1] [key2] [value2]…[keyn] [valuen] +rx_jsonaddheader [key1] [value1] [key2] [value2]…[keyn] [valuen] Additional json header to be streamed out from receiver via zmq. Default is empty. Max 20 characters for each key/value. Use only if to be processed by an intermediate user process listening to receiver zmq packets. Empty value deletes header. -rx_jsonpara [key1] [value1] -Additional json header parameter streamed out from receiver. If not found in header, the pair is appended. An empty values deletes parameter. Max 20 characters for each key/value. +rx_jsonpara [key1] [value1] +[Receiver] Additional json header parameter streamed out from receiver. If not found in header, the pair is appended. An empty values deletes parameter. Max 20 characters for each key/value. -rx_lastclient +rx_lastclient Client IP Address that last communicated with the receiver. -rx_lock [0, 1] +rx_lock [0, 1] Lock receiver to one client IP, 1 locks, 0 unlocks. Default is unlocked. -rx_missingpackets -Number of missing packets for each port in receiver. If negative, they are packets in excess. +rx_missingpackets +Number of missing packets for receiver. If negative, they are packets in excess. -rx_padding [0, 1] +rx_padding [0, 1] Partial frames padding enable in the receiver. Default: enabled. Disabling is fastest. -rx_printconfig +rx_printconfig Prints the receiver configuration. -rx_realudpsocksize +rx_realudpsocksize Actual udp socket buffer size. Double the size of rx_udpsocksize due to kernel bookkeeping. -rx_roi [xmin] [xmax] [ymin] [ymax] +rx_roi [xmin] [xmax] [ymin] [ymax] Region of interest in receiver. Only allowed at multi module level and without gap pixels. -rx_silent [0, 1] +rx_silent [0, 1] Switch on or off receiver text output during acquisition. -rx_start +rx_start Starts receiver listener for detector data packets and create a data file (if file write enabled). -rx_status running, idle, transmitting] +rx_status [running, idle, transmitting] Receiver listener status. -rx_stop +rx_stop Stops receiver listener for detector data packets and closes current data file (if file write enabled). -rx_tcpport [port] +rx_tcpport [port] TCP port for client-receiver communication. Default is 1954. Must be different if multiple receivers on same pc. Must be first command to set a receiver parameter. Multi command will automatically increment for individual modules. -rx_threads +rx_threads Get kernel thread ids from the receiver in order of [parent, tcp, listener 0, processor 0, streamer 0, listener 1, processor 1, streamer 1, arping]. If no streamer yet or there is no second interface, it gives 0 in its place. -rx_udpsocksize [n_size] +rx_udpsocksize [n_size] UDP socket buffer size in receiver. Tune rmem_default and rmem_max accordingly. Max value is INT_MAX/2. -rx_version +rx_version Receiver version -rx_zmqfreq [nth frame] +rx_zmqfreq [nth frame] Frequency of frames streamed out from receiver via zmq Default: 1, Means every frame is streamed out. If 2, every second frame is streamed out. If 0, streaming timer is the timeout, after which current frame is sent out. (default timeout is 500 ms). Usually used for gui purposes. -rx_zmqhwm [n_value] +rx_zmqhwm [n_value]
rx_clearroi Resets Region of interest in receiver. Default is all channels/pixels enabled.