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 Select the pixels in the window xmin
, xmax
, ymin
, ymax
with amplitudes above the threshold_low
.
2. smear 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 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.)-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
.
Code Block |
---|
struct Peak{
double x;
double y;
double ampmax
double amptot;
// ? double s1;
// ? double s2;
// ? double tilt_angle;
} ;
|
Module configuration parameters:
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 algorithmevent
testEvent
(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).
Image on different stages of this algorithm:
...