merge origin/develop into develop
This commit is contained in:
commit
718879fad0
@ -17,8 +17,11 @@ from pylot.core.pick.utils import getsignalwin, crossings_nonzero_all, \
|
|||||||
from pylot.core.util.utils import common_range, fit_curve
|
from pylot.core.util.utils import common_range, fit_curve
|
||||||
|
|
||||||
def richter_magnitude_scaling(delta):
|
def richter_magnitude_scaling(delta):
|
||||||
distance = np.arange(0, 1000, 10)
|
distance = np.array([0, 10, 20, 25, 30, 35,40, 45, 50, 60, 70, 75, 85, 90, 100, 110,
|
||||||
richter_scaling = array([1.4, 1.5, 1.7, 1.9, 2.1, 2.3, 2.4, 2.5, 2.6, 2.8, 2.8, 2.9,
|
120, 130, 140, 150, 160, 170, 180, 190, 200, 210, 230, 240, 250,
|
||||||
|
260, 270, 280, 290, 300, 310, 320, 330, 340, 350, 360, 370, 380,
|
||||||
|
390, 400, 430, 470, 510, 560, 600, 700, 800, 900, 1000])
|
||||||
|
richter_scaling = np.array([1.4, 1.5, 1.7, 1.9, 2.1, 2.3, 2.4, 2.5, 2.6, 2.8, 2.8, 2.9,
|
||||||
2.9, 3.0, 3.1, 3.1, 3.2, 3.2, 3.3, 3.3, 3.4, 3.4, 3.5, 3.5,
|
2.9, 3.0, 3.1, 3.1, 3.2, 3.2, 3.3, 3.3, 3.4, 3.4, 3.5, 3.5,
|
||||||
3.6, 3.7, 3.7, 3.8, 3.8, 3.9, 3.9, 4.0, 4.0, 4.1, 4.2, 4.2,
|
3.6, 3.7, 3.7, 3.8, 3.8, 3.9, 3.9, 4.0, 4.0, 4.1, 4.2, 4.2,
|
||||||
4.2, 4.2, 4.3, 4.3, 4.3, 4.4, 4.4, 4.5, 4.6, 4.7, 4.8, 4.9,
|
4.2, 4.2, 4.3, 4.3, 4.3, 4.4, 4.4, 4.5, 4.6, 4.7, 4.8, 4.9,
|
||||||
|
@ -223,9 +223,15 @@ class AICPicker(AutoPicker):
|
|||||||
# find maximum within slope determination window
|
# find maximum within slope determination window
|
||||||
# 'cause slope should be calculated up to first local minimum only!
|
# 'cause slope should be calculated up to first local minimum only!
|
||||||
imax = np.argmax(self.Data[0].data[islope])
|
imax = np.argmax(self.Data[0].data[islope])
|
||||||
|
iislope = islope[0][0:imax]
|
||||||
|
if len(iislope) <= 2:
|
||||||
|
# calculate slope from initial onset to maximum of AIC function
|
||||||
|
print("AICPicker: Not enough data samples left for slope calculation!")
|
||||||
|
print("Calculating slope from initial onset to maximum of AIC function ...")
|
||||||
|
imax = np.argmax(aicsmooth[islope])
|
||||||
if imax == 0:
|
if imax == 0:
|
||||||
print('AICPicker: Maximum for slope determination right at the beginning of the window!')
|
print("AICPicker: Maximum for slope determination right at the beginning of the window!")
|
||||||
print('Choose longer slope determination window!')
|
print("Choose longer slope determination window!")
|
||||||
if self.iplot > 1:
|
if self.iplot > 1:
|
||||||
if not self.fig:
|
if not self.fig:
|
||||||
fig = plt.figure() #self.iplot) ### WHY? MP MP
|
fig = plt.figure() #self.iplot) ### WHY? MP MP
|
||||||
@ -240,11 +246,6 @@ class AICPicker(AutoPicker):
|
|||||||
ax.set_yticks([])
|
ax.set_yticks([])
|
||||||
ax.set_title(self.Data[0].stats.station)
|
ax.set_title(self.Data[0].stats.station)
|
||||||
return
|
return
|
||||||
|
|
||||||
iislope = islope[0][0:imax]
|
|
||||||
if len(iislope) <= 3:
|
|
||||||
# calculate slope from initial onset to maximum of AIC function
|
|
||||||
imax = np.argmax(aicsmooth[islope])
|
|
||||||
iislope = islope[0][0:imax]
|
iislope = islope[0][0:imax]
|
||||||
dataslope = self.Data[0].data[iislope]
|
dataslope = self.Data[0].data[iislope]
|
||||||
# calculate slope as polynomal fit of order 1
|
# calculate slope as polynomal fit of order 1
|
||||||
|
Loading…
Reference in New Issue
Block a user