Page History
...
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 column numberxmax
(default: 100000) – maximal column numberymin
(default: 0) – minimal row numberymax
(default: 100000) – maximal 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
(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 matrix of weights over pixels
from -smear_radius
to +smear_radius
around each smeared pixel amplitude.
Gaussian widths The matrix of weights is defined by its sigma
valuethe 2-d Gaussian function of width sigma
.
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.)
4. Put the vector of the peaks in the event. Each entry of this vector has an object of the struct Peak
, containing x, y positions, peak pixel amplitude, and the total amplitude in the matrix, defined by the peak_radius
.
...
source
(default: "DetInfo()") – source of datakey
(default: "") – key for input image datapeaksKey
(default: "peaks") – key for output list of peaksthreshold_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 algorithmtestEvent
(default: 0) – event number to save images and print info for test purpose
Remarks:
- This algorithm consumes ~25 ms/event on psana0205 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).
Image on different stages of this algorithm:
- raw image,
- image in the window with amplitudes above the
threshold_low
(- few peaks at the edges were discarded by the window limits
- ,
- image still contains many 1-photon pixels, which need to be eliminated,
- smeared image.