added PickDlg testwise for onpicked traces

This commit is contained in:
Marcel Paffrath 2017-04-11 15:41:41 +02:00
parent d037e0a1f2
commit 76d4d59ed9
2 changed files with 20 additions and 4 deletions

View File

@ -3,20 +3,36 @@ import matplotlib.pyplot as plt
import numpy as np import numpy as np
import obspy import obspy
from matplotlib import cm from matplotlib import cm
from PySide import QtCore, QtGui from scipy.interpolate import griddata
from matplotlib.backends.backend_qt4agg import NavigationToolbar2QT as NavigationToolbar from matplotlib.backends.backend_qt4agg import NavigationToolbar2QT as NavigationToolbar
from PySide import QtCore, QtGui
#import QtPyLoT #import QtPyLoT
from pylot.core.util.dataprocessing import read_metadata from pylot.core.util.dataprocessing import read_metadata
from scipy.interpolate import griddata from pylot.core.util.widgets import PickDlg
#pf=QtPyLoT.main() #pf=QtPyLoT.main()
def onpick(event): def onpick(event):
ind = event.ind ind = event.ind
if ind == []:
return
data = pf.get_data().getWFData()
for index in ind: for index in ind:
print(station_names[index]) station=str(station_names[index])
try:
pickDlg = PickDlg(pf, infile=pf.getinfile(),
data=data.select(station=station),
station=station,
picks=pf.getPicksOnStation(station, 'manual'),
autopicks=pf.getPicksOnStation(station, 'auto'))
pickDlg.exec_()
except Exception as e:
print('Could not generate Plot for station {st}.\n{er}'.format(st=station, er=e))
def get_metadata(path): def get_metadata(path):
metadata=read_metadata(path) metadata=read_metadata(path)
parser=metadata[1] parser=metadata[1]

View File

@ -1 +1 @@
bf63-dirty d037-dirty