Beam Line Data (BLD) is smaller data that can be delivered to all hutches (i.e. not associated with the DAQ system in one hutch).  This script lives in /sdf/group/lcls/ds/ana/tutorials/psana1_examples/bld.py.  This example includes some of the more common shot information parameters that experiments use.

from psana import *

"""Beam Line Data is smaller data that can be delivered to all hutches
(i.e. not associated with the DAQ system in one hutch). """
from IPython import embed

ds = DataSource('exp=xpptut15:run=59:smd')
ebeamDet = Detector('EBeam')
gasDet = Detector('FEEGasDetEnergy')
for nevent, evt in enumerate(ds.events()):
    ebeam = ebeamDet.get(evt)
    gdet = gasDet.get(evt)
    if ebeam is None or gdet is None: continue
    print('Photon Energy and Charge:',ebeam.ebeamPhotonEnergy(),ebeam.ebeamCharge())
    print('Gas detector energy values, 2 pre-attenuator, 2 post-attenuator:',gdet.f_11_ENRC(),gdet.f_12_ENRC(),gdet.f_21_ENRC(),gdet.f_22_ENRC())
    break



  • No labels