From 76d4d59ed99b2ac79efc32c47426951ce39f3677 Mon Sep 17 00:00:00 2001 From: Marcel Paffrath Date: Tue, 11 Apr 2017 15:41:41 +0200 Subject: [PATCH] added PickDlg testwise for onpicked traces --- map_projection.py | 22 +++++++++++++++++++--- pylot/RELEASE-VERSION | 2 +- 2 files changed, 20 insertions(+), 4 deletions(-) diff --git a/map_projection.py b/map_projection.py index 5df8c004..5399c0d5 100644 --- a/map_projection.py +++ b/map_projection.py @@ -3,20 +3,36 @@ import matplotlib.pyplot as plt import numpy as np import obspy from matplotlib import cm -from PySide import QtCore, QtGui +from scipy.interpolate import griddata from matplotlib.backends.backend_qt4agg import NavigationToolbar2QT as NavigationToolbar +from PySide import QtCore, QtGui #import QtPyLoT from pylot.core.util.dataprocessing import read_metadata -from scipy.interpolate import griddata +from pylot.core.util.widgets import PickDlg + #pf=QtPyLoT.main() def onpick(event): ind = event.ind + if ind == []: + return + data = pf.get_data().getWFData() 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): metadata=read_metadata(path) parser=metadata[1] diff --git a/pylot/RELEASE-VERSION b/pylot/RELEASE-VERSION index 03d77fb3..565d4c71 100644 --- a/pylot/RELEASE-VERSION +++ b/pylot/RELEASE-VERSION @@ -1 +1 @@ -bf63-dirty +d037-dirty