From c71e28ecb752b21451082935c5fc8384ce350c30 Mon Sep 17 00:00:00 2001 From: Marcel Paffrath Date: Wed, 7 Oct 2015 14:51:20 +0200 Subject: [PATCH] shots no longer None if they are removed, but flag = 0 --- pylot/core/active/activeSeismoPick.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/pylot/core/active/activeSeismoPick.py b/pylot/core/active/activeSeismoPick.py index 50c1ddad..4adc21af 100644 --- a/pylot/core/active/activeSeismoPick.py +++ b/pylot/core/active/activeSeismoPick.py @@ -127,7 +127,7 @@ class Survey(object): shot.removePick(traceID) # -- TEST: set and check SNR before adding to distance bin ############################ - if shot.getPick(traceID) is not None: + if shot.getFlag(traceID) is not 0: shot.setEarllatepick(traceID) tpicksum += (datetime.now() - tstartpick); tpick = tpicksum/count @@ -194,7 +194,7 @@ class Survey(object): for traceID in shot.getTraceIDlist(): snrlist.append(shot.getSNR(traceID)[0]) dist.append(shot.getDistance(traceID)) - if shot.getPick(traceID) is not None: + if shot.getFlag(traceID) is not 0: pickedTraces += 1 info_dict[shot.getShotnumber()] = {'numtraces': numtraces, 'picked traces': [pickedTraces, @@ -235,7 +235,7 @@ class Survey(object): traceIDlist.sort() ttfile.writelines(str(self.countPickedTraces(shot)) + '\n') for traceID in traceIDlist: - if shot.getPick(traceID) is not None: + if shot.getFlag(traceID) is not 0: pick = shot.getPick(traceID) * fmtomo_factor delta = shot.getPickError(traceID) * fmtomo_factor (x, y, z) = shot.getRecLoc(traceID) @@ -252,7 +252,7 @@ class Survey(object): def countPickedTraces(self, shot): count = 0 for traceID in shot.getTraceIDlist(): - if shot.getPick(traceID) is not None: + if shot.getFlag(traceID) is not 0: count += 1 return count @@ -271,7 +271,7 @@ class Survey(object): for shot in self.data.values(): for traceID in shot.getTraceIDlist(): if plotDeleted == False: - if shot.getPick(traceID) is not None: + if shot.getFlag(traceID) is not 0: dist.append(shot.getDistance(traceID)) pick.append(shot.getPick(traceID)) snrloglist.append(math.log10(shot.getSNR(traceID)[0]))