[bugfix] same treatment of waveform data in tune autopicker and load waveform

fixes #217. While generating the station list for the tune autopicker dialog, waveform data was loaded and some traces were removed (gaps, doubled, rotated). However, not all the functions were called on wfdat, so some stations would be unavailable in the general waveform overview for the event, but could be selected in the tune autopicker.
This commit is contained in:
Darius Arnold 2017-09-15 20:48:22 +02:00
parent 2ee3c9a304
commit 586abea874

View File

@ -48,7 +48,8 @@ from pylot.core.pick.compare import Comparison
from pylot.core.util.defaults import OUTPUTFORMATS, FILTERDEFAULTS, \
SetChannelComponents
from pylot.core.util.utils import prepTimeAxis, full_range, scaleWFData, \
demeanTrace, isSorted, findComboBoxIndex, clims, pick_linestyle_plt, pick_color_plt
demeanTrace, isSorted, findComboBoxIndex, clims, pick_linestyle_plt, pick_color_plt, \
check4rotated, check4doubled, check4gaps, remove_underscores
from autoPyLoT import autoPyLoT
from pylot.core.util.thread import Thread
@ -2509,10 +2510,15 @@ class TuneAutopicker(QWidget):
fnames = self.parent().getWFFnames_from_eventbox(eventbox=self.eventBox)
self.data.setWFData(fnames)
wfdat = self.data.getWFData() # all available streams
# remove possible underscores in station names
wfdat = remove_underscores(wfdat)
# rotate misaligned stations to ZNE
# check for gaps and doubled channels
check4gaps(wfdat)
check4doubled(wfdat)
wfdat = check4rotated(wfdat, self.parent().metadata, verbosity=0)
# 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.parent().metadata, verbosity=0)
self.stationBox.clear()
stations = []
for trace in self.data.getWFData():