Page History
...
The algorithm performance was tested for CSPad images. This algorithm consumes up to 15 ms/event on psana0205 , for full CSPad (1650x1650) window size. For smaller window consumed time is negligible, comparing to the image reconstruction time, which is ~70 ms/event (for cspad_mod.CsPadCalib
and CSPadPixCoords::CSPadImageProducer
) on psana0205.
...
source
(default: "DetInfo(:Cspad)") – source of datakey
(default: "Image2D") – key for input image datathreshold
(default: 10) – minimal threshold on pixel amplitudenumPixMin
(default: 100) – minimal number of pixels with amplitude above the thresholdfilterIsOn
(default: true) – On/Off the filterxmin
(default: 0) – minimal row column numberxmax
(default: 100000) – maximal row column numberymin
(default: 0) – minimal column row numberymax
(default: 100000) – maximal column row number
Remarks:- The default
key
("Image2D") stands for theCSPadPixCoords::Image2D<double>
image object. Otherkey
names work for thendarray<double,2>
image object. - The
xmin
,xmax
,ymin
,ymax
(in pixels) defines the window in the image for pixel counting. Default values means the entire image range. - The
threshold
,numPixMin
, and the window extents have to be adjusted for particular experiment.
Module ImgAlgos::ImgPeakFinder.cpp
(Development in progress)
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 Gaussian weights over pixels
from -smear_radius
to +smear_radius
around each smeared pixel amplitude.
Gaussian widths is defined by its sigma
value.
3. find peaks as pixels with absolute-maximal amplitude in the center of the matrix
-peak_radius
to +peak_radius
. The peak amplitude should exceed the threshold_high
. (There might be a requirement on number of non-zero amplitude pixels in the matrix around the peak position.)
Module configuration parameters:
source
(default: "DetInfo()") – source of datakey
(default: "") – key for input image datathreshold_low
(default: 150) – low threshold on pixel amplitudethreshold_high
(default: 250) – high threshold on pixel amplitudesigma
(default: 1.5) – width of the Gaussian for smearingsmear_radius
(default: 2) – radius in pixel for smearingpeak_radius
(default: 3) – radius in pixel for peak findingxmin
(default: 0) – minimal column numberxmax
(default: 100000) – maximal column numberymin
(default: 0) – minimal row numberymax
(default: 100000) – maximal row numberfilterIsOn
(default: true) – On/Off algorithmevent
(default: 0) – event number to save images
Remarks:
This algorithm consumes ~25 ms/event on psana0205 for full Opal1000 (1024x1024) camera image.
Image on different stages of this algorithm;
- raw image,
- image in the window with amplitudes above the
threshold_low
(few peaks were discarded by the window limits), - smeared image.