Skip to content

Commit

Permalink
check geographic filters if no filter criteria are specified
Browse files Browse the repository at this point in the history
  • Loading branch information
megies committed Jan 24, 2020
1 parent 5b8c329 commit 8dcd747
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
5 changes: 3 additions & 2 deletions obspy/core/inventory/network.py
Expand Up @@ -444,8 +444,9 @@ def select(self, station=None, location=None, channel=None, time=None,
minlongitude=minlongitude, maxlongitude=maxlongitude,
latitude=latitude, longitude=longitude, minradius=minradius,
maxradius=maxradius)
if not inside_geobounds(sta, **geo_filters):
continue
if any(value is not None for value in geo_filters.values()):
if not inside_geobounds(sta, **geo_filters):
continue

has_channels = bool(sta.channels)

Expand Down
5 changes: 3 additions & 2 deletions obspy/core/inventory/station.py
Expand Up @@ -431,8 +431,9 @@ def select(self, location=None, channel=None, time=None, starttime=None,
minlongitude=minlongitude, maxlongitude=maxlongitude,
latitude=latitude, longitude=longitude, minradius=minradius,
maxradius=maxradius)
if not inside_geobounds(cha, **geo_filters):
continue
if any(value is not None for value in geo_filters.values()):
if not inside_geobounds(cha, **geo_filters):
continue

channels.append(cha)
sta = copy.copy(self)
Expand Down

0 comments on commit 8dcd747

Please sign in to comment.