Merge branch 'develop' of ariadne.geophysik.ruhr-uni-bochum.de:/data/git/pylot into develop
This commit is contained in:
commit
ae21c9a149
@ -84,6 +84,7 @@ def autoPyLoT(inputfile):
|
|||||||
ttpat = parameter.getParam('ttpatter')
|
ttpat = parameter.getParam('ttpatter')
|
||||||
# pattern of NLLoc-output file
|
# pattern of NLLoc-output file
|
||||||
nllocoutpatter = parameter.getParam('outpatter')
|
nllocoutpatter = parameter.getParam('outpatter')
|
||||||
|
maxnumit = 3 # maximum number of iterations for re-picking
|
||||||
else:
|
else:
|
||||||
locflag = 0
|
locflag = 0
|
||||||
print (" !!! ")
|
print (" !!! ")
|
||||||
@ -133,7 +134,6 @@ def autoPyLoT(inputfile):
|
|||||||
else:
|
else:
|
||||||
# get theoretical P-onset times from NLLoc-location file
|
# get theoretical P-onset times from NLLoc-location file
|
||||||
locsearch = '%s/loc/%s.????????.??????.grid?.loc.hyp' % (nllocroot, nllocout)
|
locsearch = '%s/loc/%s.????????.??????.grid?.loc.hyp' % (nllocroot, nllocout)
|
||||||
maxnumit = 3 # maximum number of iterations
|
|
||||||
if len(glob.glob(locsearch)) > 0:
|
if len(glob.glob(locsearch)) > 0:
|
||||||
# get latest file if several are available
|
# get latest file if several are available
|
||||||
nllocfile = max(glob.glob(locsearch), key=os.path.getctime)
|
nllocfile = max(glob.glob(locsearch), key=os.path.getctime)
|
||||||
@ -213,8 +213,6 @@ def autoPyLoT(inputfile):
|
|||||||
else:
|
else:
|
||||||
# get theoretical P-onset times from NLLoc-location file
|
# get theoretical P-onset times from NLLoc-location file
|
||||||
locsearch = '%s/loc/%s.????????.??????.grid?.loc.hyp' % (nllocroot, nllocout)
|
locsearch = '%s/loc/%s.????????.??????.grid?.loc.hyp' % (nllocroot, nllocout)
|
||||||
nllocfile = max(glob.glob(locsearch), key=os.path.getctime)
|
|
||||||
maxnumit = 3 # maximum number of iterations
|
|
||||||
if len(glob.glob(locsearch)) > 0:
|
if len(glob.glob(locsearch)) > 0:
|
||||||
# get latest file if several are available
|
# get latest file if several are available
|
||||||
nllocfile = max(glob.glob(locsearch), key=os.path.getctime)
|
nllocfile = max(glob.glob(locsearch), key=os.path.getctime)
|
||||||
|
@ -7,7 +7,7 @@
|
|||||||
/DATA/Insheim #rootpath# %project path
|
/DATA/Insheim #rootpath# %project path
|
||||||
EVENT_DATA/LOCAL #datapath# %data path
|
EVENT_DATA/LOCAL #datapath# %data path
|
||||||
2015.10_Insheim #database# %name of data base
|
2015.10_Insheim #database# %name of data base
|
||||||
e0011.280.15 #eventID# %event ID for single event processing
|
#eventID# %event ID for single event processing
|
||||||
/DATA/Insheim/STAT_INFO #invdir# %full path to inventory or dataless-seed file
|
/DATA/Insheim/STAT_INFO #invdir# %full path to inventory or dataless-seed file
|
||||||
PILOT #datastructure#%choose data structure
|
PILOT #datastructure#%choose data structure
|
||||||
0 #iplot# %flag for plotting: 0 none, 1 partly, >1 everything
|
0 #iplot# %flag for plotting: 0 none, 1 partly, >1 everything
|
||||||
@ -42,7 +42,7 @@ AUTOFOCMEC_AIC_HOS4_ARH.in #focmecin# %name of focmec input file co
|
|||||||
15.0 #pstart# %start time [s] for calculating CF for P-picking
|
15.0 #pstart# %start time [s] for calculating CF for P-picking
|
||||||
60.0 #pstop# %end time [s] for calculating CF for P-picking
|
60.0 #pstop# %end time [s] for calculating CF for P-picking
|
||||||
-1.0 #sstart# %start time [s] relative to P-onset for calculating CF for S-picking
|
-1.0 #sstart# %start time [s] relative to P-onset for calculating CF for S-picking
|
||||||
12.0 #sstop# %end time [s] after P-onset for calculating CF for S-picking
|
10.0 #sstop# %end time [s] after P-onset for calculating CF for S-picking
|
||||||
2 20 #bpz1# %lower/upper corner freq. of first band pass filter Z-comp. [Hz]
|
2 20 #bpz1# %lower/upper corner freq. of first band pass filter Z-comp. [Hz]
|
||||||
2 30 #bpz2# %lower/upper corner freq. of second band pass filter Z-comp. [Hz]
|
2 30 #bpz2# %lower/upper corner freq. of second band pass filter Z-comp. [Hz]
|
||||||
2 15 #bph1# %lower/upper corner freq. of first band pass filter H-comp. [Hz]
|
2 15 #bph1# %lower/upper corner freq. of first band pass filter H-comp. [Hz]
|
||||||
@ -74,13 +74,12 @@ ARH #algoS# %choose algorithm for S-onset
|
|||||||
0.6 #tdet2h# %for HOS/AR, length of AR-determinaton window [s], H-components, 2nd pick
|
0.6 #tdet2h# %for HOS/AR, length of AR-determinaton window [s], H-components, 2nd pick
|
||||||
0.3 #tpred2h# %for HOS/AR, length of AR-prediction window [s], H-components, 2nd pick
|
0.3 #tpred2h# %for HOS/AR, length of AR-prediction window [s], H-components, 2nd pick
|
||||||
4 #Sarorder# %for AR-picker, order of AR process of H-components
|
4 #Sarorder# %for AR-picker, order of AR process of H-components
|
||||||
6.0 #Srecalcwin# %for AR-picker, window length [s] for recalculation of CF (2nd pick) (H)
|
5.0 #Srecalcwin# %for AR-picker, window length [s] for recalculation of CF (2nd pick) (H)
|
||||||
3.0 #pickwinS# %for initial AIC pick, length of S-pick window [s]
|
3.0 #pickwinS# %for initial AIC pick, length of S-pick window [s]
|
||||||
2 0.2 1.5 0.5 #tsnrh# %for ARH/AR3, window lengths for SNR-and slope estimation [tnoise,tsafetey,tsignal,tslope] [s]
|
2 0.2 1.5 0.5 #tsnrh# %for ARH/AR3, window lengths for SNR-and slope estimation [tnoise,tsafetey,tsignal,tslope] [s]
|
||||||
0.05 #aictsmoothS# %for AIC-picker, take average of samples for smoothing of AIC-function [s]
|
0.5 #aictsmoothS# %for AIC-picker, take average of samples for smoothing of AIC-function [s]
|
||||||
0.02 #tsmoothS# %for AR-picker, take average of samples for smoothing CF [s] (S)
|
0.7 #tsmoothS# %for AR-picker, take average of samples for smoothing CF [s] (S)
|
||||||
0.2 #pepsS# %for AR-picker, artificial uplift of samples of CF (S)
|
0.9 #ausS# %for HOS/AR, artificial uplift of samples (aus) of CF (S)
|
||||||
0.4 #ausS# %for HOS/AR, artificial uplift of samples (aus) of CF (S)
|
|
||||||
1.5 #nfacS# %for AR-picker, noise factor for noise level determination (S)
|
1.5 #nfacS# %for AR-picker, noise factor for noise level determination (S)
|
||||||
%first-motion picker%
|
%first-motion picker%
|
||||||
1 #minfmweight# %minimum required P weight for first-motion determination
|
1 #minfmweight# %minimum required P weight for first-motion determination
|
||||||
@ -90,9 +89,9 @@ ARH #algoS# %choose algorithm for S-onset
|
|||||||
#inital AIC onset#
|
#inital AIC onset#
|
||||||
0.01 0.02 0.04 0.08 #timeerrorsP# %discrete time errors [s] corresponding to picking weights [0 1 2 3] for P
|
0.01 0.02 0.04 0.08 #timeerrorsP# %discrete time errors [s] corresponding to picking weights [0 1 2 3] for P
|
||||||
0.04 0.08 0.16 0.32 #timeerrorsS# %discrete time errors [s] corresponding to picking weights [0 1 2 3] for S
|
0.04 0.08 0.16 0.32 #timeerrorsS# %discrete time errors [s] corresponding to picking weights [0 1 2 3] for S
|
||||||
10 #minAICPslope# %below this slope [counts/s] the initial P pick is rejected
|
4 #minAICPslope# %below this slope [counts/s] the initial P pick is rejected
|
||||||
1.2 #minAICPSNR# %below this SNR the initial P pick is rejected
|
1.2 #minAICPSNR# %below this SNR the initial P pick is rejected
|
||||||
3 #minAICSslope# %below this slope [counts/s] the initial S pick is rejected
|
2 #minAICSslope# %below this slope [counts/s] the initial S pick is rejected
|
||||||
1.5 #minAICSSNR# %below this SNR the initial S pick is rejected
|
1.5 #minAICSSNR# %below this SNR the initial S pick is rejected
|
||||||
#check duration of signal using envelope function#
|
#check duration of signal using envelope function#
|
||||||
4 #minsiglength# %minimum required length of signal [s]
|
4 #minsiglength# %minimum required length of signal [s]
|
||||||
|
@ -364,7 +364,7 @@ class PragPicker(AutoPicking):
|
|||||||
break
|
break
|
||||||
|
|
||||||
# now decide which pick: left or right?
|
# now decide which pick: left or right?
|
||||||
if flagpick_l > 0 and flagpick_r > 0 and cfpick_l <= cfpick_r:
|
if flagpick_l > 0 and flagpick_r > 0 and cfpick_l <= 3 * cfpick_r:
|
||||||
self.Pick = pick_l
|
self.Pick = pick_l
|
||||||
pickflag = 1
|
pickflag = 1
|
||||||
elif flagpick_l > 0 and flagpick_r > 0 and cfpick_l >= cfpick_r:
|
elif flagpick_l > 0 and flagpick_r > 0 and cfpick_l >= cfpick_r:
|
||||||
|
@ -500,58 +500,60 @@ def autopickstation(wfstream, pickparam):
|
|||||||
[lpickS2, epickS2, Serror2] = earllatepicker(h_copy, nfacS,
|
[lpickS2, epickS2, Serror2] = earllatepicker(h_copy, nfacS,
|
||||||
tsnrh,
|
tsnrh,
|
||||||
mpickS, iplot)
|
mpickS, iplot)
|
||||||
if algoS == 'ARH':
|
if epickS1 is not None and epickS2 is not None:
|
||||||
# get earliest pick of both earliest possible picks
|
if algoS == 'ARH':
|
||||||
epick = [epickS1, epickS2]
|
# get earliest pick of both earliest possible picks
|
||||||
lpick = [lpickS1, lpickS2]
|
epick = [epickS1, epickS2]
|
||||||
pickerr = [Serror1, Serror2]
|
lpick = [lpickS1, lpickS2]
|
||||||
if epickS1 == None and epickS2 is not None:
|
pickerr = [Serror1, Serror2]
|
||||||
ipick = 1
|
if epickS1 == None and epickS2 is not None:
|
||||||
elif epickS1 is not None and epickS2 == None:
|
ipick = 1
|
||||||
ipick = 0
|
elif epickS1 is not None and epickS2 == None:
|
||||||
elif epickS1 is not None and epickS2 is not None:
|
ipick = 0
|
||||||
ipick = np.argmin([epickS1, epickS2])
|
elif epickS1 is not None and epickS2 is not None:
|
||||||
elif algoS == 'AR3':
|
ipick = np.argmin([epickS1, epickS2])
|
||||||
[lpickS3, epickS3, Serror3] = earllatepicker(h_copy, nfacS,
|
elif algoS == 'AR3':
|
||||||
tsnrh,
|
[lpickS3, epickS3, Serror3] = earllatepicker(h_copy, nfacS,
|
||||||
mpickS, iplot)
|
tsnrh,
|
||||||
# get earliest pick of all three picks
|
mpickS, iplot)
|
||||||
epick = [epickS1, epickS2, epickS3]
|
# get earliest pick of all three picks
|
||||||
lpick = [lpickS1, lpickS2, lpickS3]
|
epick = [epickS1, epickS2, epickS3]
|
||||||
pickerr = [Serror1, Serror2, Serror3]
|
lpick = [lpickS1, lpickS2, lpickS3]
|
||||||
if epickS1 == None and epickS2 is not None \
|
pickerr = [Serror1, Serror2, Serror3]
|
||||||
and epickS3 is not None:
|
if epickS1 == None and epickS2 is not None \
|
||||||
ipick = np.argmin([epickS2, epickS3])
|
and epickS3 is not None:
|
||||||
elif epickS1 is not None and epickS2 == None \
|
ipick = np.argmin([epickS2, epickS3])
|
||||||
and epickS3 is not None:
|
elif epickS1 is not None and epickS2 == None \
|
||||||
ipick = np.argmin([epickS2, epickS3])
|
and epickS3 is not None:
|
||||||
elif epickS1 is not None and epickS2 is not None \
|
ipick = np.argmin([epickS2, epickS3])
|
||||||
and epickS3 == None:
|
elif epickS1 is not None and epickS2 is not None \
|
||||||
ipick = np.argmin([epickS1, epickS2])
|
and epickS3 == None:
|
||||||
elif epickS1 is not None and epickS2 is not None \
|
ipick = np.argmin([epickS1, epickS2])
|
||||||
and epickS3 is not None:
|
elif epickS1 is not None and epickS2 is not None \
|
||||||
ipick = np.argmin([epickS1, epickS2, epickS3])
|
and epickS3 is not None:
|
||||||
epickS = epick[ipick]
|
ipick = np.argmin([epickS1, epickS2, epickS3])
|
||||||
lpickS = lpick[ipick]
|
|
||||||
Serror = pickerr[ipick]
|
|
||||||
|
|
||||||
# get SNR
|
epickS = epick[ipick]
|
||||||
[SNRS, SNRSdB, Snoiselevel] = getSNR(h_copy, tsnrh, mpickS)
|
lpickS = lpick[ipick]
|
||||||
|
Serror = pickerr[ipick]
|
||||||
|
|
||||||
# weight S-onset using symmetric error
|
# get SNR
|
||||||
if Serror <= timeerrorsS[0]:
|
[SNRS, SNRSdB, Snoiselevel] = getSNR(h_copy, tsnrh, mpickS)
|
||||||
Sweight = 0
|
|
||||||
elif timeerrorsS[0] < Serror <= timeerrorsS[1]:
|
|
||||||
Sweight = 1
|
|
||||||
elif Perror > timeerrorsS[1] and Serror <= timeerrorsS[2]:
|
|
||||||
Sweight = 2
|
|
||||||
elif timeerrorsS[2] < Serror <= timeerrorsS[3]:
|
|
||||||
Sweight = 3
|
|
||||||
elif Serror > timeerrorsS[3]:
|
|
||||||
Sweight = 4
|
|
||||||
|
|
||||||
print 'autopickstation: S-weight: %d, SNR: %f, SNR[dB]: %f' % (
|
# weight S-onset using symmetric error
|
||||||
Sweight, SNRS, SNRSdB)
|
if Serror <= timeerrorsS[0]:
|
||||||
|
Sweight = 0
|
||||||
|
elif timeerrorsS[0] < Serror <= timeerrorsS[1]:
|
||||||
|
Sweight = 1
|
||||||
|
elif Perror > timeerrorsS[1] and Serror <= timeerrorsS[2]:
|
||||||
|
Sweight = 2
|
||||||
|
elif timeerrorsS[2] < Serror <= timeerrorsS[3]:
|
||||||
|
Sweight = 3
|
||||||
|
elif Serror > timeerrorsS[3]:
|
||||||
|
Sweight = 4
|
||||||
|
|
||||||
|
print 'autopickstation: S-weight: %d, SNR: %f, SNR[dB]: %f' % (
|
||||||
|
Sweight, SNRS, SNRSdB)
|
||||||
##################################################################
|
##################################################################
|
||||||
# get Wood-Anderson peak-to-peak amplitude
|
# get Wood-Anderson peak-to-peak amplitude
|
||||||
print "################################################"
|
print "################################################"
|
||||||
|
Loading…
Reference in New Issue
Block a user