Merge branch 'develop' of ariadne.geophysik.ruhr-uni-bochum.de:/data/git/pylot into develop
This commit is contained in:
commit
a23af62d23
@ -405,13 +405,13 @@ def autoPyLoT(input_dict=None, parameter=None, inputfile=None, fnames=None, even
|
|||||||
# write phase files for various location
|
# write phase files for various location
|
||||||
# and fault mechanism calculation routines
|
# and fault mechanism calculation routines
|
||||||
# ObsPy event object
|
# ObsPy event object
|
||||||
data.applyEVTData(picks)
|
|
||||||
if evt is not None:
|
if evt is not None:
|
||||||
event_id = eventpath.split('/')[-1]
|
event_id = eventpath.split('/')[-1]
|
||||||
evt.resource_id = ResourceIdentifier('smi:local/' + event_id)
|
evt.resource_id = ResourceIdentifier('smi:local/' + event_id)
|
||||||
data.applyEVTData(evt, 'event')
|
data.applyEVTData(evt, 'event')
|
||||||
|
data.applyEVTData(picks)
|
||||||
if savexml:
|
if savexml:
|
||||||
if not savepath:
|
if savepath == 'None':
|
||||||
savepath = eventpath
|
savepath = eventpath
|
||||||
fnqml = '%s/PyLoT_%s' % (savepath, evID)
|
fnqml = '%s/PyLoT_%s' % (savepath, evID)
|
||||||
data.exportEvent(fnqml, fnext='.xml', fcheck=['auto', 'magnitude', 'origin'])
|
data.exportEvent(fnqml, fnext='.xml', fcheck=['auto', 'magnitude', 'origin'])
|
||||||
|
@ -582,8 +582,6 @@ def writephases(arrivals, fformat, filename, parameter, eventinfo=None):
|
|||||||
fid = open("%s" % filename, 'w')
|
fid = open("%s" % filename, 'w')
|
||||||
# write header
|
# write header
|
||||||
fid.write('%s, event %s \n' % (parameter.get('database'), parameter.get('eventID')))
|
fid.write('%s, event %s \n' % (parameter.get('database'), parameter.get('eventID')))
|
||||||
errP = parameter.get('timeerrorsP')
|
|
||||||
errS = parameter.get('timeerrorsS')
|
|
||||||
for key in arrivals:
|
for key in arrivals:
|
||||||
# P onsets
|
# P onsets
|
||||||
if arrivals[key].has_key('P'):
|
if arrivals[key].has_key('P'):
|
||||||
|
@ -450,16 +450,19 @@ def autopickstation(wfstream, pickparam, verbose=False,
|
|||||||
[SNRP, SNRPdB, Pnoiselevel] = getSNR(z_copy, tsnrz, mpickP)
|
[SNRP, SNRPdB, Pnoiselevel] = getSNR(z_copy, tsnrz, mpickP)
|
||||||
|
|
||||||
# weight P-onset using symmetric error
|
# weight P-onset using symmetric error
|
||||||
if Perror <= timeerrorsP[0]:
|
if Perror == None:
|
||||||
Pweight = 0
|
|
||||||
elif timeerrorsP[0] < Perror <= timeerrorsP[1]:
|
|
||||||
Pweight = 1
|
|
||||||
elif timeerrorsP[1] < Perror <= timeerrorsP[2]:
|
|
||||||
Pweight = 2
|
|
||||||
elif timeerrorsP[2] < Perror <= timeerrorsP[3]:
|
|
||||||
Pweight = 3
|
|
||||||
elif Perror > timeerrorsP[3]:
|
|
||||||
Pweight = 4
|
Pweight = 4
|
||||||
|
else:
|
||||||
|
if Perror <= timeerrorsP[0]:
|
||||||
|
Pweight = 0
|
||||||
|
elif timeerrorsP[0] < Perror <= timeerrorsP[1]:
|
||||||
|
Pweight = 1
|
||||||
|
elif timeerrorsP[1] < Perror <= timeerrorsP[2]:
|
||||||
|
Pweight = 2
|
||||||
|
elif timeerrorsP[2] < Perror <= timeerrorsP[3]:
|
||||||
|
Pweight = 3
|
||||||
|
elif Perror > timeerrorsP[3]:
|
||||||
|
Pweight = 4
|
||||||
|
|
||||||
##############################################################
|
##############################################################
|
||||||
# get first motion of P onset
|
# get first motion of P onset
|
||||||
|
@ -229,14 +229,14 @@ class AICPicker(AutoPicker):
|
|||||||
ii = min([isignal[len(isignal) - 1], len(self.Tcf)])
|
ii = min([isignal[len(isignal) - 1], len(self.Tcf)])
|
||||||
isignal = isignal[0:ii]
|
isignal = isignal[0:ii]
|
||||||
try:
|
try:
|
||||||
aic[isignal]
|
self.Data[0].data[isignal]
|
||||||
except IndexError as e:
|
except IndexError as e:
|
||||||
msg = "Time series out of bounds! {}".format(e)
|
msg = "Time series out of bounds! {}".format(e)
|
||||||
print(msg)
|
print(msg)
|
||||||
return
|
return
|
||||||
# calculate SNR from CF
|
# calculate SNR from CF
|
||||||
self.SNR = max(abs(aic[isignal] - np.mean(aic[isignal]))) / \
|
self.SNR = max(abs(self.Data[0].data[isignal] - np.mean(self.Data[0].data[isignal]))) / \
|
||||||
max(abs(aic[inoise] - np.mean(aic[inoise])))
|
max(abs(self.Data[0].data[inoise] - np.mean(self.Data[0].data[inoise])))
|
||||||
# calculate slope from CF after initial pick
|
# calculate slope from CF after initial pick
|
||||||
# get slope window
|
# get slope window
|
||||||
tslope = self.TSNR[3] # slope determination window
|
tslope = self.TSNR[3] # slope determination window
|
||||||
|
@ -1036,7 +1036,7 @@ def checkZ4S(X, pick, zfac, checkwin, iplot, fig=None):
|
|||||||
rmse = RMS(edat[0].data[isignale])
|
rmse = RMS(edat[0].data[isignale])
|
||||||
|
|
||||||
# calculate threshold
|
# calculate threshold
|
||||||
minsiglevel = (rmsn + rmse) * zfac
|
minsiglevel = (rmsn + rmse) / 2 * zfac
|
||||||
|
|
||||||
# vertical P-coda level must exceed horizontal P-coda level
|
# vertical P-coda level must exceed horizontal P-coda level
|
||||||
# zfac times encodalevel
|
# zfac times encodalevel
|
||||||
|
Loading…
Reference in New Issue
Block a user