Configuring continuous scans

(and everything in general)

Matias Guijarro

BCU Day Out, 19th of November 2015, Le Fantin Latour, Grenoble

In Juyo, scans are configured in code

Acquisition slave and master objects rely on beamline objects

chain = AcquisitionChain()

# m0 is an *existing* beamline object: Emotion motor
# emotion_master configuration is done in code, here m0 will go from
# position 5 to 10, triggering 10 acquisitions (10 points), for 5 seconds
emotion_master = SoftwarePositionTriggerMaster(m0, 5, 10, 10, time=5)

lima_dev = DeviceProxy("id30a3/limaccd/simulation")
params = { "acq_nb_frames": 10,
           "acq_expo_time": 3/10.0,
           "acq_trigger_mode": "INTERNAL_TRIGGER_MULTI" }
# lima_dev is a beamline object: Tango device proxy to a Lima camera
# configuration for LimaAcquisitionSlave is done in code (params dict.)
lima_acq_dev = LimaAcquisitionSlave(lima_dev, **params)

# building the acquisition chain and the scan is done in code
chain.add(emotion_master, lima_acq_dev)
scan = Scan(chain, ScanRecorder())

How to configure beamline objects ?

Use Beacon

Beamline objects configuration

1. Install beacon

Source package installs dependencies for redhate4 or debian6

Beamline objects configuration

2. Run beacon

aelita:~ % cd ~blissadm/server/src
aelita:~/server/src % cat beacon 

#!/usr/bin/env bash

exec beacon-server $@

aelita:~/server/src % cat /users/blissadm/local/daemon/config/device_servers
--db_path=/users/blissadm/local/beamline_control/configuration --posix_queue=0 --webapp_port=8088

Beamline objects configuration

3. Create objects

Using graphical application

or by hand

    class: IcePAP
    host: iceid301
            name: tz1
            address: 51
            steps_per_unit: 120000
            backlash: 0.1
            velocity: 0.0333
            acceleration: 4.5


Beamline objects configuration

4. Instanciate

aelita:~ % python
Python 2.6.6 (r266:84292, Dec 26 2010, 22:31:48) 
[GCC 4.4.5] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> from beacon import static
>>> cfg = static.get_config()
>>> tz1 = cfg.get("tz1")
>>> tz1
<emotion.axis.Axis object at 0x1daa890>

How does it work with different kinds of objects ?


e.g. Emotion motor, Tango device, a MUSST ?

Beacon plugins !

  • Emotion plugin for instanciating Emotion objects
  • Tango built-in plugin : Beacon can replace Databaseds
name: prosilica_md2s
LimaCameraType: Prosilica
  server: LimaCCDs
  personal_name: id30b_sample
  name: tango_prosilica_md2s
      tango_name: id30/limaprosilica/id30b_sample
      class: Prosilica
      properties: $prosilica_md2s/camera
      tango_name: id30/limaccd/id30b_sample
      class: LimaCCDs
      properties: $prosilica_md2s

Tango server configuration (Lima w. Prosilica)

Beacon plugins !

  • Other libraries can instanciate other objects, like MUSST card to be used within a continuous scan
name: musst
class: musst
gpib: enet://
address: 13
aelita:~ % python
Python 2.6.6 (r266:84292, Dec 26 2010, 22:31:48) 
[GCC 4.4.5] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> from beacon import static
>>> cfg = static.get_config()
>>> musst = cfg.get("musst")
>>> dir(musst)
['__doc__', '__init__', '__module__', 'connect', 'get_data', 'gpib_device', 'gpib_ip', 
'gpib_pad', 'io', 'lock', 'prg_root', 'print_info', 'putget', 'upload_file', 
'upload_program', 'val']
>>> musst.putget("?STATE")

Enough Python !


How do I integrate continuous scan with spec ?

See next talk !

  • Continuous scan Tango server
  • Hides all Python code, can be called from spec
  • still, beamline objects configuration should go to Beacon


  • What about Tango servers configuration ? (decision to take)
  • Beacon plugin(s) to add ?
  • Development of the configuration GUI application: how far is it from being usable ?

Remarks / things to talk about

Continuous scans configuration

By Matias Guijarro

Continuous scans configuration

Discussion on Continuous Scans configuration @ BCU day out

  • 1,055