Versions Compared

Key

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

...

psana -c ana-xpp50312/psana-xpp50312-r0082-pedestals.cfg

In a few seconds this command job produces two text files with averaged pedestals and rms values as one-dimensional (143560) array for CSPad2x2, which assumes physical shape . Actual shape of these arrays is assumed to be (185,388,2).
Using, for example, a simple python script this files may be plotted

...

By default psana assumes that all calibration files are located in the pre-defined directory
/reg/d/psdm/<INSTRUMENT>/<experiment>/calib/
as explained in CsPad Locating calibration in translator#Locating calibration files

However, the calibration directory can be re-defined through the psana parameters.

...

and populate them with all necessary for analysis files. In particular, for pedestals we can use:

cp cspad-pedestals-ave-xpp50312-r0082.dat ana-xpp50312/calib/CsPad2x2::CalibV1/XppGon.0:Cspad2x2.0/pedestals/82-end.data

Another file for common mode correction common_mode/0-end.data usually looks like

...

Similarly to pedestals the files for pixel_status and pixel_gain can be somehow supplied depending on user's analysis.

Analysis

For this example we create the configuration file ana-xpp50312/psana-xpp50312-r0092.cfg:

...

This configuration file provides parameters for psana and three modules.
Currently So far we setup calibration files for cspad_mod.CsPadCalib module for pedestal subtraction and common mode correction.
Module CSPadPixCoords.CSPad2x2ImageProducer produces the CSPad2x2 image and saves it in the event.
Module SaveImageInFile saves indicated image(s) in the file(s).

...