Next: Usage Up: SLS Detector text clients Previous: Detector setup
Subsections

- Standard commands
- Postprocessing commands
  - Angular conversion
- Acquisition
- Debug
  - Version
  - Tests
- Advanced commands
  - Calibration
  - Acquisition commands
  - Configuration
  - Receiver - GOTTHARD only
  - Postprocessing
- Detector settings

# Retrieving detector parameters

`sls\_detector\_get [j-][i:]var [arg]`

is used to retrieve the detector parameters `var`.
For some commands, an additional argument `arg` is needed.

## Standard commands

All the commends return two strings, where string1 is the command, string2 is teh actual returned string.

config fname
  Dumps the current configuration of the detector to the file fname.
parameters fname
  Dumps the current acquisition parameters of the detector to the file fname.
settings
  Returns the current settings of the detector. Returns a string

threshold
  For photon counting detectors, returns the detector threshold in eV, -1 if undefined. Returns ``threshold value_in_eV''. If it fails, the returned threshold is the old set value.

timing
  Returns the acquisition timing mode of the detector. Refer to the detailed documentation to understand how the different timing modes work.
outdir
  Returns the path where the output files are saved to.
fname
  Returns the prefix of the file name for the data output.
enablefwrite
  Returns if data are written to file (1) or not (0).
exptime
  Returns the exposure time of a single acquisition in seconds. Example: "exptime 1.000000000'' Refer to detailed documentation to understand how the different timing modes work.
period
  Returns the frames period (in s). Example: ``period 1.000000000'' Refer to detailed documentation to understand how the different timing modes work.
delay
  Returns the delay after trigger in triggered mode (in s). Refer to detailed documentation to understand how the different timing modes work.
gates
  Returns the number of gates per frame in gated (stroboscopic) mode. Refer to detailed documentation to understand how the different timing modes work.
frames
  Returns the number of frames acquired sequentially per cycle (e.g. after each trigger), with the exposure time defined by exptime and the period defined by period (unless in gated mode). Returned as a string to be interpreted as an integer ``frames integer'' Note that the total number of images is frames times cycles. Refer to detailed documentation to understand how the different timing modes work.
cycles n
  Returns the number of cycles (e.g. number of triggers). Returned as atring to be interpreted as an integer ``cycles integer'' Note that the total number of images is frames times cycles. Refer to detailed documentation to understand how the different timing modes work.
probes
  Returns the number of probes to accumulate for stroboscopic measurements. Refer to detailed documentation to understand how the different timing modes work.
measurements
  Returns the number of repetitions of the acquisitions (non real time!). Refer to detailed documentation to understand how the different timing modes work.
dr
  Returns the dynamic range n (in bits) of the data for a photon counting detector. Returns a string that should be interpreted as an integer.

flags s
  Returns the flags set for your detector.
help cmd
  Returns the help for command cmd.
lock
  Returns if the detector is locked to a single PC.
lastclient
  Returns the last client which has connected to the detector.
nmod n
  Returns the number of modules which are read out. Will be replaced by ROI.
maxmod
  Returns the maximum number of modules (size) of the detector. Will be replaced by size.

## Postprocessing commands

flatfield
  Returns the flat field file name.
ratecorr
  Returns the dead time used for rate corrections.

### Angular conversion

fineoff
  Returns the fine offset used to convert channel number to angles
samplex
  Returns the sample displacement from the center of the diffractometerin the X-ray direction, to improve angular conversion (unused).
sampley
  Returns the sample displacement from the center of the diffractometer in the ortogonal direction, to improve angular conversion (unused)

## Acquisition

See SLS Detectors Documentation for a detailed description of the acquisition flow.

positions
  Returns the number of positions n and their value.
startscript
  Returns the script to be executed at the beginning of each measurement.
startscriptpar
  Returns the parameter to be passed to the start script
stopscript
  Returns the script to be executed at the end of each measurement.
stopscriptpar
  Returns the parameter to be passed to the stop script.
scriptbefore
  Returns the script to be executed before each acquisition.
scriptbeforepar
  Returns the parameter to be passed to the script before.
scriptafter
  Returns the script to be executed after each acquisition.
scriptafterpar
  Returns the parameter to be passed to the script after.
headerbefore
  Returns the script to be executed to acquire the header of the acquisition.
headerbeforepar
  Returns the parameter to be passed to the header before.
headerafter
  Returns the script to be executed to append to the header of the acquisition.
headerafterpar
  Returns the parameter to be passed to the header after.
scan0scripts
  Returns the script to execute at scan 0 level.
scan0par
  Returns a parameter to be passed to the scan 0 level script.
scan0prec
  Returns the number of decimal digits for the scan0 level parameter in the file name (default is 0).
scan0steps
  Returns the number of scan 0 level steps n and their value.
