Skip to content

Commit

Permalink
Always get new catalog from detections #598
Browse files Browse the repository at this point in the history
  • Loading branch information
calum-chamberlain authored Dec 15, 2024
1 parent 8e40eac commit 2d2d917
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions eqcorrscan/core/match_filter/family.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,16 +45,13 @@ def __init__(self, template, detections=None, catalog=None):
if isinstance(detections, Detection):
detections = [detections]
self.detections = detections or []
self.__catalog = get_catalog(self.detections)
if catalog:
Logger.warning("Setting catalog directly is no-longer supported, "
"now generated from detections.")

@property
def catalog(self):
if len(self.__catalog) != len(self.detections):
self.__catalog = get_catalog(self.detections)
return self.__catalog
return get_catalog(self.detections)

Check warning on line 54 in eqcorrscan/core/match_filter/family.py

View check run for this annotation

Codecov / codecov/patch

eqcorrscan/core/match_filter/family.py#L54

Added line #L54 was not covered by tests

@catalog.setter
def catalog(self, catalog):
Expand Down

0 comments on commit 2d2d917

Please sign in to comment.