Page History
...
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 |
---|---|---|
| "DetInfo()" | source of data |
|
| key for input image data |
| "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) | |
| 10 | low threshold on pixel amplitude |
| 100 | high threshold on pixel amplitude |
| 1.5 | width of the Gaussian for smearing; =0-no smearing |
| 3 | radius in pixel for smearing - radial size of matrix of weights |
| 3 | radius in pixel for peak finding - radial size of the region to search for local maximum |
| 0 | minimal column number |
| 100000 | maximal column number |
| 0 | minimal row number |
| 100000 | maximal row number |
| 0 | event number to save images and print info for test purpose |
| true | On/Off algorithm |
| 0 | module verbosity:
|
...
- 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.
...