Page tree

This document shows the procedures need to be done in order to setup Lambda single module system with new X-Spectrum software (libxsp).

Software

Installation

#install the library and tango servers
apt install libxsp lambdactrl lambdarecv


On each host, a receiver tango server (LambdaRecv) is running to receive data from data links and save them in storage. The control tango server (LambdaCtrl) is running on same host.

In the following document, haslambda01 is used as an example to show how the setup is done.

Detector configuration files

The detector configurations are done via yaml file. Each tango server (receiver, control) has it's own file. The file can be found in /localdata/configxsp/ (on some detector PCs, the configurations could be in /opt/xsp/config).

The configuration file of LambdaCtrl is usually called ctrl.yml. The path of the configuration file needs to be set in ConfigurationPath in LambdaCtrl property.

The configuration file of LambdaRecv is usually called recv.yml. The path of the configuration file needs to be set in ConfigurationPath in LambdaRecv property.

ctrl.yml on haslambda01
system:
  id: SYS
  control:
    ip: 192.168.138.46                      # IP of haslambda01
  sync:
    master: 192.168.138.46                   # IP of haslambda01
    slaves: [ 192.168.138.46 ]
    
detectors:
  - id: lambda
    type: Lambda
    operation-mode:
      polarity: holes
      bit-depth: 24
      charge-summing: off
      counter-mode: single
    modules:
      - directory: FullRXModule12
        control:
          ip: 169.254.1.2
          port: 4321
        hv: 200.0
        max-hv: 200.0
recv.yml on haslambda01
system:
  id: SYS
  control:
    ip: 192.168.138.46                        # IP of haslambda01
  sync:
    master: 192.168.138.46                    # IP of haslambda01

receivers:
  - ref: lambda/1
    type: Lambda
    decoding:
      ram-use: 167GB
      threads: 12
    compression:
      compressor: zlib     # one of none, zlib, blosc, blosc/blosclz
      level: 2
      threads: 12
    udp-buffer: 256000000
    links:
      - ip: 169.254.3.1
        mac: B8:CA:3A:EE:6B:A5
      - ip: 169.254.2.1
        mac: B8:CA:3A:EE:6B:A7

Tango Properties

LambdaCtrl

  • ConfigurationPath: as mentioned above, it is the path of ctrl.yml

  • EnableFullLiveImage: 0: no live image from libxsp. 1: enable live image from libxsp (shown in LiveLastImageData attribute in tango server)

  • id: detector id in ctrl.yml file

  • LogLevel: not used

  • ReceiverLocations: tells where the LambdaRecv is located. If it's empty, user needs to start the LambdaRecv manually. Otherwise, the LambdaCtrl forks new process to start LambdaRecv tango server. Format(host:location of LambdaRecv:instance name)

  • ReceiverLog: not used

  • Receivers: device name of receiver. The receiver LambdaCtrl communicates with, LambdaCtrl needs to send metadata (shutter time, etc...) to receiver.

LambdaRecv

CalibrationFile: the calibration file for module. If it's provided, the pixel mask and flatfield are written to data file

ConfigurationPath: as mentioned above, it is the path of recv.yml

id: receivers ref in recv.yml

LogLevel: not used

Run the detector

Once the configurations mentioned above are done, the tango servsers can be start:

Start tango servers

The tango servers can be started via terminal or astor (if the detector belongs to particular beamline and tango user is set as beamline user)

 # if ReceiverLocations is set in LambdaCtrl property, the LambdaCtrl starts the preset receivers automatically

$ /usr/lib/tango/server/LambdaCtrl PETRA-3
sh: 1: kill: Usage: kill [-s sigspec | -signum | -sigspec] [pid | job]... or
kill -l [exitstatus]
ConfigFilePath:/localdata/configxsp/recv.yml
id:lambda/1
Ready to accept request
Whole system is ready
Ready to accept request

#if ReceiverLocations is not set, user needs to start LambdaRecv and LambdaCtrl both manually

# run LambdaRecv in background

$ /usr/lib/tango/server/LambdaRecv PETRA-3 &

$ /usr/lib/tango/server/LambdaCtrl PETRA-3


Control the detector

Once the tango server is ready, the detector can be controlled via LambdaCtrl tango server.

NOTE: some attributes are changed comparing with old Lambda tango server.

  • OpMode: added for changing operating mode. The value is related to the bit depth of the pixel (e.g. 12 is 12bit mode, previously OperatingMode: ContinuousReadWrite). It accepts 12,24, depending on modules, maybe 1,6 as well.
  • Compression: cannot be changed on-fly anymore, it has to be done in compression field in recv.yml.

Live Image

At the moment, there are two sources of live images, one from receiver side(haslambda01:10000/petra/lambdarecv/#/LiveLastImageData), which is taken from data stream written to Nexus file, this live image is only for each slave module. The other one from control tango server(haslambda01:10000/petra/lambdactrl/1/LiveLastImageData) stitches the slave module images (for multi-module system) into one large image with translation information. 

Both live image has refresh rate 1 frame/second by default. Lavue can be used to view the live images. ATKpanel  is not recommended.


  • No labels