Versions Compared

Key

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

...

Module

Functionality

ImgVsTimeSplitInFiles

splitter

CorAna

base class with common methods

CorAnaData

data processing for split files

CorAnaInputParameters

provides storage for input parameters

CorAnaMergeFiles

merging algorithm

CorAnaProcResults

Example showing how to access results using C++ and produce a table for presentation

CorAnaPars.py

singleton class for parameter storage in the wrapping file manager

CorAnaSubmit.py

global methods for the file manager

app/corana_submit

sequence of procedures in the file manager

app/corana.cpp

main module for the part of image vs time correlation processing

app/corana_merge.cpp

main module for merging

data/psana-...-auto-correlation.cfg

psana configuration file for ImgVsTimeSplitInFiles

data/PlotCorAnaResults.py

example of the python script which plots the test result histogram

...

Note

A couple of limitations due to LCLS policy:
Interactive job can be run on psana#### computer, but the batch queues are not seen from psana#### nodes...
Batch job can be submitted from pslogin## computer, but data are not seen directly from pslogin## nodes...

Produce Produces the files:

Code Block
img-xcs-r0015-b0000.bin - file with a part of image vs time
img-xcs-r0015-b0001.bin
img-xcs-r0015-b0002.bin
img-xcs-r0015-b0003.bin
img-xcs-r0015-b0004.bin
img-xcs-r0015-b0005.bin
img-xcs-r0015-b0006.bin
img-xcs-r0015-b0007.bin
img-xcs-r0015-time.txt - list of time-records for all events in processed run.
img-xcs-r0015-time-ind.txt - list of time-records for all events in processed run with time index.
img-xcs-r0015-med.txt - file with metadata. In particular it has the original image size, number of image parts for splitting, number of images in run, etc.

...

Code Block
corana -f <fname-data> [-t <fname-tau>] [-h] [-l <logfile>] [-bh] <basedir>]
bsub -q psfehq -o log-file 'corana -f <fname-data> [-t <fname-tau>] [-h] [-l <logfile>] [-b <basedir>h]'

For example the interactive and batch mode commands:

...

Code Block
corana_merge -f <fname-data> [-t <fname-tau>] [-h] [-l <logfile>] [-b <basedir>h]
bsub -q psfehq -o log-file 'corana_merge -f <fname-data> [-t <fname-tau>] [-h] [-l <logfile>] [-b <basedir>h]'

For example:

Code Block
corana_merge -f img-xcs-r0015-b0001-result.bin -t my-tau.txt

...

Code Block
img-xcs-r0015-image-result.bin

...

Example of how to get and process results

ImgAlgos/app/corana_submit - this script allows to run all of above procedures by a single command from pslogin## node and it keeps eye on processing of jobs in batch and doing the file managment. Command to startprocres

Command to run interactively on psana#### or submit in batch from pslogin## node:

Code Block
corana_submitprocres [-cf <config<fname-file>]data> [-t <fname-tau>] [-xl <logfile>] <xtc-file-list>

For example:

...

[-h]
bsub -q psfehq -o log-file 'corana_procres -f <fname-data> [-t <fname-tau>] [-l <logfile>] [-h]'

Basically it reads files with results and produces the histogram-like table *-hist.txt.

Automatic processing

ImgAlgos/app/corana_submit - is a wrapping script which allows to run all of above procedures by a single command from pslogin## node and it keeps eye on processing of jobs in batch and doing the file managment. Command to start:

Code Block

corana_submit [-c <config-file>] [-t <fname-tau>] [-x] <xtc-file-list>

For example:

Code Block

corana_submit -c ImgAlgos/data/psana-xcsi0112-r0015-img-auto-correlation.cfg -t my-tau.txt /reg/d/psdm/XCS/xcsi0112/xtc/e167-r0015-s00-c00.xtc 

Manual sequential processing

In case of manual processing of all scripts, commands need to be issued in a right order. Commands corana, corana_merge, and corana_procres should have the same list of parameters. This is important, because all file names for these procedures are generated by the same base class ImgAlgos/src/CorAna.cpp

Right sequence of commands to run interactively on psana####

Code Block

