Skip to content

Commit

Permalink
Default not to have a ranking threshold when clustering
Browse files Browse the repository at this point in the history
  • Loading branch information
GarethCabournDavies committed Jul 24, 2024
1 parent 9daa011 commit 4dd79d5
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions pycbc/io/hdf.py
Original file line number Diff line number Diff line change
Expand Up @@ -688,7 +688,7 @@ def and_masks(self, logic_mask):
self.mask[and_indices.astype(np.uint64)] = True

def mask_to_n_loudest_clustered_events(self, rank_method,
ranking_threshold=6,
ranking_threshold=None,
n_loudest=10,
cluster_window=10,
statistic_kwargs=None):
Expand All @@ -714,9 +714,9 @@ def mask_to_n_loudest_clustered_events(self, rank_method,
return

times = self.end_time
if ranking_threshold:
if ranking_threshold is not None:
# Threshold on sngl_ranking
# Note that we can provide None or zero to do no thresholding
# Note that we can provide None to do no thresholding
# but the default is to do some
keep = stat >= ranking_threshold
stat = stat[keep]
Expand Down Expand Up @@ -752,6 +752,7 @@ def mask_to_n_loudest_clustered_events(self, rank_method,
index.sort()
# Apply to the existing mask
self.apply_mask(index)
self.stat = stat[index]

@property
def mask_size(self):
Expand Down

0 comments on commit 4dd79d5

Please sign in to comment.