more consistent whitespace/aligment
This commit is contained in:
@ -38,20 +38,37 @@ cdef extern from "peakfinders.h":
|
||||
|
||||
cdef extern from "peakfinder8.hh":
|
||||
|
||||
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)
|
||||
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
|
||||
)
|
||||
|
||||
def peakfinder_8(int max_num_peaks,
|
||||
def peakfinder_8(
|
||||
int max_num_peaks,
|
||||
numpy.ndarray[numpy.float32_t, ndim=2, mode="c"] data,
|
||||
numpy.ndarray[numpy.int8_t, ndim=2, mode="c"] mask,
|
||||
numpy.ndarray[numpy.float32_t, ndim=2, mode="c"] pix_r,
|
||||
long asic_nx, long asic_ny,
|
||||
long nasics_x, long nasics_y, float adc_thresh, float hitfinder_min_snr,
|
||||
long hitfinder_min_pix_count, long hitfinder_max_pix_count,
|
||||
long hitfinder_local_bg_radius):
|
||||
long asic_nx,
|
||||
long asic_ny,
|
||||
long nasics_x,
|
||||
long nasics_y,
|
||||
float adc_thresh,
|
||||
float hitfinder_min_snr,
|
||||
long hitfinder_min_pix_count,
|
||||
long hitfinder_max_pix_count,
|
||||
long hitfinder_local_bg_radius
|
||||
):
|
||||
|
||||
cdef numpy.int8_t *mask_pointer = &mask[0,0]
|
||||
cdef char *mask_char_pointer = <char*> mask_pointer
|
||||
@ -59,10 +76,21 @@ def peakfinder_8(int max_num_peaks,
|
||||
cdef tPeakList peak_list
|
||||
allocatePeakList(&peak_list, max_num_peaks)
|
||||
|
||||
peakfinder8(&peak_list, &data[0,0], mask_char_pointer, &pix_r[0,0],
|
||||
asic_nx, asic_ny, nasics_x, nasics_y,
|
||||
adc_thresh, hitfinder_min_snr, hitfinder_min_pix_count,
|
||||
hitfinder_max_pix_count, hitfinder_local_bg_radius)
|
||||
peakfinder8(
|
||||
&peak_list,
|
||||
&data[0,0],
|
||||
mask_char_pointer,
|
||||
&pix_r[0,0],
|
||||
asic_nx,
|
||||
asic_ny,
|
||||
nasics_x,
|
||||
nasics_y,
|
||||
adc_thresh,
|
||||
hitfinder_min_snr,
|
||||
hitfinder_min_pix_count,
|
||||
hitfinder_max_pix_count,
|
||||
hitfinder_local_bg_radius
|
||||
)
|
||||
|
||||
cdef int i
|
||||
cdef float peak_x, peak_y, peak_value
|
||||
|
@ -45,6 +45,7 @@ void allocatePeakList(tPeakList *peak, long NpeaksMax) {
|
||||
peak->memoryAllocated = 1;
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* Clean up Bragg peak arrays
|
||||
*/
|
||||
@ -66,8 +67,6 @@ void freePeakList(tPeakList peak) {
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
/*
|
||||
* Peakfinder 8
|
||||
* Version before modifications during Cherezov December 2014 LE80
|
||||
@ -474,7 +473,6 @@ int peakfinder8(tPeakList *peaklist, float *data, char *mask, float *pix_r, long
|
||||
com_e = lrint(com_x) + lrint(com_y)*pix_nx;
|
||||
|
||||
|
||||
|
||||
/*
|
||||
* Calculate signal-to-noise and apply SNR criteria
|
||||
*/
|
||||
@ -559,8 +557,7 @@ int peakfinder8(tPeakList *peaklist, float *data, char *mask, float *pix_r, long
|
||||
peaklist->nPeaks = peakCounter;
|
||||
return(peaklist->nPeaks);
|
||||
/*************************************************/
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user