Not really fixed, but bypassed bug occuring when saving picks and no channel nor station coding is available.
This commit is contained in:
parent
d4dea0d356
commit
1b3fc717a6
@ -1 +1 @@
|
||||
6b7d-dirty
|
||||
d4de-dirty
|
||||
|
@ -294,7 +294,6 @@ class Data(object):
|
||||
:raise OverwriteError: raises an OverwriteError if the picks list is
|
||||
not empty. The GUI will then ask for a decision.
|
||||
"""
|
||||
|
||||
#firstonset = find_firstonset(picks)
|
||||
# check for automatic picks
|
||||
print("Writing phases to ObsPy-quakeml file")
|
||||
|
@ -217,4 +217,4 @@ def create_resourceID(timetohash, restype, authority_id=None, hrstr=None):
|
||||
resID = ope.ResourceIdentifier(restype + '/' + hrstr)
|
||||
if authority_id is not None:
|
||||
resID.convertIDToQuakeMLURI(authority_id=authority_id)
|
||||
return resID
|
||||
return resID
|
||||
|
@ -194,6 +194,7 @@ def picksdict_from_picks(evt):
|
||||
for pick in evt.picks:
|
||||
phase = {}
|
||||
station = pick.waveform_id.station_code
|
||||
channel = pick.waveform_id.channel_code
|
||||
try:
|
||||
onsets = picks[station]
|
||||
except KeyError as e:
|
||||
@ -213,6 +214,7 @@ def picksdict_from_picks(evt):
|
||||
phase['epp'] = epp
|
||||
phase['lpp'] = lpp
|
||||
phase['spe'] = spe
|
||||
phase['channel'] = channel
|
||||
try:
|
||||
picker = str(pick.method_id)
|
||||
if picker.startswith('smi:local/'):
|
||||
@ -232,8 +234,11 @@ def picks_from_picksdict(picks, creation_info=None):
|
||||
if not isinstance(phase, dict):
|
||||
continue
|
||||
onset = phase['mpp']
|
||||
ccode = phase['channel']
|
||||
ncode = phase['network']
|
||||
try:
|
||||
ccode = phase['channel']
|
||||
ncode = phase['network']
|
||||
except:
|
||||
continue
|
||||
pick = ope.Pick()
|
||||
if creation_info:
|
||||
pick.creation_info = creation_info
|
||||
|
Loading…
Reference in New Issue
Block a user