Skip to content

Commit

Permalink
minor fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
GarethCabournDavies committed Jun 28, 2024
1 parent 67ad84b commit 33678e4
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions pycbc/events/stat.py
Original file line number Diff line number Diff line change
Expand Up @@ -675,9 +675,9 @@ def logsignalrate(self, stats, shift, to_shift):

# These weren't in our histogram so give them max penalty
# instead of random value
missed = numpy.where(self.param_bin[ref_ifo][loc] != nbinned)[
0
]
missed = numpy.where(
self.param_bin[ref_ifo][loc] != nbinned
)[0]
rate[rtype[missed]] = self.max_penalty
# Scale by signal population SNR
rate[rtype] *= (sref[rtype] / self.ref_snr) ** -4.0
Expand Down Expand Up @@ -760,8 +760,10 @@ def coinc_lim_for_thresh(
if not self.has_hist:
self.get_hist()

fixed_statsq = sum([b['snglstat'] ** 2 for a, b in sngls_list])
s1 = thresh ** 2. - fixed_statsq
fixed_stat_sq = sum(
[b["snglstat"] ** 2 for a, b in sngls_list if a != limifo]
)
s1 = thresh ** 2. - fixed_stat_sq
# Assume best case scenario and use maximum signal rate
s1 -= 2.0 * self.hist_max
s1[s1 < 0] = 0
Expand Down

0 comments on commit 33678e4

Please sign in to comment.