From 961be8ccbca2f09695773eeea3cfc7d8dddf2f83 Mon Sep 17 00:00:00 2001 From: Marcel Date: Mon, 18 Sep 2017 15:10:52 +0200 Subject: [PATCH] [bugfix] ibad referenced before assignment --- pylot/core/pick/utils.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pylot/core/pick/utils.py b/pylot/core/pick/utils.py index 34c43ae0..5f72bd39 100644 --- a/pylot/core/pick/utils.py +++ b/pylot/core/pick/utils.py @@ -592,6 +592,8 @@ def wadaticheck(pickdic, dttolerance, iplot=0, fig_dict=None): Spicks = [] SPtimes = [] stations = [] + ibad = 0 + for key in list(pickdic.keys()): if pickdic[key]['P']['weight'] < 4 and pickdic[key]['S']['weight'] < 4: # calculate S-P time @@ -622,7 +624,6 @@ def wadaticheck(pickdic, dttolerance, iplot=0, fig_dict=None): badstations = [] # calculate deviations from Wadati regression ii = 0 - ibad = 0 for key in list(pickdic.keys()): if 'SPt' in pickdic[key]: stations.append(key)