Peak-finders

A set of peak-finding algorithms developed for analysis of data from LCLS pixel array detectors.

Interface

from ... import imagealgos

peaks = imagealgos.peaks_adapt_thr(data, mask, rank, nsigm, base_r, base_dr, do_base_sub=False, npix_min=None, npix_max=None, thr_atot=None, son_min=None)
peaks = imagealgos.peaks_two_thr(data, mask, rank, thr_low, thr_high, base_r, base_dr, do_base_sub=False, npix_min=None, npix_max=None, thr_atot=None, son_min=None)

Input

arguments:

data :

mask : numpy.array (dtype=np.uint16) | None - array should have the same structure as data or None if non-applicable - pixel mask with 0/1 for bad/good pixel

rank : int -  radial size of the pixel region (2*rank+1 rows and columns) around central pixel

thr_low : float low threshold on pixel intensity

thr_high : float - high threshold on pixel intensity

nsigm : float - threshold in number of noise rms

base_r : float - internal radius of the ring for evaluation of base level mean and rms (noise)

base_dr : float - width of the ring for evaluation of base level mean and rms (noise)

 

keyword arguments :  

do_base_sub : bool - enable subtraction of local base level from signal

npix_min : int - minimum number of pixels in the peak  

npix_max : intmaximum number of pixels in the peak 

thr_atot : float - threshold on total peak intensity  

son_min : float - threshold on signal over noise (S/N) value

Output

peaks : dict -  dictionary of arrays/lists - most natural order to work with a single value for many peaks

dict keywords:

Peak-finding algorithms

Each peak-finding algorithm works in a few stages. First stage is a search for peak candidates or "seed" peaks and this is a most distinctive part between algorithms:

Other stages of all peak-finding algorithms are about the same.

References