Versions Compared

Key

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

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 /regsdf/group/glcls/psdmds/swana/tutorials/examplePythonpsana1_examples/controlData.py.

Code Block
from psana import *
ds = DataSourceMPIDataSource('exp=xpptut15:run=200:smd')
cd = Detector('ControlData')
for run in ds.runs():
    for nstep,step in enumerate(ds.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