Versions Compared

Key

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

...

The idea here is tomake the bluesky scans look the same as det-config scans.  Mona’s step-store (from “detnames -s”) contains a list of variables, which in both cases includes step_value, step_docstring ("metadata").  In the case of a bluesky scan it also includes the PV values.  In the case of a config scan the configs themselves get updated on each step.

Sample Scan Script

Note that the step_docstring is json as per Mikhail's suggestion above.

Code Block
languagepy
from psana import DataSource
import sys
# a config scan for epix                                                          
ds = DataSource(exp='ueddaq02',run=28)
myrun = next(ds.runs())
step_value = myrun.Detector('step_value')
step_docstring = myrun.Detector('step_docstring')
for nstep,step in enumerate(myrun.steps()):
    print('step:',nstep,step_value(step),step_docstring(step))
    for nevt,evt in enumerate(step.events()):
        if nevt==3: print('evt3:',nstep,step_value(evt),step_docstring(evt))

...