[new] added function to calculate symmetrized pickerror on the fly
This commit is contained in:
parent
ca7ce5f13c
commit
80e0ca99d7
@ -47,6 +47,7 @@ from pylot.core.io.data import Data
|
|||||||
from pylot.core.io.inputs import FilterOptions, AutoPickParameter
|
from pylot.core.io.inputs import FilterOptions, AutoPickParameter
|
||||||
from pylot.core.pick.autopick import autopickevent
|
from pylot.core.pick.autopick import autopickevent
|
||||||
from pylot.core.pick.compare import Comparison
|
from pylot.core.pick.compare import Comparison
|
||||||
|
from pylot.core.pick.utils import symmetrize_error
|
||||||
from pylot.core.io.phases import picksdict_from_picks
|
from pylot.core.io.phases import picksdict_from_picks
|
||||||
import pylot.core.loc.nll as nll
|
import pylot.core.loc.nll as nll
|
||||||
from pylot.core.util.defaults import FILTERDEFAULTS, COMPNAME_MAP, \
|
from pylot.core.util.defaults import FILTERDEFAULTS, COMPNAME_MAP, \
|
||||||
@ -894,6 +895,8 @@ class MainWindow(QMainWindow):
|
|||||||
epp = picks['epp'] - stime
|
epp = picks['epp'] - stime
|
||||||
lpp = picks['lpp'] - stime
|
lpp = picks['lpp'] - stime
|
||||||
spe = picks['spe']
|
spe = picks['spe']
|
||||||
|
if not spe:
|
||||||
|
spe = symmetrize_error(mpp - epp, lpp - mpp)
|
||||||
|
|
||||||
if picktype == 'manual':
|
if picktype == 'manual':
|
||||||
ax.fill_between([epp, lpp], ylims[0], ylims[1],
|
ax.fill_between([epp, lpp], ylims[0], ylims[1],
|
||||||
|
@ -103,7 +103,7 @@ def earllatepicker(X, nfac, TSNR, Pick1, iplot=None, stealth_mode=False):
|
|||||||
# by weighting latest possible pick two times earliest possible pick
|
# by weighting latest possible pick two times earliest possible pick
|
||||||
diffti_tl = LPick - Pick1
|
diffti_tl = LPick - Pick1
|
||||||
diffti_te = Pick1 - EPick
|
diffti_te = Pick1 - EPick
|
||||||
PickError = (diffti_te + 2 * diffti_tl) / 3
|
PickError = symmetrize_error(diffti_te, diffti_tl)
|
||||||
|
|
||||||
if iplot > 1:
|
if iplot > 1:
|
||||||
p = plt.figure(iplot)
|
p = plt.figure(iplot)
|
||||||
@ -325,6 +325,17 @@ def crossings_nonzero_all(data):
|
|||||||
return ((pos[:-1] & npos[1:]) | (npos[:-1] & pos[1:])).nonzero()[0]
|
return ((pos[:-1] & npos[1:]) | (npos[:-1] & pos[1:])).nonzero()[0]
|
||||||
|
|
||||||
|
|
||||||
|
def symmetrize_error(dte, dtl):
|
||||||
|
"""
|
||||||
|
takes earliest and latest possible pick and returns the symmetrized pick
|
||||||
|
uncertainty value
|
||||||
|
:param dte: relative lower uncertainty
|
||||||
|
:param dtl: relative upper uncertainty
|
||||||
|
:return: symmetrized error
|
||||||
|
"""
|
||||||
|
return (dte + 2 * dtl) / 3
|
||||||
|
|
||||||
|
|
||||||
def getSNR(X, TSNR, t1, tracenum=0):
|
def getSNR(X, TSNR, t1, tracenum=0):
|
||||||
'''
|
'''
|
||||||
Function to calculate SNR of certain part of seismogram relative to
|
Function to calculate SNR of certain part of seismogram relative to
|
||||||
|
Loading…
Reference in New Issue
Block a user