Versions Compared

Key

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

...

By default psana assumes that all calibration files are located in the pre-defined directory
/reg/d/psdm/<INSTRUMENT>/<experiment>/calib/ as explained in Locating calibration files. However, for analysis it may be convenient to re-define the calibration directory through the psana parameters. In order to fulfill the naming conventions we have to create a tree of the calibration sub-directories somewhere in local user's space, for example:

...

  • runs through 400 events of the xtc file exp=meca1113:run=45,
  • uses CSPadNDArrProducer and CSPad2x2NDArrProducer modules to get cspad and four cspad2x2 data  and put them as universal ndarray<T,3> objects in psana event store,

  • uses NDArrAverage module to evaluate and save in file average, rms, mask, and hot pixel map for all array elements:

     

    No Format
    cspad.0-ave-meca1113-r0045.dat
    cspad.0-hot-meca1113-r0045.dat
    cspad.0-msk-meca1113-r0045.dat
    cspad.0-rms-meca1113-r0045.dat
    cspad2x2.1-ave-meca1113-r0045.dat
    cspad2x2.1-hot-meca1113-r0045.dat
    cspad2x2.1-msk-meca1113-r0045.dat
    cspad2x2.1-rms-meca1113-r0045.dat
    cspad2x2.2-ave-meca1113-r0045.dat
    cspad2x2.2-hot-meca1113-r0045.dat
    cspad2x2.2-msk-meca1113-r0045.dat
    cspad2x2.2-rms-meca1113-r0045.dat
    cspad2x2.3-ave-meca1113-r0045.dat
    cspad2x2.3-hot-meca1113-r0045.dat
    cspad2x2.3-msk-meca1113-r0045.dat
    cspad2x2.3-rms-meca1113-r0045.dat
    cspad2x2.4-ave-meca1113-r0045.dat
    cspad2x2.4-hot-meca1113-r0045.dat
    cspad2x2.4-msk-meca1113-r0045.dat
    cspad2x2.4-rms-meca1113-r0045.dat

NDArrAverage module has a bunch of parameters which depend on particular detector/experiments and need to be adjusted looking at spectra of average and rms values from these files. For example averaged image and spectrum and rms spectrum of pixel intensities for

...

Code Block
ssh -Y psana
cd <your-favorite-directory>
kinit

<next 6 lines can be copied and pasted>
newrel ana-0.10.14 my-release-dir;
cd my-release-dir;
sit_setup;
addpkg ImgAlgos HEAD;
addpkg CSPadPixCoords HEAD;
scons -j 8;

<wait a few minutes until it is compiled>


<pick-up *.cfg files> files and run them> 

psana -c psana-meci0114-r0050-exampleimgdump-cspadcalib.cfg
psana -c  psanapsana-meci0114-r0050-exampleimgdump-ndarrcalib.cfg

These example print too much, but this is an intentional example. Level of verbosity can be controlled by the print_bits parameter for each module.

Configuration files

...

Psana can use python modules. A few modules in package pyimgalgos were recently developed to process CSPAD data.

Psana Module Catalog - Package pyimgalgos

Psana Module Examples - Examples for Package pyimgalgos

In particular, module  pyimgalgos.image_save_in_file may save image in 16-bit tiff files.

...

Other option for floating point conversion: -define quantum:format=floating-point

 

 

References

NDArrAverage module