You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 2 Next »

LCLS2 supports PV scans using bluesky.

RIX PV Scan Script

A python script has been created to demonstrate support for PV scans with the RIX instrument.

The source code is here: https://github.com/slac-lcls/lcls2/blob/master/psdaq/psdaq/control/bluesky_rix.py

This script scans a simulated motor at 15 equally spaced points from -10 to 10, recording 120 events at each point.  The number of events per step can be adjusted using a command line argument.   A user with knowledge of the direct motor should update the script to replace the simulated motor.

The parameters of the scan should be updated to match the requirements of the experiment.  To do so, update this section of bluesky_rix.py:


bluesky_rix.py scan parameters
# Scan motor1 from -10 to 10, stopping
# at 15 equally-spaced points along the way and reading dets.
RE(scan(dets, motor1, -10, 10, 15))


Here is the script in action:

bluesky_rix.py demo
$ python bluesky_rix.py 

Transient Scan ID: 1     Time: 2020-12-10 18:24:53
Persistent Unique Scan ID: '2092a9ca-160c-4b52-8683-256f699e1e01'
New stream: 'primary'
+-----------+------------+------------+
|   seq_num |       time |     motor1 |
+-----------+------------+------------+
|         1 | 18:24:58.5 |    -10.000 |
|         2 | 18:24:59.6 |     -8.571 |
|         3 | 18:25:00.6 |     -7.143 |
|         4 | 18:25:01.6 |     -5.714 |
|         5 | 18:25:02.7 |     -4.286 |
|         6 | 18:25:03.7 |     -2.857 |
|         7 | 18:25:04.8 |     -1.429 |
|         8 | 18:25:05.8 |      0.000 |
|         9 | 18:25:06.8 |      1.429 |
|        10 | 18:25:07.9 |      2.857 |
|        11 | 18:25:08.9 |      4.286 |
|        12 | 18:25:10.0 |      5.714 |
|        13 | 18:25:11.0 |      7.143 |
|        14 | 18:25:12.0 |      8.571 |
|        15 | 18:25:13.1 |     10.000 |
+-----------+------------+------------+
generator scan ['2092a9ca'] (scan num: 1)

Preparing for a PV Scan


  • No labels