diff --git a/CHANGELOG.txt b/CHANGELOG.txt index dd1b030..348349e 100644 --- a/CHANGELOG.txt +++ b/CHANGELOG.txt @@ -13,6 +13,10 @@ master routines most internals are very likely still using hard coded "P" and "S" values, but for picking and saving to QuakeML only this reportedly works (see #36). + - also show picks in the GUI that lack location code in the corresponding + QuakeML file (but such picks will not be associated to any one of the + Stream's axes, so it will not be possible to modify or delete them via the + GUI, see #49 and #51) 0.4.1 - fix minor bug that prevents 0.4.0 from running diff --git a/obspyck/obspyck.py b/obspyck/obspyck.py index 95e38db..1d18976 100755 --- a/obspyck/obspyck.py +++ b/obspyck/obspyck.py @@ -3024,7 +3024,7 @@ def drawStreamOverview(self): # match any location code in that case.. if str(event.get("creation_info", {}).get("author", "")).startswith("scevent"): loc = None - picks = self.getPicks(network=net, station=sta, location=loc) + picks = self.getPicks(network=net, station=sta) try: arrivals = event.origins[0].arrivals except: @@ -3815,7 +3815,7 @@ def updateAllItems(self): # match any location code in that case.. if event.get("creation_info", {}).get("author", "").startswith("scevent"): loc = None - picks = self.getPicks(network=net, station=sta, location=loc) + picks = self.getPicks(network=net, station=sta) try: arrivals = event.origins[0].arrivals except: @@ -4002,7 +4002,7 @@ def getPick(self, network=None, station=None, phase_hint=None, waveform_id=None, else: return None - def getPicks(self, network, station, location): + def getPicks(self, network, station, location=None): """ returns all matching picks as list. """ @@ -4013,8 +4013,9 @@ def getPicks(self, network, station, location): continue if station != p.waveform_id.station_code: continue - if location != p.waveform_id.location_code: - continue + if location is not None: + if location != p.waveform_id.location_code: + continue ret.append(p) return ret