Page History
...
two-threshold peak-finding algorithm in restricted region around pixel with maximal intensity. Two threshold allows to speed-up this algorithms. It is assumed that only pixels with intensity above thr_high
are pretending to be peak candidate centers. Candidates are considered as a peak if their intensity is maximal in the (square) region of radius
around them. Low threshold in the same region is used to account for contributing to peak pixels.
Anchor | ||||
---|---|---|---|---|
|
Code Block |
---|
peaks = alg.peak_finder_v1(nda, thr_low=10, thr_high=150, radius=5, dr=0.05) |
...
- defines (square) region to search for local maximum with intensity above
thr_high
and contributing pixels with intensity abovethr_lo,
- is used as a
r0
parameter to evaluate background and noise rms as explained in section below.
...
define peaks for regions of connected pixels above threshold
Anchor | ||
---|---|---|
|
...
|
...
|
...
v4
Code Block |
---|
peaks = alg.peak_finder_v2v4(nda, thr_low=10, thr_high=150, rank=2, r0=5, dr=0.05) |
Two neighbor pixels are assumed connected if have common side. Pixels with intensity above threshold thr
are considered only.
Local maximums search algorithm
define peaks in local maximums of specified rank (radius), for example rank=2 means 5x5 pixel region around central pixel.
...
The same algorithm as peak_finder_v1
, but parameter radius
is split for two rank
and r0
with the same meaning as in peak_finder_v3
.
Flood filling algorithm
define peaks for regions of connected pixels above threshold
Anchor | ||||
---|---|---|---|---|
|
...
...
v2
Code Block |
---|
peaks = alg.peak_finder_v3v2(nda, rankthr=210, r0=5, dr=0.05) |
Two neighbor pixels are assumed connected if have common side. Pixels with intensity above threshold thr
are considered only.
Local maximums search algorithm
define peaks in local maximums of specified rank (radius), for example rank=2 means 5x5 pixel region around central pixel.
Anchor | ||||
---|---|---|---|---|
|
Code Block |
---|
peaks = alg.peak_finder_v3(nda, rank=2, r0=5, dr=0.05) |
- makes makes a map of pixels with local maximums of requested rank for data ndarray and mask, pixel code in the map may have bits 0/1/2/4 standing for not-a-maximum / maximum-in-row / maximum-in-column / maximum-in-rectangular-region of radius=rank.
- for each pixel with local maximal intensity in the region defined by the rank radius counts a number of pixels with intensity above zero, total positive intensity, center of gravity coordinates and rms,
- using parameters
r0(ex.=5.0), dr(ex.=0.05)
evaluates background level, rms of noise, and S/N for the pixel with maximal intensity. - makes list of peaks which pass selector with parameters set in
set_peak_selection_pars
, for example
Code Block |
---|
alg.set_peak_selection_pars(npix_min=5, npix_max=500, amax_thr=0, atot_thr=1000, son_min=6) |
...
- example
Code Block |
---|
peaks = alg.set_peak_finderselection_v4(nda, thr_low=10, thr_high=150, rank=2, r0=5, dr=0.05)pars(npix_min=5, npix_max=500, amax_thr=0, atot_thr=1000, son_min=6) |
The same algorithm as peak_finder_v1
, but parameter radius
is split for two rank
and r0
with the same meaning as in previous algoriths.
Anchor | ||||
---|---|---|---|---|
|
...