Versions Compared

Key

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

...

- number of peaks in Equ region (constrain on sp.count_equ_pks_sel is not applied).

Scripts for analysis on 2015-05-18

Current version of scripts with comments is collected here. It is assumed that you work on one of psana nodes which has access to data, for example:

Code Block
ssh -Y psana
cd <your-analysis-directory>
sit_setup

Download files in <your-analysis-directory>

Beside automatically loaded calibration files (for pedestals, common mode, masks, geometry, etc.) this configuration file uses four external files with region masks and background

These files are expected to be in the <your-analysis-directory>/work directory.

  • psana-cxif5315-r0169-cspad-ds2-NDArrDropletFinder.py.txt (download) - python script, which used *.cfg file to produce all ndarrays in the event store, gets these ndarrays, does preliminary processing, saves list of peaks in the output text file, draw events (if requested).
    This script can be run interactively or in batch by commands:

    Code Block
    // interactive command:
    psana -c psana-cxif5315-r0169-cspad-ds2-NDArrDropletFinder.cfg exp=cxif5315:run=169
    
    
    // batch job submission command:
    bsub -q psfehq -o log-r169.log python psana-cxif5315-r0169-cspad-ds2-NDArrDropletFinder.py

    At least 2 parameters need to be adjusted in this script for each mode:

    Code Block
        do_plot = True             - should be = False in the batch mode
        #events_max  = 10000000    - for batch mode loop over all events
        events_max  = 1000         - for loop over 1000 events in interactive mode

    This job produces text file with all found peaks with name like work/peaks-2015-05-09-23:52:30-cxif5315-r0169-all.txt, which can be used for further analysis

  • proc-peaks-from-file.py (download) - python script for processing of the text file with list of peaks.
    Input file name and output file path prefix should be set at the end of this script:

    Code Block
        procPeaksFromFiles (('work/peaks-2015-05-09-23:52:30-cxif5315-r0169-all.txt',), '2015-05-14-figs-cxif5315/plot-cxif5315-r0169-all')

    After that this script can be executed by the command:

    Code Block
    python proc-peaks-from-file.py

    which loops over peaks in file, does analysis, and plots requested histograms at the end.

References

...