Merge branch 'develop'
Conflicts: pylot/core/pick/autopick.py
This commit is contained in:
commit
bfc745dd30
8
PyLoT.py
8
PyLoT.py
@ -2454,11 +2454,13 @@ class MainWindow(QMainWindow):
|
|||||||
canvas.setZoomBorders2content()
|
canvas.setZoomBorders2content()
|
||||||
if self.tap.pylot_picks:
|
if self.tap.pylot_picks:
|
||||||
station = self.tap.get_current_station()
|
station = self.tap.get_current_station()
|
||||||
p_pick = self.tap.pylot_picks[station]['P']
|
p_pick = self.tap.pylot_picks[station].get('P')
|
||||||
s_pick = self.tap.pylot_picks[station]['S']
|
if p_pick:
|
||||||
self.tap.pickDlg.autopicks['P_tuning'] = p_pick
|
self.tap.pickDlg.autopicks['P_tuning'] = p_pick
|
||||||
self.tap.pickDlg.autopicks['S_tuning'] = s_pick
|
|
||||||
self.tap.pickDlg.drawPicks(phase='P_tuning', picktype='auto', picks=p_pick)
|
self.tap.pickDlg.drawPicks(phase='P_tuning', picktype='auto', picks=p_pick)
|
||||||
|
s_pick = self.tap.pylot_picks[station].get('S')
|
||||||
|
if s_pick:
|
||||||
|
self.tap.pickDlg.autopicks['S_tuning'] = s_pick
|
||||||
self.tap.pickDlg.drawPicks(phase='S_tuning', picktype='auto', picks=s_pick)
|
self.tap.pickDlg.drawPicks(phase='S_tuning', picktype='auto', picks=s_pick)
|
||||||
|
|
||||||
def autoPick(self):
|
def autoPick(self):
|
||||||
|
@ -8,6 +8,7 @@ function conglomerate utils.
|
|||||||
|
|
||||||
:author: MAGS2 EP3 working group / Ludger Kueperkoch
|
:author: MAGS2 EP3 working group / Ludger Kueperkoch
|
||||||
"""
|
"""
|
||||||
|
import traceback
|
||||||
|
|
||||||
import matplotlib.pyplot as plt
|
import matplotlib.pyplot as plt
|
||||||
import numpy as np
|
import numpy as np
|
||||||
@ -136,7 +137,8 @@ def call_autopickstation(input_tuple):
|
|||||||
return autopickstation(wfstream, pickparam, verbose, fig_dict=fig_dict, iplot=iplot, metadata=metadata,
|
return autopickstation(wfstream, pickparam, verbose, fig_dict=fig_dict, iplot=iplot, metadata=metadata,
|
||||||
origin=origin)
|
origin=origin)
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
return e, wfstream[0].stats.station
|
traceback.print_exc()
|
||||||
|
return traceback.format_exc(), wfstream[0].stats.station
|
||||||
|
|
||||||
|
|
||||||
def autopickstation(wfstream, pickparam, verbose=False,
|
def autopickstation(wfstream, pickparam, verbose=False,
|
||||||
@ -966,15 +968,14 @@ def autopickstation(wfstream, pickparam, verbose=False,
|
|||||||
ax1.set_ylim([-1.5, 1.5])
|
ax1.set_ylim([-1.5, 1.5])
|
||||||
ax1.set_ylabel('Normalized Counts')
|
ax1.set_ylabel('Normalized Counts')
|
||||||
# fig.suptitle(tr_filt.stats.starttime)
|
# fig.suptitle(tr_filt.stats.starttime)
|
||||||
try:
|
# only continue if one horizontal stream exists
|
||||||
len(edat[0])
|
if (ndat or edat) and Sflag == 1:
|
||||||
except:
|
# mirror components in case one does not exist
|
||||||
|
if not edat:
|
||||||
edat = ndat
|
edat = ndat
|
||||||
try:
|
if not ndat:
|
||||||
len(ndat[0])
|
|
||||||
except:
|
|
||||||
ndat = edat
|
ndat = edat
|
||||||
if len(edat[0]) > 1 and len(ndat[0]) > 1 and Sflag == 1:
|
if len(edat[0]) > 1 and len(ndat[0]) > 1:
|
||||||
# plot horizontal traces
|
# plot horizontal traces
|
||||||
ax2 = fig.add_subplot(3, 1, 2, sharex=ax1)
|
ax2 = fig.add_subplot(3, 1, 2, sharex=ax1)
|
||||||
th1data = np.arange(0,
|
th1data = np.arange(0,
|
||||||
@ -1092,11 +1093,21 @@ def autopickstation(wfstream, pickparam, verbose=False,
|
|||||||
epickP = zdat[0].stats.starttime - timeerrorsP[3]
|
epickP = zdat[0].stats.starttime - timeerrorsP[3]
|
||||||
mpickP = zdat[0].stats.starttime
|
mpickP = zdat[0].stats.starttime
|
||||||
|
|
||||||
|
# create dictionary
|
||||||
|
# for P phase
|
||||||
|
ccode = zdat[0].stats.channel
|
||||||
|
ncode = zdat[0].stats.network
|
||||||
|
ppick = dict(channel=ccode, network=ncode, lpp=lpickP, epp=epickP, mpp=mpickP, spe=Perror, snr=SNRP,
|
||||||
|
snrdb=SNRPdB, weight=Pweight, fm=FM, w0=None, fc=None, Mo=None,
|
||||||
|
Mw=None, picker=picker, marked=Pmarker)
|
||||||
|
|
||||||
if edat:
|
if edat:
|
||||||
hdat = edat[0]
|
hdat = edat[0]
|
||||||
elif ndat:
|
elif ndat:
|
||||||
hdat = ndat[0]
|
hdat = ndat[0]
|
||||||
else:
|
else:
|
||||||
|
# no horizontal components given
|
||||||
|
picks = dict(P=ppick)
|
||||||
return picks, station
|
return picks, station
|
||||||
|
|
||||||
if lpickS is not None and lpickS == mpickS:
|
if lpickS is not None and lpickS == mpickS:
|
||||||
@ -1114,13 +1125,6 @@ def autopickstation(wfstream, pickparam, verbose=False,
|
|||||||
epickS = hdat.stats.starttime - timeerrorsS[3]
|
epickS = hdat.stats.starttime - timeerrorsS[3]
|
||||||
mpickS = hdat.stats.starttime
|
mpickS = hdat.stats.starttime
|
||||||
|
|
||||||
# create dictionary
|
|
||||||
# for P phase
|
|
||||||
ccode = zdat[0].stats.channel
|
|
||||||
ncode = zdat[0].stats.network
|
|
||||||
ppick = dict(channel=ccode, network=ncode, lpp=lpickP, epp=epickP, mpp=mpickP, spe=Perror, snr=SNRP,
|
|
||||||
snrdb=SNRPdB, weight=Pweight, fm=FM, w0=None, fc=None, Mo=None,
|
|
||||||
Mw=None, picker=picker, marked=Pmarker)
|
|
||||||
# add S phase
|
# add S phase
|
||||||
ccode = hdat.stats.channel
|
ccode = hdat.stats.channel
|
||||||
ncode = hdat.stats.network
|
ncode = hdat.stats.network
|
||||||
|
Loading…
Reference in New Issue
Block a user