psana -c <config-file> <xtc-file-list>
corana         -f <fname-data> [-t <fname-tau>] [-l <logfile>] [-h] 
corana_merge   -f <fname-data> [-t <fname-tau>] [-l <logfile>] [-h]
corana_procres -f <fname-data> [-t <fname-tau>] [-l <logfile>] [-h]

or submit in batch from pslogin## node:

Code Block

bsub -q psfehq -o log-file 'psana -c <config-file> <xtc-file-list>'
bsub -q psfehq -o log-file 'corana         -f <fname-data> [-t <fname-tau>] [-l <logfile>] [-h]'
bsub -q psfehq -o log-file 'corana_merge   -f <fname-data> [-t <fname-tau>] [-l <logfile>] [-h]'
bsub -q psfehq -o log-file 'corana_procres -f <fname-data> [-t <fname-tau>] [-l <logfile>] [-h]'

The corana batch jobs can be submitted and run on separate butch nodes in parallel. All other procedures can be submitted when previous is successfully finished and all necessary files are produced.

File formats

  • File with split-image data for selected events img-xcs-r0015-b000N.bin:
    Currently this file contains <uint16_t> amplitude for each pixel in binary format for:
    Code Block
    <data-for-img-partN-of-img1> <data-for-img-partN-of-img2> ... <data-for-img-partN-of-imgLast> 
    
  • File with metadata parameters img-xcs-r0015-med.txt:
    Code Block
    IMAGE_ROWS      1300
    IMAGE_COLS      1340
    IMAGE_SIZE      1742000
    NUMBER_OF_FILES 8
    BLOCK_SIZE      217750
    REST_SIZE       0
    NUMBER_OF_IMGS  500
    FILE_TYPE       bin
    DATA_TYPE       uint16_t
    TIME_SEC_AVE    8.088413
    TIME_SEC_RMS    0.063639
    TIME_INDEX_MAX       499
    
  • File with image time records img-xcs-r0015-time.txt:
    Code Block
         1        0.000000  0.000000  20120616-080236.671607864    5366      0
         2        8.026429  8.026429  20120616-080244.698036743    8255      1
         3       16.144788  8.118359  20120616-080252.816395836   11177      2
         4       24.154835  8.010048  20120616-080300.826443448   14060      3
        ...
    
    where each record has:
    Code Block
    <image-in-file#> <t(sec)-from-the-1st-event> <dt(sec)> <time-stamp> <fiducials> <event#-since-configure>
    
  • File with image time records and evaluated time index img-xcs-r0015-time-ind.txt:
    Code Block
         1        0.000000  0.000000  20120616-080236.671607864    5366      0        0 
         2        8.026429  8.026429  20120616-080244.698036743    8255      1        1 
         3       16.144788  8.118359  20120616-080252.816395836   11177      2        2 
         4       24.154835  8.010048  20120616-080300.826443448   14060      3        3 
         5       32.281937  8.127102  20120616-080308.953545010   16985      4        4 
        ...
    
    where each record has:
    Code Block
    <image-in-file#>  <t(sec)-from-the-1st-event> <dt(sec)> <time-stamp> <fiducials> <event#-since-configure> <time-index-starting-from-0>
    
  • File with split-image correlators for each value of tau img-xcs-r0015-b000N-result.bin:
    Currently it saves <float> correlator for each pixel in binary format for:
    Code Block
    <corr-for-img-partN-of-tau1> <corr-for-img-partN-of-tau2> ... <corr-for-img-partN-of-tauLast> 
    
  • my-tau.txt:
    Code Block
     1 3 5 7 9 10 12 14 16 18 20 24 28 30 32 36 40 ... 160 180 200 240 280 300 320 360 400
    
    contains the tau values presented in terms of number of ordered images in the file.

...

File name tail

Format

Content

*-image-result.bin

binary for <float32_t> <float>

correlators for all image pixels for all tau values

*-time-ind.txt

text

time records for all selected events/images

*-tau.txt

text

the list of tau intervals

*-med.txt

text

meta data parameters

*-hist.txt

text

Histogram array with correlators averaged for ring regions of the image for all tau values, shown in the first column

How to look at results

It is assumed that all files listed in previous section may be used for further analysis, depending on particular goals.

CorAnaProcResults produces the file *-hist.txt