From 581a85b81f01f41560fe6c8ee6f8854224ab8518 Mon Sep 17 00:00:00 2001 From: Marcel Paffrath Date: Mon, 26 Jun 2017 13:58:26 +0200 Subject: [PATCH] [bugfix] missing network code in picksdict_from_picks triggered silent Exception using picks generated by picks_from_picksdict --- pylot/core/io/data.py | 2 +- pylot/core/io/phases.py | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/pylot/core/io/data.py b/pylot/core/io/data.py index 98ff0e39..eb424094 100644 --- a/pylot/core/io/data.py +++ b/pylot/core/io/data.py @@ -61,7 +61,7 @@ class Data(object): else: raise e else: # create an empty Event object - self.setNew() + #self.setNew() evtdata = ObsPyEvent() evtdata.picks = [] self.evtdata = evtdata diff --git a/pylot/core/io/phases.py b/pylot/core/io/phases.py index 30f8950c..e513f4b6 100644 --- a/pylot/core/io/phases.py +++ b/pylot/core/io/phases.py @@ -196,6 +196,7 @@ def picksdict_from_picks(evt): phase = {} station = pick.waveform_id.station_code channel = pick.waveform_id.channel_code + network = pick.waveform_id.network_code try: onsets = picks[station] except KeyError as e: @@ -216,6 +217,7 @@ def picksdict_from_picks(evt): phase['lpp'] = lpp phase['spe'] = spe phase['channel'] = channel + phase['network'] = network try: picker = str(pick.method_id) if picker.startswith('smi:local/'):