[bugfix] check4rotated unable to access metadata in TuneAutopicker

This commit is contained in:
Darius Arnold 2017-08-26 01:10:17 +02:00 committed by Marcel
parent 5648fc1870
commit b232a2a194
2 changed files with 2 additions and 2 deletions

View File

@ -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'

View File

@ -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():