[bugfix] delete picks after jk/wadati not working
This commit is contained in:
parent
c6105330e0
commit
88bf4c8f67
@ -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
|
||||||
'''
|
'''
|
||||||
|
@ -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):
|
||||||
|
Loading…
Reference in New Issue
Block a user