Versions Compared

Key

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

...

  1. Set up your release work directory:
    You should always run this code from your own release working directory. It might work from other directories, but be aware that configuration files will be written to your current directory. Look out for files with names xb_pyana_XXXX.cfg, where XXXX is a random four-digit number. You can use them to run pyana directly from the command line. But they accumulate, so you might want to remove these regularly...
    See the Account Setup section to set up the analysis environment. Set up your release working directory from pslogin:
    Code Block
    none
    none
    [user@pslogin ~] newrel ana-current myrelease
    [user@pslogin ~] cd myrelease
    [user@pslogin myrelease] sit_setup
    

  2. Add the package:
    Next you want to add the XtcExplorer package to your analysis release. Once the package exists in the release, this will be optional. But you might want to have a local copy anyway to be able to edit the source files to tweak your analysis.
    Note that you need to have an afs token to check out the package, so if you didn't already you need to run 'kinit' first:
    Code Block
    none
    none
    [user@pslogin myrelease] kinit
    Password for user@SLAC.STANFORD.EDU:
    
    Now you're ready to check out the package and "compile":
    Code Block
    none
    none
    [user@pslogin myrelease] addpkg XtcExplorer V00-01-0304
    [user@pslogin myrelease] scons
    
    Note! You can omit the "tag" (VXX-XX-XX) to get the latest and greatest version in the svn repository, but this may look different from described here, and might have more problems.

  3. Run the program:
    Launch the GUI with the command 'xtcexplorer' and optionally give the input xtc files that you want to read as arguments. You can also browse to find files after launching the browser.
    To have access to the xtc files, you need to login to psana for this:
    Code Block
    [user@psanaXXX myrelease] sit_setup
    [user@psanaXXX myrelease] xtcexplorer /reg/d/psdm/CXI/cxi22010/xtc/e60-r0465-s0*
    

...

After scanning, a new GUI will pop up showing you a list of detectors/devices found in the file. A little more information is written to the terminal window too.

Image RemovedImage RemovedImage Added

Main window (left) and Pyana Control Center (right) after the file scan.
The main window gives you a short summary of how many events and how many calibration cycles were found. Some more information is printed to the terminal window from which the xtcbrowser was launchedDisplays the number of events and calibration cycles (scan steps)

Image Added

Another window, the Pyana Control Center, pops up after the file scan.

The pyana control center has a field to the left that shows you the detector/device sources found within the file(s). In front of each detector/device name is a checkbox, where you can select which datagrams you are interested in analysing / plotting.

To the right of this is a field with information and general settings: How run options and default plotting options: e.g. how many events to process total, skip events at the beginning of the file(s), How often to display plot (default is every 100 events, unless several scan steps, in which case it will plot for each new scan step). Also allows you to select display mode (default is "SlideShow") and opt to launch iPython at the end for interactive investigation of the data

Image Added

Some more information is printed to the terminal window from which the xtcbrowser was launched

Once you checkmark the detectors you want to display information from, another tab will pop up showing pyana configuration text. "Current pyana configuration": as you select devices from the list, a tentative configuration file for running pyana is written and shown in this field.

If a ControlPV is present and checked off, only a pyana_scan module will be used. All the other devices you check will be added to the input of the scan.
If no ControlPV is used, other pyana modules will be configured as appropriate to display a variety of information from the events.
If "Epics Process Variables" are checked off, another Gui appears that lists all the epics variables. Select the ones you want to display.

Press the "Write configuration to file" button once you're done. Once a file is written, a "Run pyana" button will appear.

You can further edit the configuration file by hand. If you click on "Edit configuration", the file will open in the default editor. Note! The default editor is defined in your EDITOR environment variable. Make sure it is set to your editor of choice (e.g. setenv EDITOR emacs).

"Run pyana" lauches an input GUI that shows you the runstring. You can use the same runstring from the command line. Or hit "OK" and it'll run.

After launching pyana, another button "Quit pyana" appears... If you see you need to change parameters, you can stop pyana, edit the configuration file, and start over again.

...