Page History
...
Code Block |
---|
from psana import * ds = DataSource('exp=xpptut15:run=54:smd') det = Detector('cspad') for nevent,evt in enumerate(ds.events()): img = det.image(evt) y = img.sum(axis=0) break from psmon.plots import Image,XYPlot from psmon import publish # to display the plot from within this script publish.local = True plotimg = Image(0,"CsPad",img) publish.send('IMAGE',plotimg) plotxy = XYPlot(0,"Y vs. X",range(len(y)),y) publish.send('XY',plotxy) |
The above example demonstrates the two most popular styles of plots: Image (with x,y,z coordinates) and XYPlot (with x,y coordinates).
psmon is also able to send plots over the network, which is useful for real-time monitoring. To do this, do not set publish.local=True (see script in /reg/g/psdm/tutorials/examplePython/psmonRemote.py):
...
Overview
Content Tools