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
|
:raise OverwriteError: raises an OverwriteError if the picks list is
|
||||||
not empty. The GUI will then ask for a decision.
|
not empty. The GUI will then ask for a decision.
|
||||||
"""
|
"""
|
||||||
|
|
||||||
#firstonset = find_firstonset(picks)
|
#firstonset = find_firstonset(picks)
|
||||||
# check for automatic picks
|
# check for automatic picks
|
||||||
print("Writing phases to ObsPy-quakeml file")
|
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)
|
resID = ope.ResourceIdentifier(restype + '/' + hrstr)
|
||||||
if authority_id is not None:
|
if authority_id is not None:
|
||||||
resID.convertIDToQuakeMLURI(authority_id=authority_id)
|
resID.convertIDToQuakeMLURI(authority_id=authority_id)
|
||||||
return resID
|
return resID
|
||||||
|
@ -194,6 +194,7 @@ def picksdict_from_picks(evt):
|
|||||||
for pick in evt.picks:
|
for pick in evt.picks:
|
||||||
phase = {}
|
phase = {}
|
||||||
station = pick.waveform_id.station_code
|
station = pick.waveform_id.station_code
|
||||||
|
channel = pick.waveform_id.channel_code
|
||||||
try:
|
try:
|
||||||
onsets = picks[station]
|
onsets = picks[station]
|
||||||
except KeyError as e:
|
except KeyError as e:
|
||||||
@ -213,6 +214,7 @@ def picksdict_from_picks(evt):
|
|||||||
phase['epp'] = epp
|
phase['epp'] = epp
|
||||||
phase['lpp'] = lpp
|
phase['lpp'] = lpp
|
||||||
phase['spe'] = spe
|
phase['spe'] = spe
|
||||||
|
phase['channel'] = channel
|
||||||
try:
|
try:
|
||||||
picker = str(pick.method_id)
|
picker = str(pick.method_id)
|
||||||
if picker.startswith('smi:local/'):
|
if picker.startswith('smi:local/'):
|
||||||
@ -232,8 +234,11 @@ def picks_from_picksdict(picks, creation_info=None):
|
|||||||
if not isinstance(phase, dict):
|
if not isinstance(phase, dict):
|
||||||
continue
|
continue
|
||||||
onset = phase['mpp']
|
onset = phase['mpp']
|
||||||
ccode = phase['channel']
|
try:
|
||||||
ncode = phase['network']
|
ccode = phase['channel']
|
||||||
|
ncode = phase['network']
|
||||||
|
except:
|
||||||
|
continue
|
||||||
pick = ope.Pick()
|
pick = ope.Pick()
|
||||||
if creation_info:
|
if creation_info:
|
||||||
pick.creation_info = creation_info
|
pick.creation_info = creation_info
|
||||||
|
Loading…
Reference in New Issue
Block a user