Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

In [4]: daq.configure(motors=[sim.fast_motor1],group_mask=360x24, events=0, detname='andor_norm_0', seq_ctl=['DAQ:NEH:XPM:3:SeqReset',9,'DAQ:NEH:XPM:3:SeqDone'])
INFO     configure - configure: 1 motors
INFO     configure - Found readout group 5 for andor_norm_0.
Out[4]: ({}, {})
In [5]: RE(bp.scan([daq], sim.fast_motor1, -10, 10, 5))

...

Code Block
languagepy
(ps-4.5.26) drp-srcf-eb009:lcls2$ python junk5.py
nstep/nevent/nnorm 0 64001 2
nstep/nevent/nnorm 1 64001 2
nstep/nevent/nnorm 2 64001 2
nstep/nevent/nnorm 3 64001 2
nstep/nevent/nnorm 4 64001 2

(ps-4.5.26) drp-srcf-eb009:lcls2$ cat junk5.py
from psana import DataSource
import datetime as dt
import numpy as np
import sys

ds = DataSource(exp='rixx1003821',run=68,dir='/cds/data/psdm/prj/public01/xtc')
myrun = next(ds.runs())
andor_norm = myrun.Detector('andor_norm')

for nstep,step in enumerate(myrun.steps()):
    nnorm = 0
    for nevent,evt in enumerate(step.events()):
        norm_value = andor_norm.raw.value(evt)
        if norm_value is not None: nnorm+=1
    print('nstep/nevent/nnorm',nstep,nevent,nnorm)
(ps-4.5.26) drp-srcf-eb009:lcls2$ 

Infinite Sequence With 2 Different Slow Andor Rates

The only way to stop a running infinite sequence is to program another sequence.

...

python psdaq/psdaq/control/rix_bluesky_scan.py -p 2 -C drp-srcf-cmp004 -g 36 --detname andor_vlsnorm_0 --seqctl DAQ:NEH:XPM:3:SeqReset 9 DAQ:NEH:XPM:3:SeqDone

...

In [8]: daq.configure(motors=[sim.fast_motor1],group_mask=360x24, events=200, detname='andor_norm_0', record=True)
INFO     configure - configure: 1 motors
INFO     configure - Found readout group 5 for andor_norm_0.
Out[8]: ({}, {})

...

An example run for this mode is rixx1003821 run 55 which has been made public in the directory /cds/data/psdm/prj/public01/xtc/.  A simple analysis script and associated output :is here.  Since the sequence is running continuously the "phase" of the scan startup is random on each step with respect to the sequence, and so the number of beam shots and slow-andor triggers have some randomness, while the faster andor has a well defined number of events (200).

Code Block
languagepy
(ps-4.5.26) drp-srcf-eb009:lcls2$ python junk4.py
nstep/nevent/nnorm/ndir 0 32399 200 3
nstep/nevent/nnorm/ndir 1 32283 200 3
nstep/nevent/nnorm/ndir 2 32399 200 3
nstep/nevent/nnorm/ndir 3 32284 200 3
nstep/nevent/nnorm/ndir 4 32298 200 4

(ps-4.5.26) drp-srcf-eb009:lcls2$ more junk4.py
from psana import DataSource
import datetime as dt
import numpy as np
import sys

ds = DataSource(exp='rixx1003821',run=55,dir='/cds/data/psdm/prj/public01/xtc')
myrun = next(ds.runs())
andor_norm = myrun.Detector('andor_norm')
andor_dir = myrun.Detector('andor_dir')

for nstep,step in enumerate(myrun.steps()):
    nnorm = 0
    ndir = 0
    for nevent,evt in enumerate(step.events()):
        norm_value = andor_norm.raw.value(evt)
        dir_value = andor_dir.raw.value(evt)
        if norm_value is not None: nnorm+=1
        if dir_value is not None: ndir+=1
    print('nstep/nevent/nnorm/ndir',nstep,nevent,nnorm,ndir)
(ps-4.5.26) drp-srcf-eb009:lcls2$