Versions Compared

Key

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

...

Filter works on individual image arrays (quadrants). Module checks for CsPad::DataV1, CsPad::DataV2, and CsPadCsPad2x2::MiniElementV1 ElementV1 objects in that order. If any object is found then module runs filter on images in that object. If any one image passes the filter then module returns and event is passed to downstream modules, otherwise framework skips this event.

...

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-CSPadCSPad2x2, 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. Auxiliary file with the name extension *.sha is created in order to save the shape parameters. For example, the "mini-cspadcspad2x2-pix-spectra.txt.sha" outpuit file contains

Code Block
bgColor#F7F7ED
NPIXELS  143560
NBINS    100
AMIN     500
AMAX     1000
NEVENTS  2549
ARRFNAME mini-cspadcspad2x2-pix-spectra.txt

This information can be used in analysis or presentation of this array.

...

parameter

default value

description

source

"CxiDs1.0:Cspad.0"

source of data for CSPad

events

1<<31U

number of events before stop a job

inputKey

 

input key for data processing stage

amin

0.

minimal spectral amplitude

amax

1000.

maximal spectral amplitude

nbins

100

number of bins in spectra

arr_fname

"..._spectral_array.txt"

output file name

Module ImgPixSpectra::

...

CSPad2x2PixSpectra

The only difference in interface of this module from previous is in the default name for the source parameter and the output file name.

parameter

default value

description

source

"DetInfo(:Cspad2x2)"

source of data for MiniCSPad CSPad2x2

Module ImgPixSpectra::CameraPixSpectra

...

parameter

default value

description

source

"DetInfo(:Cspad)"

input source of data

inputKey

 

key for input data, by default use raw data

outputKey

"bkgd_subtracted"

output key for the next data processing stage

<ac:structured-macro ac:name="unmigrated-wiki-markup" ac:schema-version="1" ac:macro-id="7abf0044541f81b1-58fdfec9-404d4c82-bc2cb2d9-c69f0d68bcaa28d758ebb2dc"><ac:plain-text-body><![CDATA[

bkgd_fname

"cspad_background.dat"

file with CSPad array [4*8*185][388] of averaged background

]]></ac:plain-text-body></ac:structured-macro>

norm_sector

0

CSPad sector in quad from 0 to 7

print_bits

0

module verbosity:

  • =0 - print nothing
  • +1 - input pars
  • +2 - event ID
  • +4 - normalization factor for each event
  • +8 - part of the background array

...

parameter

default value

description

source

"DetInfo(:Cspad)"

input source of data

inkey

 

key for input data, by default use raw data

outkey

"bkgd_subtracted"

output key for the next data processing stage

<ac:structured-macro ac:name="unmigrated-wiki-markup" ac:schema-version="1" ac:macro-id="583bc765e546b4bc-0fdb00c2-4eae464d-9f8d9353-330462f0d43fbf5f63d9f783"><ac:plain-text-body><![CDATA[

mask_fname

"cspad_mask.dat"

file with CSPad mask array [4*8*185][388]

]]></ac:plain-text-body></ac:structured-macro>

masked_amp

0

this amplitude will replace the amplitude in each masked pixel

mask_control_bits

1

control bits for applied mask:

  • =0 - do not apply any mask
  • +1 - apply mask from file
  • +2 - mask two long edges of 2x1
  • +4 - mask two short edges of 2x1
  • +8 - mask two short rows in the middle of 2x1 (rows with wide pixels)

print_bits

0

module verbosity:

  • =0 - print nothing
  • +1 - input pars (in beginJob)
  • +2 - event ID (in event)
  • +4 - mask statistics (in beginJob)
  • +8 - part of the mask array (in beginJob)

...