Versions Compared

Key

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

...

Test of the NDArrCalib module for pnCCD.

 

Module ImgAlgos::NDArrDropletFinder

Finds "droplets" (wide peaks) in data ndarray and saves their list in output ndarray. This is a re-implementation of algorithm ImgPeakFinder for ndarray 2-d segments:
1. Select the pixels in the windows rowminrowmax, colmincolmax
with amplitudes above the threshold_low.
2. Optionally smears 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. If sigma=0 smearing is not applied.
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:

Anchor
Struct Droplet
Struct Droplet

Code Block
bgColor#F7F7ED
  struct Droplet{
    unsigned seg;
    double   row;
    double   col; 
    double   ampmax;  // amplitude in the peak maximum
    double   amptot;  // total amplitude in the range of {{peak_radius}}
    unsigned npix;    // number of pixels in the range of {{peak_radius}}
  };

parameter

default value

description

source

"DetInfo()"

source of data

key

 

key for input data ndarray, default is empty - raw data

keydroplets

 

key for output list of peaks as std::vector<Peak> (default is empty - do not save)

threshold_low

10

low threshold on pixel amplitude

threshold_high

100

high threshold on pixel amplitude

sigma

1.5

width of the Gaussian for smearing; =0-no smearing

smear_radius

3

radius in pixel for smearing - radial size of matrix of weights

peak_radius

3

radius in pixel for peak finding - radial size of the region to search for local maximum

windows

 

list of windows, each window is defined by 5 parameters; segment-index, rowmin, rowmax,colmin,colmax, separated by space. Default is empty - process all segments

testEvent

0

event number for test purpose

print_bits

0

module verbosity:

  • =0 - print nothing,
  • +1 - input pars in the beginJob(...),
  • +2 - summary in the endJob(...),
  • +4 - number of droplets/peaks in the event,
  • +8 - array of peak parameters in the event,
  • +64 - info messages from smearing and droplet finding algorithms, 
  • +128 - debugging messages from smearing and droplet finding algorithms,
  • +256 - details for debugging; messages from windows parser, window parameters accounting for segment limits,
  • != 0  - all warning messages

Remarks:

  • if print_bits is not zero - warning messages will be printed.
  • Saves table of droplets/peaks as  ndarray<float,2> with shape=[ndroplets,6]  (see Struct Droplet) if key peaks_droplets is non-empty.

See also Example for Module ImgAlgos::NDArrDropletFinder

 

Module ImgAlgos::PixCoordsProducer

Functionality

...