Versions Compared

Key

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

...

This example demonstrates how to run psana with the time stamp filter and event writer in xtc file.
Both modules are available in psana library and they need only to be described in the configuration file. For example, the configuration file ./ana-cxi49012/psana-cxi49012-r0021-tstamp-filter-and-event-writer.cfg may looks like:

Code Block
[psana]                                                               
files         = /reg/d/psdm/cxi<INSTRUMENT>/cxi49012<experiment>/xtc/e158-r0021-s00-c00.xtc \
                /reg/d/psdm/cxi<INSTRUMENT>/cxi49012<experiment>/xtc/e158-r0021-s01-c00.xtc \
                /reg/d/psdm/cxi<INSTRUMENT>/cxi49012<experiment>/xtc/e158-r0021-s02-c00.xtc \
                /reg/d/psdm/cxi<INSTRUMENT>/cxi49012<experiment>/xtc/e158-r0021-s03-c00.xtc \
                /reg/d/psdm/cxi<INSTRUMENT>/cxi49012<experiment>/xtc/e158-r0021-s04-c00.xtc \
                /reg/d/psdm/cxi<INSTRUMENT>/cxi49012<experiment>/xtc/e158-r0021-s05-c00.xtc

skip-events   = 10
events        = 100
modules       = ImgAlgos.TimeStampFilter  PSXtcOutput.XtcOutputModule 

[PSXtcOutput.XtcOutputModule]
dirName       = ./test_out

[ImgAlgos.TimeStampFilter]
tsinterval    = 2012-02-02 18:17:00.409143728 / 2012-02-02 18:17:00.525853474
filterIsOn    = true
print_bits    = 11

Command to run psana is:
psana -c ./ana-cxi49012/psana-cxi49012-r0021-tstamp-filter-and-event-writer.cfg
For this configuration file psana will skip 10 events and loop over the next 100 events from the /reg/d/psdm/cxi<INSTRUMENT>/cxi49012<experiment>/xtc/e158-r0021-s0*-c00.xtc files and run consecutively modules = ImgAlgos.TimeStampFilter PSXtcOutput.XtcOutputModule. Parameters of these modules are described in the bottom part of the configuration file. Module TimeStampFilter passes events from the specified time interval and prints some useful information. Module XtcOutputModule will write passed events in the file with auto-generated name ./test_out/e158-r0021-s00-c00.xtcf.

...