Page History
...
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
For complete reference see the Doxygen documentation.
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 Auxiliary 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
...
This information can be used in analysis or presentation of this array. The python scripts in ImgPixSpectra/data/
allow to plot content of the spectral array as a 2-d plot. For example, the command
Code Block |
---|
ImgPixSpectra/data/PlotSpectralArrayFromFile.py mini-cspad-pix-spectra.txt
|
generates image for limited range of pixels for CSPad, MiniCSPad, or Camera, respectively:
For complete reference select Doxygen documentation
Module ImgPixSpectra::CSPadPixSpectra
Module configuration parameters:
Module ImgPixSpectra::CSPadPixSpectra
Module configuration parameters:
source
(default: "CxiDs1.0:Cspadsource
(default: "CxiDs1.0:Cspad.0" ) – source of data for CSPadevents
(default: 1<<31U ) – number of events before stop a jobinputKey
(default: "" ) – input key for data processing stageamin
(default: 0. ) – minimal spectral amplitudeamax
(default: 1000. ) – maximal spectral amplitudenbins
(default: 100 ) – number of bins in spectraarr_fname
(default: "..._spectral_array.txt" ) – putput file name
...
source
(default: "DetInfo(SxrBeamline.0:Opal1000.1)" ) – source of data for Opal camera
orsource
(default: "DetInfo(:Princeton)" ) – source of data for Princeton camera
Auxiliary scripts
A few python scripts in ImgPixSpectra/data/
show how to process/plot the spectral array stored in the file.
PlotSpectralArrayFromFile.py
- allows to plot content of the spectral array as a 2-d plot. For example, the command
generates image for limited range of pixels for CSPad, MiniCSPad, or Camera, respectively:Code Block ImgPixSpectra/data/PlotSpectralArrayFromFile.py mini-cspad-pix-spectra.txt
SpectralArray.py
- provides access to the spectral array stored in the file. Theclass SpectralArray
defined in this script is used in thePlotSpectralArrayFromFile.py
.
MergeArrays.py
- sums the arrays from different files defined in the list and saves resulting array in a single file with the same shape. In this script the list of files is hardwired in theget_list_of_input_file_names()
method. The output file name,out_fname
, is also hardwired in the call tospectra_merging(out_fname)
.