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

Compare with Current View Page History

« Previous Version 2 Next »

In psana-python we support two types of visualization: the standard python matplotlib, and a more interactive form of plotting that can also be used for real-time monitoring called "psmon".

A simple matplotlib script can be seen in this example.  A corresponding version in psmon (which allows much more "interaction" with the plot is here:

more psmonLocal.py
from psana import *
ds = DataSource('exp=xpptut15:run=54:smd')
det = Detector('cspad',ds.env())
for nevent,evt in enumerate(ds.events()):
    # includes pedestal subtraction, common-mode correction, bad-pixel
    # suppresion, and returns an "unassembled" 3D array of cspad panels
    calib_array = det.calib(evt)
    # this is the same as the above, but also uses geometry to
    # create an "assembled" 2D image (including "fake pixels" in gaps)
    img = det.image(evt)
    break
from psmon.plots import Image
from psmon import publish
publish.local = True
plotimg = Image(0,"CsPad",img)
publish.send('image',plotimg)

 

 

  • No labels