diff --git a/PyLoT.py b/PyLoT.py index 9e879a54..f250977b 100755 --- a/PyLoT.py +++ b/PyLoT.py @@ -76,7 +76,7 @@ from pylot.core.util.connection import checkurl from pylot.core.util.dataprocessing import read_metadata, restitute_data from pylot.core.util.utils import fnConstructor, getLogin, \ full_range, readFilterInformation, trim_station_components, check4gaps, make_pen, pick_color_plt, \ - pick_linestyle_plt, remove_underscores, check4doubled, identifyPhaseID, excludeQualityClasses, has_spe, \ + pick_linestyle_plt, remove_underscores, check4doubled, identifyPhaseID, excludeQualityClasses, \ check4rotated, transform_colors_mpl, transform_colors_mpl_str, getAutoFilteroptions, check_all_obspy, \ check_all_pylot, real_Bool from pylot.core.util.event import Event @@ -1266,7 +1266,7 @@ class MainWindow(QMainWindow): for phasename, pick in picks.items(): if not type(pick) in [dict, AttribDict]: continue - if getQualityFromUncertainty(has_spe(pick), phaseErrors[self.getPhaseID(phasename)]) < 4: + if getQualityFromUncertainty(pick.get('spe'), phaseErrors[self.getPhaseID(phasename)]) < 4: ma_count[ma] += 1 ma_count_total[ma] += 1 @@ -2998,7 +2998,7 @@ class MainWindow(QMainWindow): for phasename, pick in picks.items(): if not type(pick) in [dict, AttribDict]: continue - if getQualityFromUncertainty(has_spe(pick), phaseErrors[self.getPhaseID(phasename)]) < 4: + if getQualityFromUncertainty(pick.get('spe'), phaseErrors[self.getPhaseID(phasename)]) < 4: ma_count[ma] += 1 ma_count_total[ma] += 1 diff --git a/pylot/core/util/utils.py b/pylot/core/util/utils.py index d848321e..fecd15c8 100644 --- a/pylot/core/util/utils.py +++ b/pylot/core/util/utils.py @@ -1167,20 +1167,6 @@ def identifyPhaseID(phase): return identifyPhase(loopIdentifyPhase(phase)) -def has_spe(pick): - """ - Check for 'spe' key (symmetric picking error) in dict and return its value if found, else return None - :param pick: pick dictionary - :type pick: dict - :return: value of 'spe' key - :rtype: float or None - """ - if not 'spe' in pick.keys(): - return None - else: - return pick['spe'] - - def check_all_obspy(eventlist): ev_type = 'obspydmt' return check_event_folders(eventlist, ev_type)