Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Include Page
PSDMInternal:PageMenuBegin
PSDMInternal:PageMenuBegin
Table of Contents
Include Page
PSDMInternal:PageMenuEnd
PSDMInternal:PageMenuEnd

1. Create a test release (Freq: once)

Releases are explained in Packages and Releases section. Create new test release with the command like this:

Code Block
newrel ana-current analisys-rel

This will create a new directory named analisys-rel and populate it with few files:

Code Block
         ./analisys-rel/
                        SConstruct
                        .sit_release

Other directories and hidden system files may appear later at compilation stage or when you run addpkg or newpkg commands.

Below we refer to this directory as a "test release". Usually separate analyses use separate test releases, and each test release should bear unique name if they are located in the same directory.

2. Change to the test release (Freq: every logon or whenever needed)

Code Block
cd analisys-rel
sit_setup

The last sit_setup command is very important and must be executed from the release directory every time you change the directory.

3. Create new analysis package (Freq: once)

Choose sufficiently unique name for your analysis package and create the package.

Note

It's better to choose name which contains letters, digits, and underscores only because the package name will be used for Python package names.

Code Block
newpkg my_ana_pkg

This will create directory my_ana_pkg and populate it with few files and sub-directories:

Code Block
       .../analisys-rel/
                      ./my_ana_pkg/
                                   SConscript
                                   doc/
                                       README
                                       ChangeLog

4. Add analysis module (Freq: once)

Execute following commands:

Code Block
mkdir my_ana_pkg/src my_ana_pkg/include   # only if src and include directories do not exist yet
codegen -l psana-module my_ana_pkg my_ana_mod

This will create files my_ana_pkg/include/my_ana_mod.h and my_ana_pkg/src/my_ana_mod.cpp which contain skeleton code for analysis module.

Note

Like with the package name it's better to use names containing letters, digits, and underscores only.

5. Modify analysis code (Freq: as much as you need)

Use your favorite editor to add or modify code the analysis module. For C++ modules see Psana User Manual for examples.

6. Build (Freq: after every edit)

Run the command which builds all necessary software in your test release:

Code Block
scons

7. Create configuration file (Freq: once)

In addition to analysis module the job usually needs a separate configuration file. The name and location of the file could be arbitrary. C++-based analysis uses file named psana.cfg in current directory by default, create it with your favorite editor:

Code Block
vi psana.cfg

The file will contain both the names of the modules you want to load and parameters you want to pass to those modules, exact content of the configuration file is explained in Pyana User Manual.

8. Run the analysis (Freq: as much as you need)

Chose the data you want to process and start analysis job. Assuming properly prepared psana.cfg in current directory, execute:

Code Block
psana /reg/d/psdm/AMO/amo14410/xtc/e23-r0406-*.xtc