[closes #124] PILOT event data can be loaded now
This commit is contained in:
parent
724032b3f6
commit
7965239a92
10
QtPyLoT.py
10
QtPyLoT.py
@ -577,7 +577,13 @@ class MainWindow(QMainWindow):
|
|||||||
|
|
||||||
ycoord = gui_event.ydata
|
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
|
return statID
|
||||||
|
|
||||||
@ -724,6 +730,8 @@ class MainWindow(QMainWindow):
|
|||||||
|
|
||||||
wfID = self.getWFID(gui_event)
|
wfID = self.getWFID(gui_event)
|
||||||
|
|
||||||
|
if not wfID: return
|
||||||
|
|
||||||
station = self.getStationName(wfID)
|
station = self.getStationName(wfID)
|
||||||
self.updateStatus('picking on station {0}'.format(station))
|
self.updateStatus('picking on station {0}'.format(station))
|
||||||
data = self.getData().getWFData()
|
data = self.getData().getWFData()
|
||||||
|
@ -183,9 +183,15 @@ def picksdict_from_picks(evt):
|
|||||||
print(e)
|
print(e)
|
||||||
onsets = {}
|
onsets = {}
|
||||||
mpp = pick.time
|
mpp = pick.time
|
||||||
lpp = mpp + pick.time_errors.upper_uncertainty
|
|
||||||
epp = mpp - pick.time_errors.lower_uncertainty
|
|
||||||
spe = pick.time_errors.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['mpp'] = mpp
|
||||||
phase['epp'] = epp
|
phase['epp'] = epp
|
||||||
phase['lpp'] = lpp
|
phase['lpp'] = lpp
|
||||||
|
Loading…
Reference in New Issue
Block a user