From dfc9de69de483f864b2a5775d8cb0cd06554354f Mon Sep 17 00:00:00 2001 From: Marcel Date: Wed, 3 Apr 2019 15:00:08 +0200 Subject: [PATCH] [bugfix] small workaround, will still cause error in case Z-component ist tilted by more than 5deg before: wfdat[0] was using HHE component of previously rotated stream, which could not be found in metadata (dataless fname still HH2) --- pylot/core/pick/autopick.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pylot/core/pick/autopick.py b/pylot/core/pick/autopick.py index d4c72ecc..c88a7b01 100644 --- a/pylot/core/pick/autopick.py +++ b/pylot/core/pick/autopick.py @@ -251,6 +251,7 @@ def autopickstation(wfstream, pickparam, verbose=False, Ao = None # Wood-Anderson peak-to-peak amplitude picker = 'auto' # type of picks + # TODO: REMOVE HARDCODED CHANNEL MAPPING # split components zdat = wfstream.select(component="Z") if len(zdat) == 0: # check for other components @@ -298,7 +299,7 @@ def autopickstation(wfstream, pickparam, verbose=False, if not metadata: print('Warning: Could not use TauPy to estimate onsets as there are no metadata given.') else: - station_id = wfstream[0].get_id() + station_id = zdat[0].get_id() station_coords = metadata.get_coordinates(station_id, time=wfstream[0].stats.starttime) if station_coords and origin: source_origin = origin[0]