Cosmetics

This commit is contained in:
Ludger Küperkoch 2017-08-11 15:02:47 +02:00
parent 571b90e5b7
commit fe2957f76d
2 changed files with 15 additions and 19 deletions

View File

@ -73,7 +73,7 @@ from pylot.core.util.errors import FormatError, DatastructureError, \
from pylot.core.util.connection import checkurl
from pylot.core.util.dataprocessing import read_metadata, restitute_data
from pylot.core.util.utils import fnConstructor, getLogin, \
full_range, readFilterInformation, trim_station_components, check4gaps
full_range, readFilterInformation
from pylot.core.util.event import Event
from pylot.core.io.location import create_creation_info, create_event
from pylot.core.util.widgets import FilterOptionsDialog, NewEventDlg, \
@ -1365,10 +1365,6 @@ class MainWindow(QMainWindow):
# ans = False
self.fnames = self.getWFFnames_from_eventbox()
self.data.setWFData(self.fnames)
wfdat = self.data.getWFData() # all available streams
check4gaps(wfdat)
# trim station components to same start value
trim_station_components(wfdat, trim_start=True, trim_end=False)
self._stime = full_range(self.get_data().getWFData())[0]
def connectWFplotEvents(self):
@ -1798,18 +1794,18 @@ class MainWindow(QMainWindow):
fig = Figure()
self.fig_dict[key] = fig
#if not self.tap:
# init TuneAutopicker object
self.tap = TuneAutopicker(self)
# first call of update to init tabs with empty canvas
self.update_autopicker()
# connect update signal of TuneAutopicker with update function
# creating and filling figure canvas
self.tap.update.connect(self.update_autopicker)
self.tap.figure_tabs.setCurrentIndex(0)
#else:
# self.update_autopicker()
# self.tap.fill_eventbox()
if not self.tap:
# init TuneAutopicker object
self.tap = TuneAutopicker(self)
# first call of update to init tabs with empty canvas
self.update_autopicker()
# connect update signal of TuneAutopicker with update function
# creating and filling figure canvas
self.tap.update.connect(self.update_autopicker)
self.tap.figure_tabs.setCurrentIndex(0)
else:
self.update_autopicker()
self.tap.fill_eventbox()
self.tap.show()
def update_autopicker(self):

View File

@ -205,6 +205,8 @@ def picksdict_from_picks(evt):
station = pick.waveform_id.station_code
channel = pick.waveform_id.channel_code
network = pick.waveform_id.network_code
mpp = pick.time
spe = pick.time_errors.uncertainty
try:
picker = str(pick.method_id)
if picker.startswith('smi:local/'):
@ -216,8 +218,6 @@ def picksdict_from_picks(evt):
except KeyError as e:
# print(e)
onsets = {}
mpp = pick.time
spe = pick.time_errors.uncertainty
try:
lpp = mpp + pick.time_errors.upper_uncertainty
epp = mpp - pick.time_errors.lower_uncertainty