scan0range
  Same as scan0steps.
scan1script
  Returns the script to execute at scan 1 level.
scan1par
  Returns a parameter to be passed to the scan 1 level script.
scan1prec
  Returns the number of decimal digits for the scan1 level parameter in the file name (default is 0).
scan1steps
  Returns the number of scan 0 level steps n and their value.
scan1range
  Same as scan1steps.

## Debug

Commands to be used to retrieve information about the detector version or perform tests.

### Version

moduleversion[:i]
  Returns the version of the module firmware.
detectornumber
  Returns the serial number of the module (normally the MAC address).
modulenumber[:i]
  Returns the serial number of the module i.
detectorversion
  Returns the version of the controller firmware.
softwareversion
  Returns the version of the software running on the detector.
thisversion
  Returns the version of the control software which is being used.
detectorsvnversion
  Returns the SVN version of the software on the detector.

### Tests

digitest[:i]
  Makes a digital test of module i. Afterwards the detector must be reconfigured for the acquisition (settings, threshold, exptime, dr, frames etc.). Returns 0 if succeeded, otherwise an error mask.
bustest
  Makes a digital test of the communication between CPU and FPGA. Returns 0 if succeeded, otherwise the number of errors.

## Advanced commands

### Calibration

This operations should be performed only rarely to configure the detector

encallog
  returns whether the logging for energy calibration is enabled.
angcallog
  returns whether the logging for angular calibration is enabled.

### Acquisition commands

It is normally recommended to use `sls\_detector\_acquire [j-]`, which takes care of everything

acquire
  Same as `sls\_detector\_acquire`
data
  Gets, saves and processes all data stored on the detector, if any.
frame
  Gets, saves and processes one frame stored on the detector, if any in a Firt-In/First-Out mode.
status
  Returns the detector status - can be: running, error, transmitting, finished, waiting or idle
online
  Returns whether the detector is in online or offline mode.
checkonline
  Returns whether the detector is in online or offline mode.
readctr i fname
  GOTTHARD related - reads counter in detector to file fname, restarts acquisition if i=1
exptimel
  Returns the exposure time left for the current frame.
periodl
  Returns the period left for the current frame.
delayl
  Returns the delay after trigger left for the current frame.
gatesl
  Returns the number of gates left for the current frame.
framesl
  Returns the number of frames left for the current cycle.
cyclesl
  Returns the number of cycles left for the current acquisition.
now
  Returns the current timestamp of the detector clock.
timestamp
  Returns the timestamp of the acquisitions in a First-In/First-Out mode i.e. every time it is called it returns the timestamp of the first acquisition start of readout. The FIFO is reset everytime the acquisition is started.

### Configuration

Advanced commands to configure the detector system. Should be left to the configuration file

type
  Returns the types of detector controllers in the system.
hostname
  Returns the hostnames or IP addresses for the detector
d:extsig:i
  Returns the usage of the external IO signal i of the controller d.
master
  Returns the master of the acquisition in a multicontroller detector. -1 is none.
sync
  Returns the synchronization mode of the various controller within a detector structure.
trimdir
  Same ad settingsdir.
settingsdir
  Returns the path of the directory where the trim/settings files are stored.
caldir
  Returns the path of the directory where the calibration files are stored.
trimen n e1 e2 ...en
  Unused. Returns the list of energies for which trimfiles exist.
port
  Returns the port used by the sockets to control the detector.
stopport
  Returns the port used by the sockets to stop/get the status of the detector.
id[:i]
  returns the id of the detector structure. i is the detector position in a multi detector system
free
  Avoid using it. Frees the shared memory.

Settable communication parameters:

txndelay_left
  EIGER advanced: Set transmission delay of sending the left port frame
txndelay_right
  EIGER advanced: Set transmission delay of sending the right port frame
txndelay_frame
  EIGER advanced: Set transmission delay of sending the entire frame In addition to left and right. This value has to be greater than the maximum of the transmission delays of each port.

### Receiver - GOTTHARD only

detectormac
  returns the mac of the detector udp interface to mac (if configurable). Should be left to the configuration file.
rx_tcpport
  returns the communication port between client and receiver. Should be left to the configuration file.
rx_udpport
  returns the communication port between detector and receiver. Should be left to the configuration file.
rx_hostname
  returns the hostname (or IP address) of the receiver for the TCP/IP interface with the client.
rx_udpip
  returns the IP address of the receiver for the UDP interface with the detector.

r_online b
  Returns whether the receiver in online (1) or offline (0) mode.
r_checkonline
  Returns whether the receiver in online (1) or offline (0) mode.
framescaught
  Returns the number of frames received. Returns: "framescaught n''
resetframescaught n
  Sets the number of frames received to 1
frameindex
  Returns the index of the last frame received.
