From 7d77cb0b2f22a1c137d3edcb72d875d868da3d44 Mon Sep 17 00:00:00 2001 From: Ludger Kueperkoch Date: Wed, 30 Sep 2020 10:11:10 +0200 Subject: [PATCH] [Bugfix] Wrong syntax for multiple if statements. --- pylot/core/io/phases.py | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/pylot/core/io/phases.py b/pylot/core/io/phases.py index e004f53d..900a3329 100644 --- a/pylot/core/io/phases.py +++ b/pylot/core/io/phases.py @@ -362,22 +362,15 @@ def picks_from_picksdict(picks, creation_info=None): try: polarity = picks[station][label]['fm'] - if polarity == 'U' or '+': + if polarity == 'U' or polarity == '+': pick.polarity = 'positive' - elif polarity == 'D' or '-': + elif polarity == 'D' or polarity == '-': pick.polarity = 'negative' else: pick.polarity = 'undecidable' except: pick.polarity = 'undecidable' print("No polarity information available!") - #except KeyError as e: - # if 'fm' in str(e): # no polarity information found for this phase - #if 'polarity' in str(e): # no polarity information found for this phase - # print("No polarity information available!") - # pass - # else: - # raise e picks_list.append(pick) return picks_list