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

Compare with Current View Page History

« Previous Version 79 Next »

Introduction

Psana has a simple python-script interface, which can be run online (in realtime), offline, and parallelized over many cores/machines both online and offline.  Once you have run the quick example below (we believe you should be able to run/understand it in <30 minutes) you can find complete documentation all on ONE page here.

Quick Example

To do analysis with a psana python script execute the following commands.  This requires the ability to ssh to an LCLS unix account and the ability to open up a graphics window on your computer ("X-windows").  Two free options for graphics:  XQuartz (for Mac) and NX Technology (for Mac or Windows).  Replace "YOURACCOUNTNAME" in the first line below with your unix account name.

ssh -X pslogin.slac.stanford.edu -l YOURACCOUNTNAME
ssh -X psana

# If you don't know which shell you are using
# try both commands below to see which one succeeds
 
# USE THIS LINE IF YOUR SHELL IS "C-SHELL" (note the ".csh" at the end)
source /reg/g/psdm/etc/ana_env.csh
# USE THIS LINE IF YOUR SHELL IS "BASH" (note the ".sh" at the end)
source /reg/g/psdm/etc/ana_env.sh

cp /reg/g/psdm/tutorials/xcs/ipsana.py ipsana.py
python ipsana.py

The 17-line ipsana.py script loops over 2 events and plots a princeton camera image (close each image window to see the next one).  You can examine the script with the command "more ipsana.py" or edit it with unix editors like emacs, vim, or vi.

 Once you have run the quick example above, you can find complete documentation all on ONE page here.

Features

Some of the features of psana-python:

  • many of the "building block" tools can be used at FELs around the world: e.g. python, MPI and, in future scikit-xray algorithms
  • same code works for online/offline analysis analysis (with real-time plot display), allowing users to do their entire analysis chain with one tool
  • ability to use both simple and complex languages (python/C++)
  • users don't have to wait for xtc-to-hdf5 conversion time
  • access to calibrated images both online/offline (pedestals, common-mode, geometry, bad-pixel mask) for complex detectors (CSPAD, pnCCD, EPIX)
  • local support at SLAC from ~10 people (core offline group and instrument engineers)
  • simple detector names using experiment-specific "aliases"
  • free
  • ability to randomly access xtc data ("jump" to event in middle of file)
  • support for parallel processing of xtc files with thousands of cores using MPI
  • ability to run entire psana code on Windows/Mac machines using virtual box (useful for off-site visualization or code development, for example)
  • No labels