Page History
...
Any algorithm object can be created as shown below.
Code Block |
---|
import psananumpy as np from ImgAlgos.PyAlgos import PyAlgos # create object: alg = PyAlgos(windows=winds, mask=mask, pbits=0) |
...
Two threshold "Droplet finder"
two-threshold peak-finding algorithm in restricted region around pixel with maximal intensity.
peak_finder_v1
...
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.
peak_finder_v1
Code Block |
---|
peaks = alg.peak_finder_v1(nda, thr_low=10, thr_high=150, radius=5, dr=0.05) |
Parameter radius
in this algorithm is used for two purpose:
- 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.
...
Flood filling algorithm
define peaks for regions of connected pixels above threshold
...
Code Block |
---|
peaks = alg.peak_finder_v2(nda, thr=10, 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
...
Code Block |
---|
alg.set_peak_selection_pars(npix_min=5, npix_max=500, amax_thr=0, atot_thr=1000, son_min=6) |
...
Anchor | ||||
---|---|---|---|---|
|
Demonstration for local maximum map
...