From b232a2a1945361fa6b45dc850ce058dfe494b2dc Mon Sep 17 00:00:00 2001 From: Darius Arnold Date: Sat, 26 Aug 2017 01:10:17 +0200 Subject: [PATCH] [bugfix] check4rotated unable to access metadata in TuneAutopicker --- pylot/core/util/utils.py | 2 +- pylot/core/util/widgets.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/pylot/core/util/utils.py b/pylot/core/util/utils.py index 646a81da..46a66eda 100644 --- a/pylot/core/util/utils.py +++ b/pylot/core/util/utils.py @@ -760,7 +760,7 @@ def check4rotated(data, metadata=None): z, n, e = rotate2zne(wfstream[0], azimuts[0], dips[0], wfstream[1], azimuts[1], dips[1], wfstream[2], azimuts[2], dips[2]) - print('checkrotated: rotated station {} to ZNE'.format(trace_id)) + print('check4rotated: rotated station {} to ZNE'.format(trace_id)) z_index = dips.index(min(dips)) # get z-trace index (dip is measured from 0 to -90 wfstream[z_index].data = z wfstream[z_index].stats.channel = wfstream[z_index].stats.channel[0:-1] + 'Z' diff --git a/pylot/core/util/widgets.py b/pylot/core/util/widgets.py index 98ea3af0..6050a271 100644 --- a/pylot/core/util/widgets.py +++ b/pylot/core/util/widgets.py @@ -2243,7 +2243,7 @@ class TuneAutopicker(QWidget): # trim station components to same start value trim_station_components(wfdat, trim_start=True, trim_end=False) # rotate misaligned stations to ZNE - wfdat = check4rotated(wfdat, self.metadata) + wfdat = check4rotated(wfdat, self.parent.metadata) self.stationBox.clear() stations = [] for trace in self.data.getWFData():