From c676fc5762154a2bb66b41a377dd55121bebcc04 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ludger=20K=C3=BCperkoch?= Date: Mon, 1 Jun 2015 14:15:37 +0200 Subject: [PATCH] Modified loop over all available stations to prevent processing of one station several times. --- autoPyLoT.py | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/autoPyLoT.py b/autoPyLoT.py index af1e8423..8cbc49af 100755 --- a/autoPyLoT.py +++ b/autoPyLoT.py @@ -12,6 +12,7 @@ from pylot.core.util import _getVersionString from pylot.core.read import Data, AutoPickParameter from pylot.core.pick.run_autopicking import run_autopicking from pylot.core.util.structure import DATASTRUCTURE +import pdb __version__ = _getVersionString() @@ -72,11 +73,15 @@ def autoPyLoT(inputfile): ########################################################## # !automated picking starts here! - for i in range(len(wfdat) - 2): + procstats = [] + for i in range(len(wfdat)): stationID = wfdat[i].stats.station - #find corresponding streams - statdat = wfdat.select(station=stationID) - run_autopicking(statdat, parameter) + #check if station has already been processed + if stationID not in procstats: + procstats.append(stationID) + #find corresponding streams + statdat = wfdat.select(station=stationID) + run_autopicking(statdat, parameter) if __name__ == "__main__":