r_lock
  Returns whether the receiver is locked (1) or unlocked (0).
r_lastclient
  Returns the IP of the last client which connected to the receiver.

### Postprocessing

Some advanced commands to configure data postprocessing.

ffdir
  Returns the directory where the flat field files are stored.
darkimage fname
  GOTTHARD- ADVANCED- Returns the dark image file for the detector.
gainimage fname
  GOTTHARD- ADVANCED- Returns gain image file for the detector.
badchannels fname
  Returns bad channel file to fname.
threaded b
  Returns whether the data are written to disk in parallel with the acquisition (1) or after the acquisition (0).

Angular conversion

globaloff
  Returns the offset of the beamline i.e. angular position of channel 0 when angular encoder at 0.
angconv
  Returns the file used for the coefficients for angular conversion.
binsize
  Returns the size of the angular bins for angular conversion.
angdir
  Returns the angular direction of the detector (1 means channel number in the same direction as the angular encoder, -1 different direction).
d:moveflag
  Related to a single controller d. Returns 1 if the detector modules move with the angular encoder, 0 if they are static (useful for multidetector systems).

## Detector settings

Advanced settings changing the analog or digital performance of the acquisition. Use them only if you are sure of what you are doing!

vthreshold
  Returns the DAC value of the detector threshold to n.
vcalibration
  Returns the DAC value of the calibration pulse amplitude to n.
vtrimbit
  Returns the DAC value defining the trimbits LSB size to n.
vpreamp
  Returns the DAC value of the preamp feedback to n.
vshaper1
  Returns the DAC value of the shaper1 feedback to n.
vshaper2
  Returns the DAC value of the shaper2 feedback to n.
vhighvoltage
  Returns the DAC value of the high voltage to n.
vapower
  CHIPTEST BOARD ONLY - Returns the DAC value of the analog voltage to n.
vddpower
  CHIPTEST BOARD ONLY - Returns the DAC value of the analog voltage to n.
vshpower
  CHIPTEST BOARD ONLY - Returns the comparator power supply in dac units (0-1024).
viopower
  CHIPTEST BOARD ONLY - Returns the FPGA I/O power supply in dac units (0-1024).
vref_ds
  Returns vrefds
vcascn_pb
  Returns vcascn_pb
vcascp_pb
  Returns vcascp_pb
vout_cm
  Returns vout_cm
vcasc_out
  Returns vcasc_out
vin_cm
  Returns vin_cm
vref_comp
  Returns vref_comp
ib_test_c
  Returns ib_test_c
vsvp
  Returns vsvp
vsvn
  Returns vsvn
vtr
  Returns vtr trim strength (EIGER)
vrf
  Returns vrf preamp gain (EIGER)
vrs
  Returns vrs shaper gain (EIGER)
vtgstv
  Returns vtgstv (EIGER)
vcmp_ll
  Returns vcmp_ll (EIGER) leftmost chip theshold
vcmp_lr
  Returns vcmp_lr (EIGER) second to leftmost chip theshold
vcmp_rl
  Returns vcmp_rl (EIGER) second to rightmost chip theshold
vcmp_rr
  Returns vcmp_rr (EIGER) rightmost chip theshold
vcall
  Returns vcall calibration stength (EIGER)
rxb_rb
  Returns rxb_rb rightmost chip value to decode 0-1 in the readout
rxb_lb
  Returns rxb_lb leftmost chip value to decode 0-1 in the readout
vcp
  Returns vcp cascode p value (EIGER)
vcn
  Returns vcn cascode n value (EIGER)
vis
  Returns vis shaper current (EIGER)
iodelay
  Returns iodelay
temp_adc
  Returns the temperature of the ADCs
temp_fpga
  Returns the temperature of the FPGA.
temp_fpgaext
  Returns the temperature close to the fpga (EIGER).
temp_10ge
  Returns the temperature close to the 10GE (EIGER).
temp_dcdc
  Returns the temperature close to the dc dc converter (EIGER).
temp_sodl
  Returns the temperature close to the left so-dimm memory (EIGER).
temp_sodr
  Returns the temperature close to the right so-dimm memory (EIGER).
temp_fpgafl
  Returns the temperature of the left front end board fpga (EIGER).
temp_fpgafr
  Returns the temperature of the right front end board fpga (EIGER).

reg a
  Write to register of address a the data d
clkdivider
  Returns the clock divider for the readout.
setlength
  Returns the length of the set/reset signals in the acquisition.
waitstates
  Returns the wait states for CPU/FPGA communication.
totdivider
  Returns the tot clock divider.
totdutycycle
  Returns the tot duty cycle.
setup
  Dumps all settings to file (config, parameters, trimbits etc.).
trimbits fn
  Dumps the trimbits to the file files fn.snxxx

Next: Usage Up: SLS Detector text clients Previous: Detector setup