Content
Data
exp=cxif5315:run=169
Use of peak finders
See for detail
- Hit/Peak Finding Details - description of algorithms
- ImgAlgos.PyAlgos - interface methods
- PSAS-147 - details about revision 1
We work with peak finder versions v2r1, v3r1, v4r1.
Data processing and peak finding is done in cxif5315/proc-cxif5315-r0169-data-pfvn-2016-04-19.py
Peak selection parameters
- selection parameters were set with as minimal number of parameters as possible.
- selection parameters of different peak finders were adjusted to get about the same yield of peaks in the file.
from ImgAlgos.PyAlgos import PyAlgos alg_arc = PyAlgos(windows=winds_arc, mask=mask_arc, pbits=2) #alg_arc.set_peak_selection_pars(npix_min=0, npix_max=1e6, amax_thr=0, atot_thr=500, son_min=6) # for pfv2r1 alg_arc.set_peak_selection_pars(npix_min=0, npix_max=1e6, amax_thr=0, atot_thr=0, son_min=6) # for pfv3r1, pfv4r1 alg_equ = ... # the same # in the event loop: # run peakfinders and get list of peak records for each region #peaks_arc = alg_arc.peak_finder_v2r1(nda, thr=30, r0=6, dr=0.5) peaks_arc = alg_arc.peak_finder_v3r1(nda, rank=5, r0=6, dr=0.5) #peaks_arc = alg_arc.peak_finder_v4r1(nda, thr_low=10, thr_high=150, rank=5, r0=6, dr=0.5) #peaks_equ = alg_equ.peak_finder_v2r1(...) # The same
Raw n-d array pre-processing before peak-finders
- get raw data
- subtract pedestals
- subtract radial background to polarization corrected data
- apply status mask
from pyimgalgos.RadialBkgd import RadialBkgd, polarization_factor nda_smask = det.mask(runnum, calib=False, status=True, edges=True, central=True, unbond=True, unbondnbrs=True) mask_bkgd = nda_smask # * mask_winds_tot rb = RadialBkgd(Xarr, Yarr, mask=mask_bkgd, radedges=(5200, 80000), nradbins=200, nphibins=1) pf = polarization_factor(rb.pixel_rad(), rb.pixel_phi(), DIST_STOD) # in the event loop: nda_data = det.raw(evt) if nda_data is not None : nda = np.array(nda_data, dtype=np.float32, copy=True) nda -= nda_peds #det.common_mode_apply(evt, nda, cmpars=(1,50,50,100)) #nda = subtract_bkgd(nda, nda_bkgd, mask=nda_smask, winds=winds_bkgd, pbits=0) nda = rb.subtract_bkgd(nda.flatten() * pf) nda.shape = shape_cspad nda *= nda_smask
Common mode correction was tested before and after background subtraction.
For unknown reason it makes image visually worse...
Peak list
For each peak finder we created list of peak parameters, beginning as
Peak list processing
For peak list processing we use script:
cxif5315/proc-cxif5315-r0169-peaks-from-file-v6.py
References
- Hit/Peak Finding Details - description of algorithms
- ImgAlgos.PyAlgos - interface methods
- PSAS-147 - details about revision 1
- Radial Background Subtraction Algorithm
Overview
Content Tools