Skip to content

Commit

Permalink
Merge pull request #192 from mdenolle/yiyu/channel_filter
Browse files Browse the repository at this point in the history
Allow all station filter
  • Loading branch information
niyiyu authored Sep 9, 2023
2 parents f8e0d42 + 913054a commit 6bda8da
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/noisepy/seis/scedc_s3store.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,10 @@ def channel_filter(stations: List[str], ch_prefixes: str) -> Callable[[Channel],
sta_set = set(stations)

def filter(ch: Channel) -> bool:
return ch.station.name in sta_set and ch.type.name.lower().startswith(tuple(ch_prefixes.lower().split(",")))
if sta_set == {"*"}:
return ch.type.name.lower().startswith(tuple(ch_prefixes.lower().split(",")))
else:
return ch.station.name in sta_set and ch.type.name.lower().startswith(tuple(ch_prefixes.lower().split(",")))

return filter

Expand Down

0 comments on commit 6bda8da

Please sign in to comment.