[closes #124] PILOT event data can be loaded now

This commit is contained in:
Sebastian Wehling-Benatelli 2016-05-31 15:53:23 +02:00
parent 724032b3f6
commit 7965239a92
2 changed files with 17 additions and 3 deletions

View File

@ -577,7 +577,13 @@ class MainWindow(QMainWindow):
ycoord = gui_event.ydata
statID = int(round(ycoord))
try:
statID = int(round(ycoord))
except TypeError as e:
if 'a float is required' in e.message:
return None
else:
raise e
return statID
@ -724,6 +730,8 @@ class MainWindow(QMainWindow):
wfID = self.getWFID(gui_event)
if not wfID: return
station = self.getStationName(wfID)
self.updateStatus('picking on station {0}'.format(station))
data = self.getData().getWFData()

View File

@ -183,9 +183,15 @@ def picksdict_from_picks(evt):
print(e)
onsets = {}
mpp = pick.time
lpp = mpp + pick.time_errors.upper_uncertainty
epp = mpp - pick.time_errors.lower_uncertainty
spe = pick.time_errors.uncertainty
try:
lpp = mpp + pick.time_errors.upper_uncertainty
epp = mpp - pick.time_errors.lower_uncertainty
except TypeError as e:
msg = e.message + ',\n falling back to symmetric uncertainties'
warnings.warn(msg)
lpp = mpp + spe
epp = mpp - spe
phase['mpp'] = mpp
phase['epp'] = epp
phase['lpp'] = lpp