From 586abea8748ec2e74b932bb6dd23e2caad7d7a41 Mon Sep 17 00:00:00 2001 From: Darius Arnold Date: Fri, 15 Sep 2017 20:48:22 +0200 Subject: [PATCH] [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. --- pylot/core/util/widgets.py | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/pylot/core/util/widgets.py b/pylot/core/util/widgets.py index 4c1a1356..5f0201e3 100644 --- a/pylot/core/util/widgets.py +++ b/pylot/core/util/widgets.py @@ -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():