reformatting code for reasons of coding conventions
This commit is contained in:
parent
9ec7da7e4e
commit
bb6ebc7ee1
@ -393,8 +393,8 @@ def wadaticheck(pickdic, dttolerance, iplot):
|
|||||||
|
|
||||||
: param: pickdic, dictionary containing picks and quality parameters
|
: param: pickdic, dictionary containing picks and quality parameters
|
||||||
: type: dictionary
|
: type: dictionary
|
||||||
|
|
||||||
: param: dttolerance, maximum adjusted deviation of S-P time from
|
: param: dttolerance, maximum adjusted deviation of S-P time from
|
||||||
S-P time regression
|
S-P time regression
|
||||||
: type: float
|
: type: float
|
||||||
|
|
||||||
@ -423,15 +423,15 @@ def wadaticheck(pickdic, dttolerance, iplot):
|
|||||||
|
|
||||||
|
|
||||||
if len(SPtimes) >= 3:
|
if len(SPtimes) >= 3:
|
||||||
# calculate slope
|
# calculate slope
|
||||||
p1 = np.polyfit(Ppicks, SPtimes, 1)
|
p1 = np.polyfit(Ppicks, SPtimes, 1)
|
||||||
wdfit = np.polyval(p1, Ppicks)
|
wdfit = np.polyval(p1, Ppicks)
|
||||||
wfitflag = 0
|
wfitflag = 0
|
||||||
|
|
||||||
# calculate vp/vs ratio before check
|
# calculate vp/vs ratio before check
|
||||||
vpvsr = p1[0] + 1
|
vpvsr = p1[0] + 1
|
||||||
print 'wadaticheck: Average Vp/Vs ratio before check:', vpvsr
|
print 'wadaticheck: Average Vp/Vs ratio before check:', vpvsr
|
||||||
|
|
||||||
checkedPpicks = []
|
checkedPpicks = []
|
||||||
checkedSpicks = []
|
checkedSpicks = []
|
||||||
checkedSPtimes = []
|
checkedSPtimes = []
|
||||||
@ -443,7 +443,7 @@ def wadaticheck(pickdic, dttolerance, iplot):
|
|||||||
ii += 1
|
ii += 1
|
||||||
# check, if deviation is larger than adjusted
|
# check, if deviation is larger than adjusted
|
||||||
if wddiff >= dttolerance:
|
if wddiff >= dttolerance:
|
||||||
# mark onset and downgrade S-weight to 9
|
# mark onset and downgrade S-weight to 9
|
||||||
# (not used anymore)
|
# (not used anymore)
|
||||||
marker = 'badWadatiCheck'
|
marker = 'badWadatiCheck'
|
||||||
pickdic[key]['S']['weight'] = 9
|
pickdic[key]['S']['weight'] = 9
|
||||||
@ -459,7 +459,7 @@ def wadaticheck(pickdic, dttolerance, iplot):
|
|||||||
pickdic[key]['S']['marked'] = marker
|
pickdic[key]['S']['marked'] = marker
|
||||||
|
|
||||||
|
|
||||||
# calculate new slope
|
# calculate new slope
|
||||||
p2 = np.polyfit(checkedPpicks, checkedSPtimes, 1)
|
p2 = np.polyfit(checkedPpicks, checkedSPtimes, 1)
|
||||||
wdfit2 = np.polyval(p2, checkedPpicks)
|
wdfit2 = np.polyval(p2, checkedPpicks)
|
||||||
|
|
||||||
@ -468,7 +468,7 @@ def wadaticheck(pickdic, dttolerance, iplot):
|
|||||||
print 'wadaticheck: Average Vp/Vs ratio after check:', cvpvsr
|
print 'wadaticheck: Average Vp/Vs ratio after check:', cvpvsr
|
||||||
|
|
||||||
checkedonsets = pickdic
|
checkedonsets = pickdic
|
||||||
|
|
||||||
else:
|
else:
|
||||||
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!'
|
||||||
|
Loading…
Reference in New Issue
Block a user