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 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.
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()"

source of data

key

 

key for input image data

peaksKey

"peaks"

key for output list of peaks as std::vector<Peak> (if empty - do not save)

peaks_nda key for output list of peaks ndarray<float,2> with shape=[npeaks,5]. Is empty by default (if empty - do not save)

threshold_low

10

low threshold on pixel amplitude

threshold_high

100

high threshold on pixel amplitude

sigma

1.5

width of the Gaussian for smearing; =0-no smearing

smear_radius

3

radius in pixel for smearing - radial size of matrix of weights

peak_radius

3

radius in pixel for peak finding - radial size of the region to search for local maximum

xmin

0

minimal column number

xmax

100000

maximal column number

ymin

0

minimal row number

ymax

100000

maximal row number

testEvent

0

event number to save images and print info for test purpose

finderIsOn

true

On/Off algorithm

print_bits

0

module verbosity:

  • =0 - print nothing,
  • +1 - input pars,
  • +2 - summary,
  • +4 - number of peaks in the event,
  • +8 - per event each peak parameters,
  • +16- info about input image format

...

  • This algorithm consumes ~15 ms/event on psana0101 for full Opal1000 (1024x1024) camera image.
  • Smearing algorithm use a "safety margin" which is currently set to 10 pixels (offset from each boarder of the full image size).
  • Since V00-03-58 saves table of peaks as  ndarray<float,2> with shape=[npeaks,5] if key peaks_nda is non-empty.

See also Example for Module ImgAlgos::ImgPeakFinder.

...