You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 5 Next »

This script lives in /reg/g/psdm/tutorials/examplePython/evr.py.  EVR data is often used to determine what happened on an event by looking at "event codes".  Experiments often use these event codes to indicate whether a pump laser was on/off for a particular shot, or whether beam was present on that shot ("dropped shots").  Experiments sometimes set up complex "event sequences" to create different behavior on different shots (via different event-codes generated by the LCLS timing system).

from psana import *
ds = DataSource('exp=xpptut15:run=54:smd')
evr = Detector('evr0')
for nevent,evt in enumerate(ds.events()):
    if nevent==3: break
    ec = evr.eventCodes(evt)
    if ec is None:
        continue
    print ec
  • No labels