|
lcls2
C++ API: public headers of xtcdata, psalg, psdaq and psana
|
Declares the peakfinder8 peak finder (from OM/Cheetah), its tPeakList result structure and the allocate/free helpers. More...
Classes | |
| struct | tPeakList |
Functions | |
| void | allocatePeakList (tPeakList *peak, long NpeaksMax) |
| Zero the counters and summary fields of *peak, set nPeaks_max to NpeaksMax, calloc the 13 per-peak arrays with NpeaksMax elements each, and set memoryAllocated to 1. | |
| void | freePeakList (tPeakList peak) |
| Free the 13 per-peak arrays of peak. | |
| int | peakfinder8 (tPeakList *peaklist, float *data, char *mask, float *pix_r, long asic_nx, long asic_ny, long nasics_x, long nasics_y, float ADCthresh, float hitfinderMinSNR, long hitfinderMinPixCount, long hitfinderMaxPixCount, long hitfinderLocalBGRadius, char *outliersMask) |
| Find peaks in data (nasics_y x nasics_x ASICs of asic_ny x asic_nx pixels) using mask, the per-pixel radius pix_r and the thresholds and limits passed in; the work is done by static helpers in peakfinder8.cc (radial statistics over 5 iterations, then a search per ASIC). | |
Declares the peakfinder8 peak finder (from OM/Cheetah), its tPeakList result structure and the allocate/free helpers.
| void allocatePeakList | ( | tPeakList * | peak, |
| long | NpeaksMax | ||
| ) |
Zero the counters and summary fields of *peak, set nPeaks_max to NpeaksMax, calloc the 13 per-peak arrays with NpeaksMax elements each, and set memoryAllocated to 1.
Allocation failures are not checked.
| void freePeakList | ( | tPeakList | peak | ) |
Free the 13 per-peak arrays of peak.
peak is passed by value, so setting memoryAllocated to 0 does not change the caller's struct.
| int peakfinder8 | ( | tPeakList * | peaklist, |
| float * | data, | ||
| char * | mask, | ||
| float * | pix_r, | ||
| long | asic_nx, | ||
| long | asic_ny, | ||
| long | nasics_x, | ||
| long | nasics_y, | ||
| float | ADCthresh, | ||
| float | hitfinderMinSNR, | ||
| long | hitfinderMinPixCount, | ||
| long | hitfinderMaxPixCount, | ||
| long | hitfinderLocalBGRadius, | ||
| char * | outliersMask | ||
| ) |
Find peaks in data (nasics_y x nasics_x ASICs of asic_ny x asic_nx pixels) using mask, the per-pixel radius pix_r and the thresholds and limits passed in; the work is done by static helpers in peakfinder8.cc (radial statistics over 5 iterations, then a search per ASIC).
Copies at most peaklist->nPeaks_max peaks into peaklist and sets nPeaks; if outliersMask is not null, the internal map of pixels in peaks is copied into it.