Versions Compared

Key

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

...

Module ImgAlgos::CSPadBkgdSubtract

This module uses the CSPad array, specified by the configuration parameters source and inputKey, subtracts the background, defined in the file bkgd_fname, and saves the resulting array in the event with outputKey. The subtracted background array is normalized on the sum of pixel amplitudes in the quad section norm_sector, which can be set from 0 to 7.

Note

Wiki Markup
The shape of the CSPad array in the file {{bkgd_fname}} is \[4*8*185\]\[388\] for all 2x1 sections.
The shape of the CSPad array in the event, specified by the {{source}} and {{inputKey}} or {{outputKey}},
is \[number_of_sections*188\]\[388\] depends on number of available in DAQ 2x1 sections, provided by the masks in CSPad configuration, for example:

Code Block

   shared_ptr<Psana::CsPad::ConfigV2> config2 = env.configStore().get(m_str_src);
   unsigned mask = config2->roiMask(quad_number); // should be in the range from 0 to 255

Module configuration parameters:

  • source (default: "DetInfo(:Cspad)") – input source of data
  • inputKey (default: " " ) – key for input data, by default use raw data
  • outputKey (default: "bkgd_subtracted" ) – output key for the next data processing stage
  • Wiki Markup
    {{bkgd_fname}} (default: "cspad_background.dat" )
     -- file with CSPad array \[4*8*185\]\[388\] of averaged background
  • norm_sector (default: 0) – CSPad sector in quad from 0 to 7
  • print_bits (default: 0) – module verbosity:
    • 0 - print nothing,
    • 1 bit (1) - input pars,
    • 2 bit (2) - event ID.
    • 3 bit (4) - part of the background array.
    • 4 bit (8) - normalization factor for each event.