diff --git a/pylot/core/active/activeSeismoPick.py b/pylot/core/active/activeSeismoPick.py index e99f503f..e743e0ed 100644 --- a/pylot/core/active/activeSeismoPick.py +++ b/pylot/core/active/activeSeismoPick.py @@ -91,7 +91,7 @@ class Survey(object): #fileending = '.sg2' if fend == None: fend = '_pickle.dat' - obsfile = fstart + os.path.join(self._obsdir, str(shotnumber)) + fend + obsfile = os.path.join(self._obsdir, fstart + str(shotnumber)) + fend if obsfile not in shot_dict.keys(): shot_dict[shotnumber] = [] shot_dict[shotnumber] = seismicshot.SeismicShot(obsfile) diff --git a/pylot/core/active/surveyUtils.py b/pylot/core/active/surveyUtils.py index dcf31a2a..0cc22b1b 100644 --- a/pylot/core/active/surveyUtils.py +++ b/pylot/core/active/surveyUtils.py @@ -97,7 +97,7 @@ def setDynamicFittedSNR(shot_dict, shiftdist=30, shiftSNR=100, p1=0.004, p2=-0.0 for shot in shot_dict.values(): for traceID in shot.getTraceIDlist(): ### IMPROVE dist = shot.getDistance(traceID) + shiftdist - snrthreshold = (1 / (fit_fn(dist) ** 2)) - shiftSNR * np.exp(-0.05 * dist) + snrthreshold = snr_fit_func(fit_fn, dist, shiftSNR) if snrthreshold < minSNR: print('WARNING: SNR threshold %s lower %s. Set SNR threshold to %s.' % (snrthreshold, minSNR, minSNR)) @@ -106,6 +106,10 @@ def setDynamicFittedSNR(shot_dict, shiftdist=30, shiftSNR=100, p1=0.004, p2=-0.0 shot.setSNRthreshold(traceID, snrthreshold) print("setDynamicFittedSNR: Finished setting of fitted SNR-threshold") +def snr_fit_func(fit_fn, dist, shiftSNR): + import numpy as np + snrthreshold = (1 / (fit_fn(dist) ** 2)) - shiftSNR * np.exp(-0.05 * dist) + return snrthreshold def setConstantSNR(shot_dict, snrthreshold=2.5): """