DAQ-scan variable (where things like motor positions are changed during a run in "steps" or "calibcycles") can also be accessed used the Detector interface.  This example is in /sdf/group/lcls/ds/ana/tutorials/psana1_examples/controlData.py.

from psana import *
ds = DataSource('exp=xpptut15:run=200:smd')
cd = Detector('ControlData')
for run in ds.runs():
    for nstep,step in enumerate(run.steps()):
        pvList = cd().pvControls()
        for pv in pvList:
            print (f'Step: {nstep}, name/value: {pv.name()}/{pv.value()}')
        for evt in step.events():
            pass
        if nstep>=2:
            import sys
            sys.exit()

References

  • No labels