Versions Compared

Key

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

...

Code Block
languagepy
from psana import DataSource
ds = DataSource(exp='tmoc00118', run=222, dir='/cds/data/psdm/prj/public01/xtc'\
, max_events=10100)
myrun = next(ds.runs())
opal = myrun.Detector('tmoopaltmo_atmopal')
epics_det = myrun.Detector('IM2K4_XrayPower')
for evt in myrun.events():
    img = opal.raw.image(evt)
    epics_val = epics_det(evt)
	    # check for missing data                                                    
    if img is None or:
        print('no image')
    else:
        print(img.shape)
    if epics_val is None:
        print('noneno epics value')
    else:
    continue
    print(img.shape,epics_val)


Example Script Producing Small HDF5 File

...