Versions Compared

Key

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

...

This algorithm was motivated by users of amo42112:
1. Select the pixels in the window xmin, xmax, ymin, ymax
with amplitudes above the threshold_low.
2. Smear Optionally smears image for selected pixels, using 2-d matrix of weights over pixels
from -smear_radius to +smear_radius around each smeared pixel amplitude.
The matrix of weights is defined by the 2-d Gaussian function of width sigma. If sigma=0 smearing is not applied.
3. Find peaks as pixels with absolute-maximal amplitude above the threshold_high in the center of the matrix -peak_radius to +peak_radius.
4. Put the vector or ndarray of found peaks in the event with key peaksKey or peaks_nda respectively. Each entry of this vector has an object of the struct Peak, containing x, y positions, peak pixel amplitude, the total amplitude in the matrix, defined by the peak_radius, and the number of pixels in the matrix above threshold_low:

...

parameter

default value

description

source

"DetInfo(:Cspad)"

input source of data

key

 

key for input data, for example, it might be "calibrated"

key_signal_out

 

key for output signal array. If the string non-empty, the array is added in the datagram for each event (before selection).

key_peaks_out

"peaks"

key for vector of found peaks in the selected event

key_peaks_nda

 

key for ndarray<const float,2>, shape=[Npeansnpeaks,12] of found peaks in the selected event

hot_pix_mask_inp_file

"cspad-pix-mask-in.dat"

in read the pixel mask from file

hot_pix_mask_out_file

"cspad-pix-mask-out.dat"

out write current pixel mask in the file

frac_noisy_evts_file

"cspad-pix-frac-out.dat"

out file with per-pixel fraction of noisy images

evt_file_out

"./cspad-ev-"

out file with signal CSPad array. Time stamp is added.

rmin

3

radial parameter of the area for median algorithm

dr

1

radial band width of the area for median algorithm

SoNThr_noise

3

S/N threshold for each pixel to be considered as noisy

SoNThr_signal

5

S/N threshold for each pixel to be considered as noisy

frac_noisy_imgs

0.9

fraction of noisy images above which pixel will be masked

peak_npix_min

4

minimal number of connected pixels for the good peak

peak_npix_max

25

maximal number of connected pixels for the good peak

peak_amp_tot_thr

0.

threshold on total signal amplitude of the group of connected pixels, if =0:OFF

peak_SoN_thr

7.

threshold on peak S/N (S and N are sums over connected pixels)

event_npeak_min

10

threshold on minimal number of good peaks for the event selection

event_npeak_max

10000

threshold on maximal number of good peaks for the event selection

event_amp_tot_thr

0.

threshold on total signal amplitude in ADU of all good peaks for the event selection, if =0:OFF

nevents_mask_update

0

number of skipped events before each mask re-evaluation cycle

nevents_mask_accum

50

number of events for the mask re-evaluation

selection_mode

SELECTION_ON

selection mode, other allowed values are: SELECTION_OFF, or SELECTION_INV

out_file_bits

0

control on writing of files:

  • =0 - save nothing
  • +1 - save the hot_pix_mask_out_file file with current mask array in the endJob(...) method
  • +2 - save the frac_noisy_evts_file file with current fraction of noisy events array in the endJob(...) method
  • +4 - save the CSPad signal array for selected events in the file with name like <evt_file_out><counter><run>-<time stamp>.txt
  • +8 - save the vector of found peaks in file <evt_file_out><counter><run>-<time-stamp>-peaks.txt

print_bits

0

module verbosity:

  • =0 - summary at the endJob
  • +1 - input pars (once in beginJob)
  • +2 - initial and current mask statistics (in constructor and when mask is updated)
  • +4 - event selection parameters (for each event); event no., time-stamp, mode, number of peaks, and amp_tot
  • +8 - output in files (for selected events)
  • +16 - start/stop to collect data for mask re-evaluation (driven by the mode counters)
  • +32 - event time stamp (for each event)
  • +64 - vector of indexes and map of indexes for the median algorithm (once in beginJob)
  • +128 - peak parameters before selection (for each event)
  • +256 - peak parameters saved in file (for selected events)
  • +512 - selection statistics (N<5: for each event; N<50: for each 10-th; N<500: for each 100-th, then for each 1000-th)
  • +1024 - event time stamp (for selected events)
  • +2048 - peak finding from connected pixels; this is printed for connected region of signal pixels if npix>peak_npix_min-2 (otherwise too much junk output)

...