See description of the module in Module ImgAlgos::NDArrDropletFinder
This module is a more generic implementation of the Module ImgAlgos::ImgPeakFinder in case of data segmented for multiple sensors, like in cspad.
The minimal configuration file for psana may look like psana-xppd7114-r0081-cspad2x2-NDArrDropletFinder.cfg
[psana] #calib-dir = /reg/d/psdm/XPP/xppd7114/calib - is used by default files = exp=xppd7114:run=81 events = 10 modules = CSPadPixCoords.CSPad2x2NDArrProducer \ ImgAlgos.NDArrCalib \ CSPadPixCoords.CSPad2x2NDArrReshape \ ImgAlgos.NDArrDropletFinder [CSPadPixCoords.CSPad2x2NDArrProducer] source = XppGon.0:Cspad2x2.0 inkey = outkey = nda_raw outtype = int16 print_bits = 3 [ImgAlgos.NDArrCalib] source = XppGon.0:Cspad2x2.0 key_in = nda_raw key_out = nda_clb:as_data do_peds = yes do_cmod = yes do_stat = yes do_mask = no do_bkgd = no do_gain = no do_nrms = no do_thre = no fname_mask = fname_bkgd = masked_value = 0 threshold_nrms = 3 threshold = 100 below_thre_value = 0 bkgd_ind_min = 0 bkgd_ind_max = 1000 bkgd_ind_inc = 10 print_bits = 255 [CSPadPixCoords.CSPad2x2NDArrReshape] source = XppGon.0:Cspad2x2.0 keys_in = nda_clb:as_data print_bits = 0 [ImgAlgos.NDArrDropletFinder] source = XppGon.0:Cspad2x2.0 key = nda_clb key_droplets = nda_droplets key_smeared = nda_sme threshold_low = 1 threshold_high = 3 sigma = 1.5 smear_radius = 3 peak_radius = 3 low_value = -0.1 windows = 0 10 160 20 350 \ 1 10 160 10 150 \ 1 30 170 220 370 fname_prefix = test print_bits = 511 |
which defines parameters of a few modules with functionality as follows.
This file can be executed by the command
psana -c psana-xppd7114-r0081-cspad2x2-NDArrDropletFinder.cfg |
This job generates a bunch of files for all events with names like test-xppd7114-r0081-e000006-<suffix>.txt
, where <suffix>
stands for raw
(data), smeared
(if requested), and peaks
. Using browser PlotNDArrayAndPeaks.py one may get images like:
Fig.1: Image of cspad2x2, containing two 2x1 segments. Droplet-finder is applied to the calibrated and smeared data in three windows.