Versions Compared

Key

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

...

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:We recommend the free NX Technology (for Mac or Windows) for improved performance, but XQuartz (Mac) or XWin32 (Windows) also works.  Replace "YOURACCOUNTNAME" in the first line below with your unix account name.

Note that psana in is a package in a larger python-ecosystem called called conda.  Conda only supports the "bash" unix shell. Once you login you can see what shell you have by typing "echo $SHELL".  If it is not bash:

...

The 17-line ipsana.py script loops over 2 events and plots a CSPAD camera image with many applied calibration corrections, and geometry corrections for each of the detector panels. Close each image window to see the next one.  You can examine the script with the command "cat firstExample.py" or edit it with unix editors like emacs, vim, or vi.


NOTE: The commands above will activate the most recent python 3 version of psana. Psana used to work with python 2, but this version of python has not maintained by the Python Software Foundation since January 1, 2020, and psana support has been discontinued. New psana versions do not support python 2, but it still possible to activate the last available python 2 environment (ana-4.0.45) by adding the py2  option to the psconda.sh  command:

Code Block
source /reg/g/psdm/etc/psconda.sh -py2


Anchor
features
features
Features

...


To run a legacy version of psana, the current psana environment needs to be deactivated. The required version of psana can then be launched. For example, if version 4.0.23 is required, it can be accessed with the following sequence of commands

Code Block

conda deactivate
conda activate ana-4.0.23

...