Versions Compared

Key

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

...

Code Block
from psana import *
from psmon.plots import Image
from psmon import publish
publish.plot_opts.aspect = 1 # needed to get images with correct 1:1 aspect ratio
ds = DataSource('exp=xpptut15:run=54:smd')
det = Detector('cspad')
for nevent,evt in enumerate(ds.events()):
    img = det.image(evt)
    plotimg = Image(0,"CsPad",img)
    publish.send('IMAGE',plotimg)
    raw_input('Hit <CR> for next event')
    if nevent>=2: break

...