[bugfix] delete picks after jk/wadati not working

This commit is contained in:
Marcel Paffrath 2017-09-05 15:03:03 +02:00
parent c6105330e0
commit 88bf4c8f67
2 changed files with 7 additions and 3 deletions

View File

@ -1,3 +1,6 @@
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import matplotlib.pyplot as plt import matplotlib.pyplot as plt
import numpy as np import numpy as np
import obspy import obspy
@ -13,6 +16,7 @@ plt.interactive(False)
class map_projection(QtGui.QWidget): class map_projection(QtGui.QWidget):
def __init__(self, parent, figure=None): def __init__(self, parent, figure=None):
''' '''
:param: picked, can be False, auto, manual :param: picked, can be False, auto, manual
:value: str :value: str
''' '''

View File

@ -2027,7 +2027,7 @@ class PickDlg(QDialog):
for picktype in allpicks.keys(): for picktype in allpicks.keys():
picks = allpicks[picktype] picks = allpicks[picktype]
for phase in picks: for phase in picks:
if not type(phase) in [dict, AttribDict]: if not type(picks[phase]) in [dict, AttribDict]:
continue continue
pick_rel = picks[phase]['mpp'] - starttime pick_rel = picks[phase]['mpp'] - starttime
# add relative pick time, phaseID and picktype index # add relative pick time, phaseID and picktype index
@ -2039,8 +2039,8 @@ class PickDlg(QDialog):
# delete the value from corresponding dictionary # delete the value from corresponding dictionary
allpicks[picktype].pop(phase) allpicks[picktype].pop(phase)
# information output # information output
msg = 'Deleted {} pick for phase {}, {}[s] from starttime {}' msg = 'Deleted {} pick for phase {}, at timestamp {} (relative time: {} s)'
print(msg.format(picktype, phase, pick_rel, starttime)) print(msg.format(picktype, phase, starttime+pick_rel, pick_rel))
self.setDirty(True) self.setDirty(True)
def drawPhaseText(self): def drawPhaseText(self):