aboutsummaryrefslogtreecommitdiff
path: root/src/find_peaks.c
diff options
context:
space:
mode:
authortlatorre <tlatorre@uchicago.edu>2019-07-16 11:18:09 -0500
committertlatorre <tlatorre@uchicago.edu>2019-07-16 11:18:09 -0500
commit4178680c74627d6490b44ae6b59b4332700d952f (patch)
tree0593579ce29eeacb20d265c7933cbdaab3f0d821 /src/find_peaks.c
parent9f63d7eae7d8be9b599955644aa4c7a92ccb640f (diff)
downloadsddm-4178680c74627d6490b44ae6b59b4332700d952f.tar.gz
sddm-4178680c74627d6490b44ae6b59b4332700d952f.tar.bz2
sddm-4178680c74627d6490b44ae6b59b4332700d952f.zip
use QLX if QHS is railed
Diffstat (limited to 'src/find_peaks.c')
-rw-r--r--src/find_peaks.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/find_peaks.c b/src/find_peaks.c
index 135e4e3..7d350d5 100644
--- a/src/find_peaks.c
+++ b/src/find_peaks.c
@@ -151,7 +151,7 @@ double get_qhs_avg(event *ev, double *pos, double *dir)
SUB(pmt_dir,pmts[i].pos,pos);
normalize(pmt_dir);
if (DOT(pmt_dir,dir) > 1/n_d2o) {
- qhs_sum += ev->pmt_hits[i].qhs;
+ qhs_sum += ev->pmt_hits[i].q;
n += 1;
}
}
@@ -190,15 +190,15 @@ void get_hough_transform(event *ev, double *pos, double *x, double *y, size_t n,
}
for (i = 0; i < MAX_PMTS; i++) {
- if (pmts[i].pmt_type != PMT_NORMAL || !ev->pmt_hits[i].hit) continue;
- qhs[i] = ev->pmt_hits[i].qhs;
+ if (ev->pmt_hits[i].flags || pmts[i].pmt_type != PMT_NORMAL || !ev->pmt_hits[i].hit) continue;
+ qhs[i] = ev->pmt_hits[i].q;
}
/* Subtract off previous rings. */
for (i = 0; i < len; i++) {
qhs_avg = get_qhs_avg(ev,pos,last+3*i);
for (j = 0; j < MAX_PMTS; j++) {
- if (pmts[j].pmt_type != PMT_NORMAL || !ev->pmt_hits[j].hit) continue;
+ if (ev->pmt_hits[i].flags || pmts[i].pmt_type != PMT_NORMAL || !ev->pmt_hits[i].hit) continue;
SUB(pmt_dir,pmts[j].pos,pos);
@@ -216,7 +216,7 @@ void get_hough_transform(event *ev, double *pos, double *x, double *y, size_t n,
for (i = 0; i < n*m; i++) result[i] = 0.0;
for (i = 0; i < MAX_PMTS; i++) {
- if (pmts[i].pmt_type != PMT_NORMAL || !ev->pmt_hits[i].hit) continue;
+ if (ev->pmt_hits[i].flags || pmts[i].pmt_type != PMT_NORMAL || !ev->pmt_hits[i].hit) continue;
SUB(pmt_dir,pmts[i].pos,pos);