Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

  • source (default: "DetInfo(:Cspad)") – source of data
  • key (default: "Image2D") – key for input image data
  • threshold (default: 10) – minimal threshold on pixel amplitude
  • numPixMin (default: 100) – minimal number of pixels with amplitude above the threshold
  • filterIsOn (default: true) – On/Off the filter
  • xmin (default: 0) – minimal column number
  • xmax (default: 100000) – maximal column number
  • ymin (default: 0) – minimal row number
  • ymax (default: 100000) – maximal row number
    Remarks:
  • The default key ("Image2D") stands for the CSPadPixCoords::Image2D<double> image object. Other key names work for the ndarray<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 data
  • key (default: "") – key for input image data
  • peaksKey (default: "peaks") – key for output list of peaks
  • threshold_low (default: 150) – low threshold on pixel amplitude
  • threshold_high (default: 250) – high threshold on pixel amplitude
  • sigma (default: 1.5) – width of the Gaussian for smearing
  • smear_radius (default: 2) – radius in pixel for smearing
  • peak_radius (default: 3) – radius in pixel for peak finding
  • xmin (default: 0) – minimal column number
  • xmax (default: 100000) – maximal column number
  • ymin (default: 0) – minimal row number
  • ymax (default: 100000) – maximal row number
  • filterIsOn (default: true) – On/Off algorithm
  • event 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:

...