wadaticheck: bug fixed, initialization of running index at wrong place.
This commit is contained in:
parent
1abcb9d9a9
commit
7281220b55
@ -449,9 +449,9 @@ def wadaticheck(pickdic, dttolerance, iplot):
|
|||||||
checkedSpicks = []
|
checkedSpicks = []
|
||||||
checkedSPtimes = []
|
checkedSPtimes = []
|
||||||
# calculate deviations from Wadati regression
|
# calculate deviations from Wadati regression
|
||||||
|
ii = 0
|
||||||
for key in pickdic:
|
for key in pickdic:
|
||||||
if pickdic[key].has_key('SPt'):
|
if pickdic[key].has_key('SPt'):
|
||||||
ii = 0
|
|
||||||
wddiff = abs(pickdic[key]['SPt'] - wdfit[ii])
|
wddiff = abs(pickdic[key]['SPt'] - wdfit[ii])
|
||||||
ii += 1
|
ii += 1
|
||||||
# check, if deviation is larger than adjusted
|
# check, if deviation is larger than adjusted
|
||||||
@ -489,7 +489,7 @@ def wadaticheck(pickdic, dttolerance, iplot):
|
|||||||
print 'wadaticheck: Not enough S-P times available for reliable regression!'
|
print 'wadaticheck: Not enough S-P times available for reliable regression!'
|
||||||
print 'Skip wadati check!'
|
print 'Skip wadati check!'
|
||||||
wfitflag = 1
|
wfitflag = 1
|
||||||
|
iplot=2
|
||||||
# plot results
|
# plot results
|
||||||
if iplot > 1:
|
if iplot > 1:
|
||||||
plt.figure(iplot)
|
plt.figure(iplot)
|
||||||
@ -498,8 +498,8 @@ def wadaticheck(pickdic, dttolerance, iplot):
|
|||||||
f2, = plt.plot(Ppicks, wdfit, 'k')
|
f2, = plt.plot(Ppicks, wdfit, 'k')
|
||||||
f3, = plt.plot(checkedPpicks, checkedSPtimes, 'ko')
|
f3, = plt.plot(checkedPpicks, checkedSPtimes, 'ko')
|
||||||
f4, = plt.plot(checkedPpicks, wdfit2, 'g')
|
f4, = plt.plot(checkedPpicks, wdfit2, 'g')
|
||||||
plt.title('Wadati-Diagram, %d S-P Times, Vp/Vs(raw)=%5.2f, \
|
plt.title('Wadati-Diagram, %d S-P Times, Vp/Vs(raw)=%5.2f,' \
|
||||||
Vp/Vs(checked)=%5.2f' % (len(SPtimes), vpvsr, cvpvsr))
|
'Vp/Vs(checked)=%5.2f' % (len(SPtimes), vpvsr, cvpvsr))
|
||||||
plt.legend([f1, f2, f3, f4], ['Skipped S-Picks', 'Wadati 1', \
|
plt.legend([f1, f2, f3, f4], ['Skipped S-Picks', 'Wadati 1', \
|
||||||
'Reliable S-Picks', 'Wadati 2'], loc='best')
|
'Reliable S-Picks', 'Wadati 2'], loc='best')
|
||||||
else:
|
else:
|
||||||
|
Loading…
Reference in New Issue
Block a user