Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Add description of the ImgPixSpectra package

...

  • source (default: "CxiDs1.0:Cspad.0") – source of data,
  • events (default: 10000000) – number of events before stop a job,
  • eventSave (default: 32U) – event number to save the CSPad image file,
  • filter (default: false) – on/off for potential selection filter.

Package ImgPixSpectra

Package ImgPixSpectra is intended to accumulate the spectra for all pixels of the image array.
Different modules of this package work with different data types for detectors like CSPad, mini-CSPad, Opal, Princeton camera, etc. All modules have the same interface and the same functionality.
In the loop over events from beginJob to endJob the image pixel amplitudes are accumulated in the 2-d array,
of the shape (<number-of-pixels>, <number-of-spectral-bins>). The first parameter is defined by the image size. The second is passed as an external parameter of the psana configuration file (psana.cfg) along with minimal and maximal amplitudes. At the endJob the spectral array is saved in file with specified name. Axillary file with the name extension *.sha is created in order to save the shape parameters. For example, the "mini-cspad-pix-spectra.txt.sha" outpuit file contains

Code Block

NPIXELS  143560
NBINS    100
AMIN     500
AMAX     1000
NEVENTS  2549
ARRFNAME mini-cspad-pix-spectra.txt

This information can be used in analysis or presentation of this array.
A few python scripts in ImgPixSpectra/data allow to plot content of the spectral array as a 2-d plot.
Example of the command to plot

Code Block

ImgPixSpectra/data/PlotSpectralArrayFromFile.py mini-cspad-pix-spectra.txt

which gives images for limited range of pixels
Image AddedImage Added Image Added

For complete reference select Doxygen documentation

Module ImgPixSpectra::CSPadPixSpectra

Module configuration parameters:

  • source (default: "CxiDs1.0:Cspad.0" ) – source of data for CSPad
  • events (default: 1<<31U ) – number of events before stop a job
  • inputKey (default: "" ) – input key for data processing stage
  • amin (default: 0. ) – minimal spectral amplitude
  • amax (default: 1000. ) – maximal spectral amplitude
  • nbins (default: 100 ) – number of bins in spectra
  • arr_fname (default: "..._spectral_array.txt" ) – putput file name
    The only difference in interface for other modules is in the default name for the source parameter
    ane the output file name.

Module ImgPixSpectra::MiniCSPadPixSpectra

  • source (default: "DetInfo(:Cspad2x2)" ) – source of data for MiniCSPad

Module ImgPixSpectra::CameraPixSpectra

  • source (default: "DetInfo(SxrBeamline.0:Opal1000.1)" ) – source of data for Opal camera
    or
  • source (default: "DetInfo(:Princeton)" ) – source of data for Princeton camera