Skip to content

Commit

Permalink
feat: add option to keep or remove uncertainties when reading catalog
Browse files Browse the repository at this point in the history
  • Loading branch information
schmidni committed Aug 16, 2023
1 parent 6f1c79e commit f7b4c3c
Showing 1 changed file with 8 additions and 5 deletions.
13 changes: 8 additions & 5 deletions catalog_tools/io/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -85,9 +85,12 @@ def get_events(self, start_time: Optional[datetime] = None,
parser.parse(r.raw)

df = Catalog.from_dict(catalog)
# if not include_uncertainty:
# wrong way round
# rgx = "(_uncertainty|_lowerUncertainty|" \
# "_upperUncertainty|_confidenceLevel)$"
# df = df.filter(regex=rgx)

if not include_uncertainty:
rgx = "(_uncertainty|_lowerUncertainty|" \
"_upperUncertainty|_confidenceLevel)$"
# df = df.filter(regex=rgx)
cols = df.filter(regex=rgx).columns
df = df.drop(columns=cols)

return df

0 comments on commit f7b4c3c

Please sign in to comment.