Page History
Table of Contents |
---|
Introduction
LCLS2 DAQ supports three types of scans
- epics PV scans using bluesky.
...
RIX PV Scan Script
- "on-the-fly" scans of epics PVs
- detector configuration scans
On-The-Fly Scans
These are the simplest scans to run where the DAQ is free-running and a PV is changed while taking data. It's advantages are that it is simpler to run and sometimes quicker (since one does not pause the DAQ to move a motor, for example). A disadvantage is that on a per-shot basis one does not know the precise value of the PV, since the PV is typically only recorded at 1Hz in epicsArch. An example script to move a PV while the DAQ is taking data:
Code Block | ||
---|---|---|
| ||
from epics import caget, caput, cainfo
val = 790000
delta = 7000
import time
while 1:
val += delta
caput('IM3K4:PPM:CAM:EVR:TRIG4:TDES',val)
print(caget('IM3K4:PPM:CAM:EVR:TRIG4:TDES'))
time.sleep(5) |
EPICS PV Step-Scans
EPICS PV step scans use the BlueSky software from BNL (https://nsls-ii.github.io/bluesky/). In this mode one or more PV's are modified while the DAQ is paused, then data is acquired (either for a fixed number of shots or a fixed time) then the DAQ is paused again and the PV is modified again for the next "step". BlueSky supports complex coordinated motion of multiple PV's.
An example A python script has been created to demonstrate support for PV scans with the RIX instrument.
...
Code Block | ||||
---|---|---|---|---|
| ||||
$ 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
As a general rule, one should always verify that the DAQ is running well in "normal" mode before attempting to run a scan.
...
Code Block | ||||
---|---|---|---|---|
| ||||
$ python bluesky_rix.py -h usage: bluesky_rix.py [-h] [-B PVBASE] [-p {0,1,2,3,4,5,6,7}] [-x XPM] [-C COLLECT_HOST] [-t TIMEOUT] [-c READOUT_COUNT] [-g GROUP_MASK] [--config ALIAS] [-v] optional arguments: -h, --help show this help message and exit -B PVBASE PV base (default DAQ:NEH) -p {0,1,2,3,4,5,6,7} platform (default 2) -x XPM master XPM (default 0) -C COLLECT_HOST collection host (default drp-neh-ctl001) -t TIMEOUT timeout msec (default 10000) -c READOUT_COUNT # of events to aquire at each step (default 120) -g GROUP_MASK bit mask of readout groups (default 36) --config ALIAS configuration alias (default BEAM) -v be verbose |
Detector Configuration Scans
These scans use the same "step" idea described above for EPICS PV step-scans, but instead alter a detector configuration object on each step. Currently this has been done for the EPIX area detector to take data in the various gain ranges.