changed SNR threshold (scaled by exp function)
This commit is contained in:
parent
fdd7ff003b
commit
b310062687
@ -14,7 +14,7 @@ def setArtificialPick(shot_dict, traceID, pick):
|
||||
shot.setPick(traceID, pick)
|
||||
shot.setPickwindow(traceID, shot.getCut())
|
||||
|
||||
def fitSNR4dist(shot_dict, shiftdist = 5, shiftSNR = 3):
|
||||
def fitSNR4dist(shot_dict, shiftdist = 30, shiftSNR = 100):
|
||||
import numpy as np
|
||||
dists = []
|
||||
picks = []
|
||||
@ -32,7 +32,7 @@ def fitSNR4dist(shot_dict, shiftdist = 5, shiftSNR = 3):
|
||||
fit_fn = np.poly1d(fit)
|
||||
for dist in dists:
|
||||
dist += shiftdist
|
||||
snrthresholds.append((1/(fit_fn(dist)**2)) - shiftSNR)
|
||||
snrthresholds.append((1/(fit_fn(dist)**2)) - shiftSNR * np.exp(-0.05 * dist))
|
||||
plotFittedSNR(dists, snrthresholds, snrs)
|
||||
return fit_fn #### ZU VERBESSERN, sollte fertige funktion wiedergeben
|
||||
|
||||
@ -47,17 +47,19 @@ def plotFittedSNR(dists, snrthresholds, snrs):
|
||||
plt.ylabel('SNR')
|
||||
plt.legend()
|
||||
|
||||
def setFittedSNR(shot_dict, shiftdist = 5, shiftSNR = 3, p1 = 0.004, p2 = -0.0007):
|
||||
def setFittedSNR(shot_dict, shiftdist = 30, shiftSNR = 100, p1 = 0.004, p2 = -0.0007):
|
||||
import numpy as np
|
||||
minSNR = 2.5
|
||||
#fit_fn = fitSNR4dist(shot_dict)
|
||||
fit_fn = np.poly1d([p1, p2])
|
||||
for shot in shot_dict.values():
|
||||
for traceID in shot.getTraceIDlist(): ### IMPROVE
|
||||
snrthreshold = (1/(fit_fn(shot.getDistance(traceID) + shiftdist)**2)) - shiftSNR
|
||||
dist = shot.getDistance(traceID) + shiftdist
|
||||
snrthreshold = (1/(fit_fn(dist)**2)) - shiftSNR * np.exp(-0.05 * dist)
|
||||
if snrthreshold <= 1:
|
||||
print('WARNING: SNR threshold %s lower 1!!! Try to lower the shiftSNR'
|
||||
%snrthreshold)
|
||||
shot.setSNRthreshold(traceID, 1)
|
||||
print('WARNING: SNR threshold %s lower %s. Set SNR threshold to %s.'
|
||||
%(snrthreshold, minSNR, minSNR))
|
||||
shot.setSNRthreshold(traceID, minSNR)
|
||||
break
|
||||
shot.setSNRthreshold(traceID, snrthreshold)
|
||||
print "setFittedSNR: Finished setting of fitted SNR-threshold"
|
||||
|
Loading…
Reference in New Issue
Block a user