non-working commit of autoPyLoT functionality in overview window
This commit is contained in:
1 parent
120f2743d2
commit
398a25f902
5 files changed
+80
-28
No files matched your search
+33
-5
@@ -34,15 +34,16 @@ from PySide.QtCore import QCoreApplication, QSettings, Signal, QFile, \
|
|||||||
from PySide.QtGui import QMainWindow, QInputDialog, QIcon, QFileDialog, \
|
from PySide.QtGui import QMainWindow, QInputDialog, QIcon, QFileDialog, \
|
||||||
QWidget, QHBoxLayout, QStyle, QKeySequence, QLabel, QFrame, QAction, \
|
QWidget, QHBoxLayout, QStyle, QKeySequence, QLabel, QFrame, QAction, \
|
||||||
QDialog, QErrorMessage, QApplication, QPixmap, QMessageBox, QSplashScreen, \
|
QDialog, QErrorMessage, QApplication, QPixmap, QMessageBox, QSplashScreen, \
|
||||||
QActionGroup
|
QActionGroup, QListWidget
|
||||||
import numpy as np
|
import numpy as np
|
||||||
from obspy.core import UTCDateTime
|
from obspy.core import UTCDateTime
|
||||||
|
|
||||||
from pylot.core.read import Data, FilterOptions
|
from pylot.core.read import Data, FilterOptions, AutoPickParameter
|
||||||
from pylot.core.util import _getVersionString, FILTERDEFAULTS, fnConstructor, \
|
from pylot.core.util import _getVersionString, FILTERDEFAULTS, fnConstructor, \
|
||||||
checkurl, FormatError, FilterOptionsDialog, \
|
checkurl, FormatError, FilterOptionsDialog, \
|
||||||
NewEventDlg, createEvent, MPLWidget, PropertiesDlg, HelpForm, \
|
NewEventDlg, createEvent, MPLWidget, PropertiesDlg, HelpForm, \
|
||||||
DatastructureError, createAction, getLogin, createCreationInfo, PickDlg
|
DatastructureError, createAction, getLogin, createCreationInfo, PickDlg
|
||||||
|
from pylot.core.util.thread import WorkerThread
|
||||||
from pylot.core.util.structure import DATASTRUCTURE
|
from pylot.core.util.structure import DATASTRUCTURE
|
||||||
import icons_rc
|
import icons_rc
|
||||||
|
|
||||||
@@ -147,11 +148,13 @@ class MainWindow(QMainWindow):
|
|||||||
filter_icon = QIcon()
|
filter_icon = QIcon()
|
||||||
filter_icon.addPixmap(QPixmap(':/icons/filter.png'))
|
filter_icon.addPixmap(QPixmap(':/icons/filter.png'))
|
||||||
z_icon = QIcon()
|
z_icon = QIcon()
|
||||||
z_icon.addPixmap((QPixmap(':/icons/key_Z.png')))
|
z_icon.addPixmap(QPixmap(':/icons/key_Z.png'))
|
||||||
n_icon = QIcon()
|
n_icon = QIcon()
|
||||||
n_icon.addPixmap((QPixmap(':/icons/key_N.png')))
|
n_icon.addPixmap(QPixmap(':/icons/key_N.png'))
|
||||||
e_icon = QIcon()
|
e_icon = QIcon()
|
||||||
e_icon.addPixmap((QPixmap(':/icons/key_E.png')))
|
e_icon.addPixmap(QPixmap(':/icons/key_E.png'))
|
||||||
|
auto_icon = QIcon()
|
||||||
|
auto_icon.addPixmap(QPixmap(':/icons/sync.png'))
|
||||||
|
|
||||||
newEventAction = self.createAction(self, "&New event ...",
|
newEventAction = self.createAction(self, "&New event ...",
|
||||||
self.createNewEvent,
|
self.createNewEvent,
|
||||||
@@ -261,6 +264,17 @@ class MainWindow(QMainWindow):
|
|||||||
componentToolBar.setObjectName("PhaseTools")
|
componentToolBar.setObjectName("PhaseTools")
|
||||||
self.addActions(componentToolBar, componentActions)
|
self.addActions(componentToolBar, componentActions)
|
||||||
|
|
||||||
|
auto_pick = self.createAction(parent=self, text='autoPick',
|
||||||
|
slot=self.autoPick, shortcut='Alt+Ctrl+A',
|
||||||
|
icon=auto_icon, tip='Automatically pick'
|
||||||
|
' the entire dataset'
|
||||||
|
' displayed!',
|
||||||
|
checkable=False)
|
||||||
|
|
||||||
|
autoPickToolBar = self.addToolBar("autoPyLoT")
|
||||||
|
autoPickActions = (auto_pick,)
|
||||||
|
self.addActions(autoPickToolBar, autoPickActions)
|
||||||
|
|
||||||
# pickToolBar = self.addToolBar("PickTools")
|
# pickToolBar = self.addToolBar("PickTools")
|
||||||
# pickToolActions = (selectStation, )
|
# pickToolActions = (selectStation, )
|
||||||
# pickToolBar.setObjectName("PickTools")
|
# pickToolBar.setObjectName("PickTools")
|
||||||
@@ -570,6 +584,20 @@ class MainWindow(QMainWindow):
|
|||||||
else:
|
else:
|
||||||
self.updateStatus('picks discarded ({0})'.format(station))
|
self.updateStatus('picks discarded ({0})'.format(station))
|
||||||
|
|
||||||
|
def autoPick(self):
|
||||||
|
list = QListWidget()
|
||||||
|
autopick_parameter = AutoPickParameter('autoPyLoT_local.in')
|
||||||
|
list.addItem(str(autopick_parameter))
|
||||||
|
|
||||||
|
# Create the worker thread and run it
|
||||||
|
self.thread = WorkerThread(parent=self,
|
||||||
|
func=autopickevent,
|
||||||
|
data=self.getData().getWFData(),
|
||||||
|
param=autopick_parameter)
|
||||||
|
self.thread.message.connect(list.addItem)
|
||||||
|
self.thread.start()
|
||||||
|
|
||||||
|
|
||||||
def addPicks(self, station, picks):
|
def addPicks(self, station, picks):
|
||||||
stat_picks = self.getPicksOnStation(station)
|
stat_picks = self.getPicksOnStation(station)
|
||||||
if not stat_picks:
|
if not stat_picks:
|
||||||
|
|||||||
@@ -15,6 +15,7 @@
|
|||||||
<file>icons/key_W.png</file>
|
<file>icons/key_W.png</file>
|
||||||
<file>icons/key_Z.png</file>
|
<file>icons/key_Z.png</file>
|
||||||
<file>icons/filter.png</file>
|
<file>icons/filter.png</file>
|
||||||
|
<file>icons/sync.png</file>
|
||||||
<file>icons/zoom_in.png</file>
|
<file>icons/zoom_in.png</file>
|
||||||
<file>icons/zoom_out.png</file>
|
<file>icons/zoom_out.png</file>
|
||||||
<file>splash/splash.png</file>
|
<file>splash/splash.png</file>
|
||||||
|
|||||||
+4
-4
@@ -2,16 +2,16 @@
|
|||||||
|
|
||||||
# Resource object code
|
# Resource object code
|
||||||
#
|
#
|
||||||
# Created: Di. Juli 7 11:48:47 2015
|
# Created: Do. Juli 9 09:55:07 2015
|
||||||
# by: The Resource Compiler for PySide (Qt v4.8.6)
|
# by: The Resource Compiler for PySide (Qt v4.8.6)
|
||||||
#
|
#
|
||||||
# WARNING! All changes made in this file will be lost!
|
# WARNING! All changes made in this file will be lost!
|
||||||
|
|
||||||
from PySide import QtCore
|
from PySide import QtCore
|
||||||
|
|
||||||
qt_resource_data = "\x00\x00\x9e\x04\x89PNG\x0d\x0a\x1a\x0a\x00\x00\x00\x0dIHDR\x00\x00\x02\x80\x00\x00\x01\x00\x08\x06\x00\x00\x00#\x95\xc7f\x00\x00\x00\x06bKGD\x00\xff\x00\xff\x00\xff\xa0\xbd\xa7\x93\x00\x00\x00\x09pHYs\x00\x00\x17\x12\x00\x00\x17\x12\x01g\x9f\xd2R\x00\x00\x00\x07tIME\x07\xdf\x07\x07\x090\x11\xbal\xcd}\x00\x00 \x00IDATx\xda\xec}w\x94\x5c\xe5y\xfe3w\xee\xf4\x99\x9d\xb2\xb3;\xdb\x9bV\xbb*+\xd1-\x0c\xa2\x83\xb0\x0d\x1cSbL\xe28v0v|lp\x0eq\x09\x04\x88c\x1cl\x9c\xe08\x80K\x82c\xe3\xb8!sL\x5c\xe4P\x02\x18\x04\x085TWm{/\xb3\xd3{\xbf\xf3\xfbC\xbf\xf7\xf3\x9d\xbb\xb3\xb3\xbb\xd2\xae\xb4\xda\xfd\x9est\xa4\x1d\xcd\xcc\xce|\xed}\xbe\xe7m\xaa|>\x9f\x07\x07\x07\x07\x07\x07\xc79\x8c|>\x8fT*\x85\xed\xdb\xb7#\x95J!\x97\xcb\xe1\xb6\xdbn\x83$I\x10\x04\x81\x0f\x10\x07\x87\x02|Wppppp\x9c\xf3P\xa9T\xc8\xe7\xf3\xc8\xe7\xf3P\xa9T\xc8\xe5r|P888\x01\xe4\xe0\xe0\xe0\xe0X\xee\xe0\x0e-\x0e\x0eN\x009888888888\x01\xe4\xe0\xe0\xe0\xe0X\xee\xe0* \x07\x07'\x80\x1c\x1c\x1c\x1c\x1c\x9c\xfcqppp\x02\xc8\xc1\xc1\xc1\xc1\xc1I \x07\x07\x07'\x80\x1c\x1c\x1c\x1c\x1c\x9c\xfcqpp\x02\xc8\xc1\xc1\xc1\xc1\xc1\xc1\x09 \x07\x07'\x80\x1c\x1c\x1c\x1c\x1c\x1c\x1c\x1c\x1c\x9c\x00rppppp,%P!h\x0e\x0e\x0eN\x009888888888\x01\xe4\xe0\xe0\xe0\xe0\xe0\xe0\xe0\xe0\x04\x90\x83\x83\x83\x83\x83\xe3\x9c\x07w\x01spp\x02\xc8\xc1\xc1\xc1\xc1\xc1\x01\x95J\xc5\x07\x81\x83\x83\x13@\x0e\x0e\x0e\x0e\x8e\xe5\x0aI\x92\xb8\x02\xc8\xc1\xc1\x09 \x07\x07\x07\x07\xc7J\x05W\xfe888\x01\xe4\xe0\xe0\xe0\xe0\xe0\xe0\xe0\xe0\xe0\x04\x90\x83\x83\x83\x83c\xb9A\xe9\xfe\x95$\x89\x0f\x0a\x07\x07'\x80\x1c\x1c\x1c\x1c\x1c\xcb\x9d\x00\xcaI\x1f\x8f\x07\xe4\xe0\xe0\x04\x90\x83\x83\x83\x83c\x05\x10@\xe5\xcf<\x16\x90\x83\x83\x13@\x0e\x0e\x0e\x0e\x8e\x15D\x02\xb9\x02\xc8\xc1\xc1\x09 \x07\x07\x07\x07\xc7\x0a \x7fr\xc5\x8f\x13@\x0e\x0eN\x0098888V\x08\x09\xe4\x04\x90\x83\x83\x13@\x0e\x0e\x0e\x0e\x8e\x15D\xfe\xe4\xa4\x8fg\x01spp\x02\xc8\xc1\xc1\xc1\xc1\xb1\x02\x08 A\xa5Rq\x05\x90\x83\x83\x13@\x0e\x0e\x0e\x0e\x8e\x95F\x029\x01\xe4\xe0\xe0\x04\x90\x83\x83\x83\x83c\x05\x91?N\x00988\x01\xe4\xe0\xe0\xe0\xe0X!\x04\x90\xc7\x00rpp\x02\xc8\xc1\xc1\xc1\xc1\xb1\x02\x09 \x95\x82\xe1\x0a \x07\x07'\x80\x1c\x1c\x1c\x1c\x1c+\x0cR\x9e+\x80\x1c\x1c\x9c\x00rpppp\xac(p\x05\x90\x83\x83\x13@\x0e\x0e\x0e\x0e\x8e\x15F\xfc\xf2\x12'\x80\x1c\x1c\x9c\x00rpppp\xacH\x22\xc8\xc1\xc1\xc1\x09 \x07\x07\x07\x07\x07'\x80\x1c\x1c\x9c\x00\xf2!\xe0\xe0\xe0\xe0\xe0Xn\xe0\x9d@888\x01\xe4\xe0\xe0\xe0\xe0X\x81\xe0\x04\x90\x83\x83\x13@\x0e\x0e\x0e\x0e\x8e\x15\x86\x5c.\xc7\x07\x81\x83\x83\x13@\x0e\x0e\x0e\x0e\x0e\x0e\x0e\x0e\x0eN\x0098888\x96-x+8\x0e\x0eN\x0098888V\x18x\x0c \x07\x07'\x80\x1c\x1c\x1c\x1c\x1c+\x0c\x5c\x01\xe4\xe0\xe0\x04\x90\x83\x83\x83\x83c\x85\x81+\x80\x1c\x1c\x9c\x00rpppp\xac \xf0:\x80\x1c\x1c\x9c\x00rpppp\xac@p\x02\xc8\xc1\xc1\x09 \x07\x07\x07\x07\xc7\x0a\x03\x8f\x01\xe4\xe0\xe0\x04\x90\x83\x83\x83\x83\x83\x13@\x0e\x0e\x0eN\x0098888\x963\xb8\x0b\x98\x83\x83\x13@\x0e\x0e\x0e\x0e\x8e\x15\x04\x95J\x85L&\xc3\x07\x82\x83\x83\x13@\x0e\x0e\x0e\x0e\x8e\x95\x04\xde\x0b\x98\x83cf\x88\x8b\xf5\xc6$\xbds\x09~\xf1o\xb9\xf2\xbf\xf3\xf9<\xfb7\x07\xc7b\xedm\xf9:+\xb5\xc7\xe9y\xf4\xb7r\xbdrpp\xfc\x09\x14\xb3\xc8K\xd8,\xdf\xb3S~n\xe6\xf3y\xa8\xd5\xeai\xf6\xfc\x9c$\x80\xf9|\x1e\xd9l\x16*\x95\x0a\x92$A\x92\xa4i\xc6\x82c\xe1\x17\x92\xdc\xb0\x0a\x82P\xf0X\xb1\xe7pp\x9c*\xe9\xa3}M\xc6\xaa\xd4\xfe\xce\xe7\xf3\xc8\xe5r\x10\x04\x81\xad?A\x10\xa0V\xab\xa1R\xa9\x0a\x0e>\x0e\x8e\x85\x14\x1e\x94\x84j\xa9\x93>I\x92\x98ZI{\x8a\xdb\xcd\xe5\xb76%I\x82J\xa5*8\x17\xe9L\x14\x04\x81\xfd9\xe7\x08`6\x9bE6\x9b\x85$I\xc8d2H\xa5R\xecg2\x14\x1c\x0b\x07Z<D\xeeh\xe1\xd0BR\xfeM7\x0d\x95J\x05Q\x14\xcf\xcam\x83\xe3\xdc>\xb8$IB:\x9d\x86$Il\x7fg\xb3Y\xf6\xff\xc5@\x97\xc1|>\x0f\xadV\x0b\xbd^\x0f\xbd^\x0f\xadV\x0b\x00\x9c\x04r,\x0a\x01\xa4\xbf\x97\xba\x0b8\x9b\xcd\x02\x002\x99\x0c\xb2\xd9,2\x99\x0c\xd2\xe94r\xb9\x5c\xc1e\x8bcy\x81\xe6W\xa3\xd1@\x14E\x98\xcdfh\xb5Zh\xb5\xda3J\xfc\xc5\x85\xfa2\xf4'\x1e\x8f#\x1c\x0e#\x1c\x0e#\x16\x8b!\x99L\x22\x97\xcbq\x02\xb8\xc0 \x05EN\xfch1i\xb5Zh4\x1ah4\x1ah\xb5Z\xf6\x98(\x8aP\xab\xd5\x10E\x11*\x95\x0a\x1a\x8d\xa6@1\xe4\xe0(\xa5R\xa4\xd3i\xa4\xd3i\xb6\xbf#\x91\x08\x92\xc9$\xbb\xe8\x15\x83Z\xadfF\xd8h4\xc2n\xb7\xa3\xbc\xbc\x1cv\xbb\x1d\x1a\x8d\x86\x0f,\xc7\xa2\x13\xac\x5c.\xb7\xa4/\x1a\x99L\x06\x89D\x02\x89D\x02\xa1P\x08\xe1p\x18\x89D\x02\x99L\x86\x13\xc0eL\x00\xb3\xd9,DQ\x84\xd5jEyy9\x9cN',\x16\x0b4\x1a\xcd\x19[\xaf\xe2B~\xa1X,\x86`0\x88\xee\xeenx\xbd^\xf6E\xe4j\x15\xc7\xc2\x19\xe4h4\xca\x16\x92\x5ce\x15E\x11\x06\x83\x01&\x93\x09v\xbb\x1dF\xa3\x11F\xa3\x11z\xbd\x1e:\x9d\x0ez\xbd\x9e\x91C\xadV\x0bA\x10\x18)\xe4\xf3\xc4QLU\xc9\xe5rH\xa7\xd3\x08\x06\x83\xe8\xeb\xeb\xc3\xe8\xe8(\xbbP\x90\xb2\x5c\x0c\xf1x\x1c{\xf7\xeeE,\x16Css3\xd6\xaf_\x8f\x96\x96\x16\x08\x82\x00\xbb\xdd^\xf2\xb5\x1c\x1c\xa7z9\x96\x9f\x93K\x95\x00\x92r\x9eN\xa7\x11\x8dF1>>\x8e\xae\xae.\xe6\xa5!\xdb\xc9\xb1\xfc\xce\xd2\xfd\xfb\xf7cxx\x18v\xbb\x1d\xabW\xaf\xc6\xfa\xf5\xeb!\x08\x02\x13e\xce\x19\x02H_(\x9b\xcd\x22\x16\x8badd\x04\x95\x95\x95\xb8\xfa\xea\xab\x0bT*\x8e\x85_Hr\xfLine truncated
|
qt_resource_data = "\x00\x00\x9e\x04\x89PNG\x0d\x0a\x1a\x0a\x00\x00\x00\x0dIHDR\x00\x00\x02\x80\x00\x00\x01\x00\x08\x06\x00\x00\x00#\x95\xc7f\x00\x00\x00\x06bKGD\x00\xff\x00\xff\x00\xff\xa0\xbd\xa7\x93\x00\x00\x00\x09pHYs\x00\x00\x17\x12\x00\x00\x17\x12\x01g\x9f\xd2R\x00\x00\x00\x07tIME\x07\xdf\x07\x07\x090\x11\xbal\xcd}\x00\x00 \x00IDATx\xda\xec}w\x94\x5c\xe5y\xfe3w\xee\xf4\x99\x9d\xb2\xb3;\xdb\x9bV\xbb*+\xd1-\x0c\xa2\x83\xb0\x0d\x1cSbL\xe28v0v|lp\x0eq\x09\x04\x88c\x1cl\x9c\xe08\x80K\x82c\xe3\xb8!sL\x5c\xe4P\x02\x18\x04\x085TWm{/\xb3\xd3{\xbf\xf3\xfbC\xbf\xf7\xf3\x9d\xbb\xb3\xb3\xbb\xd2\xae\xb4\xda\xfd\x9est\xa4\x1d\xcd\xcc\xce|\xed}\xbe\xe7m\xaa|>\x9f\x07\x07\x07\x07\x07\x07\xc79\x8c|>\x8fT*\x85\xed\xdb\xb7#\x95J!\x97\xcb\xe1\xb6\xdbn\x83$I\x10\x04\x81\x0f\x10\x07\x87\x02|Wppppp\x9c\xf3P\xa9T\xc8\xe7\xf3\xc8\xe7\xf3P\xa9T\xc8\xe5r|P888\x01\xe4\xe0\xe0\xe0\xe0X\xee\xe0\x0e-\x0e\x0eN\x009888888888\x01\xe4\xe0\xe0\xe0\xe0X\xee\xe0* \x07\x07'\x80\x1c\x1c\x1c\x1c\x1c\x9c\xfcqppp\x02\xc8\xc1\xc1\xc1\xc1\xc1I \x07\x07\x07'\x80\x1c\x1c\x1c\x1c\x1c\x9c\xfcqpp\x02\xc8\xc1\xc1\xc1\xc1\xc1\xc1\x09 \x07\x07'\x80\x1c\x1c\x1c\x1c\x1c\x1c\x1c\x1c\x1c\x9c\x00rppppp,%P!h\x0e\x0e\x0eN\x009888888888\x01\xe4\xe0\xe0\xe0\xe0\xe0\xe0\xe0\xe0\x04\x90\x83\x83\x83\x83\x83\xe3\x9c\x07w\x01spp\x02\xc8\xc1\xc1\xc1\xc1\xc1\x01\x95J\xc5\x07\x81\x83\x83\x13@\x0e\x0e\x0e\x0e\x8e\xe5\x0aI\x92\xb8\x02\xc8\xc1\xc1\x09 \x07\x07\x07\x07\xc7J\x05W\xfe888\x01\xe4\xe0\xe0\xe0\xe0\xe0\xe0\xe0\xe0\xe0\x04\x90\x83\x83\x83\x83c\xb9A\xe9\xfe\x95$\x89\x0f\x0a\x07\x07'\x80\x1c\x1c\x1c\x1c\x1c\xcb\x9d\x00\xcaI\x1f\x8f\x07\xe4\xe0\xe0\x04\x90\x83\x83\x83\x83c\x05\x10@\xe5\xcf<\x16\x90\x83\x83\x13@\x0e\x0e\x0e\x0e\x8e\x15D\x02\xb9\x02\xc8\xc1\xc1\x09 \x07\x07\x07\x07\xc7\x0a \x7fr\xc5\x8f\x13@\x0e\x0eN\x0098888V\x08\x09\xe4\x04\x90\x83\x83\x13@\x0e\x0e\x0e\x0e\x8e\x15D\xfe\xe4\xa4\x8fg\x01spp\x02\xc8\xc1\xc1\xc1\xc1\xb1\x02\x08 A\xa5Rq\x05\x90\x83\x83\x13@\x0e\x0e\x0e\x0e\x8e\x95F\x029\x01\xe4\xe0\xe0\x04\x90\x83\x83\x83\x83c\x05\x91?N\x00988\x01\xe4\xe0\xe0\xe0\xe0X!\x04\x90\xc7\x00rpp\x02\xc8\xc1\xc1\xc1\xc1\xb1\x02\x09 \x95\x82\xe1\x0a \x07\x07'\x80\x1c\x1c\x1c\x1c\x1c+\x0cR\x9e+\x80\x1c\x1c\x9c\x00rpppp\xac(p\x05\x90\x83\x83\x13@\x0e\x0e\x0e\x0e\x8e\x15F\xfc\xf2\x12'\x80\x1c\x1c\x9c\x00rpppp\xacH\x22\xc8\xc1\xc1\xc1\x09 \x07\x07\x07\x07\x07'\x80\x1c\x1c\x9c\x00\xf2!\xe0\xe0\xe0\xe0\xe0Xn\xe0\x9d@888\x01\xe4\xe0\xe0\xe0\xe0X\x81\xe0\x04\x90\x83\x83\x13@\x0e\x0e\x0e\x0e\x8e\x15\x86\x5c.\xc7\x07\x81\x83\x83\x13@\x0e\x0e\x0e\x0e\x0e\x0e\x0e\x0e\x0eN\x0098888\x96-x+8\x0e\x0eN\x0098888V\x18x\x0c \x07\x07'\x80\x1c\x1c\x1c\x1c\x1c+\x0c\x5c\x01\xe4\xe0\xe0\x04\x90\x83\x83\x83\x83c\x85\x81+\x80\x1c\x1c\x9c\x00rpppp\xac \xf0:\x80\x1c\x1c\x9c\x00rpppp\xac@p\x02\xc8\xc1\xc1\x09 \x07\x07\x07\x07\xc7\x0a\x03\x8f\x01\xe4\xe0\xe0\x04\x90\x83\x83\x83\x83\x83\x13@\x0e\x0e\x0eN\x0098888\x963\xb8\x0b\x98\x83\x83\x13@\x0e\x0e\x0e\x0e\x8e\x15\x04\x95J\x85L&\xc3\x07\x82\x83\x83\x13@\x0e\x0e\x0e\x0e\x8e\x95\x04\xde\x0b\x98\x83cf\x88\x8b\xf5\xc6$\xbds\x09~\xf1o\xb9\xf2\xbf\xf3\xf9<\xfb7\x07\xc7b\xedm\xf9:+\xb5\xc7\xe9y\xf4\xb7r\xbdrpp\xfc\x09\x14\xb3\xc8K\xd8,\xdf\xb3S~n\xe6\xf3y\xa8\xd5\xeai\xf6\xfc\x9c$\x80\xf9|\x1e\xd9l\x16*\x95\x0a\x92$A\x92\xa4i\xc6\x82c\xe1\x17\x92\xdc\xb0\x0a\x82P\xf0X\xb1\xe7pp\x9c*\xe9\xa3}M\xc6\xaa\xd4\xfe\xce\xe7\xf3\xc8\xe5r\x10\x04\x81\xad?A\x10\xa0V\xab\xa1R\xa9\x0a\x0e>\x0e\x8e\x85\x14\x1e\x94\x84j\xa9\x93>I\x92\x98ZI{\x8a\xdb\xcd\xe5\xb76%I\x82J\xa5*8\x17\xe9L\x14\x04\x81\xfd9\xe7\x08`6\x9bE6\x9b\x85$I\xc8d2H\xa5R\xecg2\x14\x1c\x0b\x07Z<D\xeeh\xe1\xd0BR\xfeM7\x0d\x95J\x05Q\x14\xcf\xcam\x83\xe3\xdc>\xb8$IB:\x9d\x86$Il\x7fg\xb3Y\xf6\xff\xc5@\x97\xc1|>\x0f\xadV\x0b\xbd^\x0f\xbd^\x0f\xadV\x0b\x00\x9c\x04r,\x0a\x01\xa4\xbf\x97\xba\x0b8\x9b\xcd\x02\x002\x99\x0c\xb2\xd9,2\x99\x0c\xd2\xe94r\xb9\x5c\xc1e\x8bcy\x81\xe6W\xa3\xd1@\x14E\x98\xcdfh\xb5Zh\xb5\xda3J\xfc\xc5\x85\xfa2\xf4'\x1e\x8f#\x1c\x0e#\x1c\x0e#\x16\x8b!\x99L\x22\x97\xcbq\x02\xb8\xc0 \x05EN\xfch1i\xb5Zh4\x1ah4\x1ah\xb5Z\xf6\x98(\x8aP\xab\xd5\x10E\x11*\x95\x0a\x1a\x8d\xa6@1\xe4\xe0(\xa5R\xa4\xd3i\xa4\xd3i\xb6\xbf#\x91\x08\x92\xc9$\xbb\xe8\x15\x83Z\xadfF\xd8h4\xc2n\xb7\xa3\xbc\xbc\x1cv\xbb\x1d\x1a\x8d\x86\x0f,\xc7\xa2\x13\xac\x5c.\xb7\xa4/\x1a\x99L\x06\x89D\x02\x89D\x02\xa1P\x08\xe1p\x18\x89D\x02\x99L\x86\x13\xc0eL\x00\xb3\xd9,DQ\x84\xd5jEyy9\x9cN',\x16\x0b4\x1a\xcd\x19[\xaf\xe2B~\xa1X,\x86`0\x88\xee\xeenx\xbd^\xf6E\xe4j\x15\xc7\xc2\x19\xe4h4\xca\x16\x92\x5ce\x15E\x11\x06\x83\x01&\x93\x09v\xbb\x1dF\xa3\x11F\xa3\x11z\xbd\x1e:\x9d\x0ez\xbd\x9e\x91C\xadV\x0bA\x10\x18)\xe4\xf3\xc4QLU\xc9\xe5rH\xa7\xd3\x08\x06\x83\xe8\xeb\xeb\xc3\xe8\xe8(\xbbP\x90\xb2\x5c\x0c\xf1x\x1c{\xf7\xeeE,\x16Css3\xd6\xaf_\x8f\x96\x96\x16\x08\x82\x00\xbb\xdd^\xf2\xb5\x1c\x1c\xa7z9\x96\x9f\x93K\x95\x00\x92r\x9eN\xa7\x11\x8dF1>>\x8e\xae\xae.\xe6\xa5!\xdb\xc9\xb1\xfc\xce\xd2\xfd\xfb\xf7cxx\x18v\xbb\x1d\xabW\xaf\xc6\xfa\xf5\xeb!\x08\x02\x13e\xce\x19\x02H_(\x9b\xcd\x22\x16\x8badd\x04\x95\x95\x95\xb8\xfa\xea\xab\x0bT*\x8e\x85_Hr\xfLine truncated
|
||||||
qt_resource_name = "\x00\x04\x00\x06\xec0\x00h\x00e\x00l\x00p\x00\x05\x00o\xa6S\x00i\x00c\x00o\x00n\x00s\x00\x06\x07\xa7(\x98\x00s\x00p\x00l\x00a\x00s\x00h\x00\x0a\x08\x94\x19\x07\x00s\x00p\x00l\x00a\x00s\x00h\x00.\x00p\x00n\x00g\x00\x09\x0fA\xb4\xc7\x00k\x00e\x00y\x00_\x00N\x00.\x00p\x00n\x00g\x00\x09\x0fC\xb4\xc7\x00k\x00e\x00y\x00_\x00P\x00.\x00p\x00n\x00g\x00\x09\x0fD\xb4\xc7\x00k\x00e\x00y\x00_\x00Q\x00.\x00p\x00n\x00g\x00\x0a\x0a\xc8\xf7'\x00f\x00i\x00l\x00t\x00e\x00r\x00.\x00p\x00n\x00g\x00\x09\x03g\xa7G\x00p\x00y\x00l\x00o\x00t\x00.\x00p\x00n\x00g\x00\x09\x0fE\xb4\xc7\x00k\x00e\x00y\x00_\x00R\x00.\x00p\x00n\x00g\x00\x09\x0fF\xb4\xc7\x00k\x00e\x00y\x00_\x00S\x00.\x00p\x00n\x00g\x00\x09\x0fG\xb4\xc7\x00k\x00e\x00y\x00_\x00T\x00.\x00p\x00n\x00g\x00\x09\x0fH\xb4\xc7\x00k\x00e\x00y\x00_\x00U\x00.\x00p\x00n\x00g\x00\x09\x0f8\xb4\xc7\x00k\x00e\x00y\x00_\x00E\x00.\x00p\x00n\x00g\x00\x09\x0fI\xb4\xc7\x00k\x00e\x00y\x00_\x00V\x00.\x00p\x00n\x00g\x00\x09\x0fJ\xb4\xc7\x00k\x00e\x00y\x00_\x00W\x00.\x00p\x00n\x00g\x00\x0c\x06\xeb\x91\xa7\x00z\x00o\x00o\x00m\x00_\x00o\x00u\x00t\x00.\x00p\x00n\x00g\x00\x0b\x0a*w\xe7\x00p\x00r\x00i\x00n\x00t\x00e\x00r\x00.\x00p\x00n\x00g\x00\x09\x0fM\xb4\xc7\x00k\x00e\x00y\x00_\x00Z\x00.\x00p\x00n\x00g\x00\x09\x03g\xbf\x9f\x00p\x00y\x00l\x00o\x00t\x00.\x00i\x00c\x00o\x00\x0b\x05\x03\x9b'\x00z\x00o\x00o\x00m\x00_\x00i\x00n\x00.\x00p\x00n\x00g\x00\x0a\x0c\xba\xf2|\x00i\x00n\x00d\x00e\x00x\x00.\x00h\x00t\x00m\x00l"
|
qt_resource_name = "\x00\x04\x00\x06\xec0\x00h\x00e\x00l\x00p\x00\x05\x00o\xa6S\x00i\x00c\x00o\x00n\x00s\x00\x06\x07\xa7(\x98\x00s\x00p\x00l\x00a\x00s\x00h\x00\x0a\x08\x94\x19\x07\x00s\x00p\x00l\x00a\x00s\x00h\x00.\x00p\x00n\x00g\x00\x09\x0fG\xb4\xc7\x00k\x00e\x00y\x00_\x00T\x00.\x00p\x00n\x00g\x00\x09\x0fC\xb4\xc7\x00k\x00e\x00y\x00_\x00P\x00.\x00p\x00n\x00g\x00\x09\x03g\xa7G\x00p\x00y\x00l\x00o\x00t\x00.\x00p\x00n\x00g\x00\x09\x0fH\xb4\xc7\x00k\x00e\x00y\x00_\x00U\x00.\x00p\x00n\x00g\x00\x09\x0fD\xb4\xc7\x00k\x00e\x00y\x00_\x00Q\x00.\x00p\x00n\x00g\x00\x0a\x0a\xc8\xf7'\x00f\x00i\x00l\x00t\x00e\x00r\x00.\x00p\x00n\x00g\x00\x09\x0f8\xb4\xc7\x00k\x00e\x00y\x00_\x00E\x00.\x00p\x00n\x00g\x00\x0b\x0a*w\xe7\x00p\x00r\x00i\x00n\x00t\x00e\x00r\x00.\x00p\x00n\x00g\x00\x0c\x06\xeb\x91\xa7\x00z\x00o\x00o\x00m\x00_\x00o\x00u\x00t\x00.\x00p\x00n\x00g\x00\x09\x0fM\xb4\xc7\x00k\x00e\x00y\x00_\x00Z\x00.\x00p\x00n\x00g\x00\x0b\x05\x03\x9b'\x00z\x00o\x00o\x00m\x00_\x00i\x00n\x00.\x00p\x00n\x00g\x00\x09\x0fI\xb4\xc7\x00k\x00e\x00y\x00_\x00V\x00.\x00p\x00n\x00g\x00\x09\x0fE\xb4\xc7\x00k\x00e\x00y\x00_\x00R\x00.\x00p\x00n\x00g\x00\x09\x0fA\xb4\xc7\x00k\x00e\x00y\x00_\x00N\x00.\x00p\x00n\x00g\x00\x09\x03g\xbf\x9f\x00p\x00y\x00l\x00o\x00t\x00.\x00i\x00c\x00o\x00\x09\x0fJ\xb4\xc7\x00k\x00e\x00y\x00_\x00W\x00.\x00p\x00n\x00g\x00\x09\x0fF\xb4\xc7\x00k\x00e\x00y\x00_\x00S\x00.\x00p\x00n\x00g\x00\x08\x00FX'\x00s\x00y\x00n\x00c\x00.\x00p\x00n\x00g\x00\x0a\x0c\xba\xf2|\x00i\x00n\x00d\x00e\x00x\x00.\x00h\x00t\x00m\x00l"
|
||||||
qt_resource_struct = "\x00\x00\x00\x00\x00\x02\x00\x00\x00\x03\x00\x00\x00\x01\x00\x00\x00\x00\x00\x02\x00\x00\x00\x01\x00\x00\x00\x16\x00\x00\x00\x0e\x00\x02\x00\x00\x00\x11\x00\x00\x00\x05\x00\x00\x00\x1e\x00\x02\x00\x00\x00\x01\x00\x00\x00\x04\x00\x00\x000\x00\x00\x00\x00\x00\x01\x00\x00\x00\x00\x00\x00\x00\xac\x00\x00\x00\x00\x00\x01\x00\x00\xe0E\x00\x00\x01\xbe\x00\x00\x00\x00\x00\x01\x00\x01\xed\xa1\x00\x00\x01\xd6\x00\x00\x00\x00\x00\x01\x00\x01\xf6c\x00\x00\x01l\x00\x00\x00\x00\x00\x01\x00\x01\xa8\x10\x00\x00\x01\x8a\x00\x00\x00\x00\x00\x01\x00\x01\xc3\xbf\x00\x00\x00\x92\x00\x00\x00\x00\x00\x01\x00\x00\xcd\xe5\x00\x00\x01$\x00\x00\x00\x00\x00\x01\x00\x01x\x10\x00\x00\x00J\x00\x00\x00\x00\x00\x01\x00\x00\x9e\x08\x00\x00\x00b\x00\x00\x00\x00\x00\x01\x00\x00\xad\xe2\x00\x00\x00z\x00\x00\x00\x00\x00\x01\x00\x00\xbd\x8a\x00\x00\x00\xc4\x00\x00\x00\x00\x00\x01\x00\x019\x87\x00\x00\x00\xdc\x00\x00\x00\x00\x00\x01\x00\x01Im\x00\x00\x00\xf4\x00\x00\x00\x00\x00\x01\x00\x01YO\x00\x00\x01\x0c\x00\x00\x00\x00\x00\x01\x00\x01hm\x00\x00\x01<\x00\x00\x00\x00\x00\x01\x00\x01\x87\x8a\x00\x00\x01T\x00\x00\x00\x00\x00\x01\x00\x01\x97{\x00\x00\x01\xa6\x00\x00\x00\x00\x00\x01\x00\x01\xdd\xde\x00\x00\x00\x00\x00\x02\x00\x00\x00\x01\x00\x00\x00\x17\x00\x00\x01\xf2\x00\x00\x00\x00\x00\x01\x00\x02\x12C"
|
qt_resource_struct = "\x00\x00\x00\x00\x00\x02\x00\x00\x00\x03\x00\x00\x00\x01\x00\x00\x00\x00\x00\x02\x00\x00\x00\x01\x00\x00\x00\x17\x00\x00\x00\x0e\x00\x02\x00\x00\x00\x12\x00\x00\x00\x05\x00\x00\x00\x1e\x00\x02\x00\x00\x00\x01\x00\x00\x00\x04\x00\x00\x000\x00\x00\x00\x00\x00\x01\x00\x00\x00\x00\x00\x00\x01\xf2\x00\x00\x00\x00\x00\x01\x00\x02\x12C\x00\x00\x00z\x00\x00\x00\x00\x00\x01\x00\x00\xbc\xce\x00\x00\x01\xaa\x00\x00\x00\x00\x00\x01\x00\x01\xe9\x0a\x00\x00\x01F\x00\x00\x00\x00\x00\x01\x00\x01\x9dy\x00\x00\x01\x10\x00\x00\x00\x00\x00\x01\x00\x01r\x07\x00\x00\x00\xf4\x00\x00\x00\x00\x00\x01\x00\x01W\xe8\x00\x00\x00\xc2\x00\x00\x00\x00\x00\x01\x00\x016\x0e\x00\x00\x00\xdc\x00\x00\x00\x00\x00\x01\x00\x01Hn\x00\x00\x01\x92\x00\x00\x00\x00\x00\x01\x00\x01\xd90\x00\x00\x00b\x00\x00\x00\x00\x00\x01\x00\x00\xad&\x00\x00\x00\xaa\x00\x00\x00\x00\x00\x01\x00\x01%\xb3\x00\x00\x01z\x00\x00\x00\x00\x00\x01\x00\x01\xc9J\x00\x00\x01\xda\x00\x00\x00\x00\x00\x01\x00\x02\x02a\x00\x00\x00J\x00\x00\x00\x00\x00\x01\x00\x00\x9e\x08\x00\x00\x00\x92\x00\x00\x00\x00\x00\x01\x00\x01\x16\x10\x00\x00\x01b\x00\x00\x00\x00\x00\x01\x00\x01\xb9Y\x00\x00\x01\xc2\x00\x00\x00\x00\x00\x01\x00\x01\xf1\xcc\x00\x00\x01.\x00\x00\x00\x00\x00\x01\x00\x01\x8d\xb6\x00\x00\x00\x00\x00\x02\x00\x00\x00\x01\x00\x00\x00\x18\x00\x00\x02\x08\x00\x00\x00\x00\x00\x01\x00\x02\x22\xf1"
|
||||||
def qInitResources():
|
def qInitResources():
|
||||||
QtCore.qRegisterResourceData(0x01, qt_resource_struct, qt_resource_name, qt_resource_data)
|
QtCore.qRegisterResourceData(0x01, qt_resource_struct, qt_resource_name, qt_resource_data)
|
||||||
|
|
||||||
|
|||||||
+34
-17
@@ -12,8 +12,25 @@ import numpy as np
|
|||||||
import scipy as sc
|
import scipy as sc
|
||||||
import matplotlib.pyplot as plt
|
import matplotlib.pyplot as plt
|
||||||
from obspy.core import Stream, UTCDateTime
|
from obspy.core import Stream, UTCDateTime
|
||||||
|
from pylot.core.pick.run_autopicking import run_autopicking
|
||||||
import warnings
|
import warnings
|
||||||
import pdb
|
import pdb
|
||||||
|
|
||||||
|
def autopickevent(data, param):
|
||||||
|
stations = []
|
||||||
|
|
||||||
|
for n in len(data):
|
||||||
|
station = data[n].stats.station
|
||||||
|
if station not in stations:
|
||||||
|
stations.append(station)
|
||||||
|
else:
|
||||||
|
continue
|
||||||
|
|
||||||
|
for station in stations:
|
||||||
|
topick = data.select(station=station)
|
||||||
|
|
||||||
|
stat_picks = run_autopicking(topick, param)
|
||||||
|
|
||||||
def earllatepicker(X, nfac, TSNR, Pick1, iplot=None):
|
def earllatepicker(X, nfac, TSNR, Pick1, iplot=None):
|
||||||
'''
|
'''
|
||||||
Function to derive earliest and latest possible pick after Diehl & Kissling (2009)
|
Function to derive earliest and latest possible pick after Diehl & Kissling (2009)
|
||||||
@@ -254,7 +271,7 @@ def fmpicker(Xraw, Xfilt, pickwin, Pick, iplot=None):
|
|||||||
FM = '+'
|
FM = '+'
|
||||||
elif P1[0] > 0 and P2[0] <= 0:
|
elif P1[0] > 0 and P2[0] <= 0:
|
||||||
FM = '+'
|
FM = '+'
|
||||||
|
|
||||||
print 'fmpicker: Found polarity %s' % FM
|
print 'fmpicker: Found polarity %s' % FM
|
||||||
|
|
||||||
if iplot > 1:
|
if iplot > 1:
|
||||||
@@ -530,7 +547,7 @@ def wadaticheck(pickdic, dttolerance, iplot):
|
|||||||
print 'wadaticheck: Not enough S-P times available for reliable regression!'
|
print 'wadaticheck: Not enough S-P times available for reliable regression!'
|
||||||
print 'Skip wadati check!'
|
print 'Skip wadati check!'
|
||||||
wfitflag = 1
|
wfitflag = 1
|
||||||
|
|
||||||
# plot results
|
# plot results
|
||||||
if iplot > 1:
|
if iplot > 1:
|
||||||
plt.figure(iplot)
|
plt.figure(iplot)
|
||||||
@@ -615,12 +632,12 @@ def checksignallength(X, pick, TSNR, minsiglength, nfac, minpercent, iplot):
|
|||||||
print 'checksignallength: Signal shorter than required minimum signal length!'
|
print 'checksignallength: Signal shorter than required minimum signal length!'
|
||||||
print 'Presumably picked noise peak, pick is rejected!'
|
print 'Presumably picked noise peak, pick is rejected!'
|
||||||
returnflag = 0
|
returnflag = 0
|
||||||
|
|
||||||
if iplot == 2:
|
if iplot == 2:
|
||||||
plt.figure(iplot)
|
plt.figure(iplot)
|
||||||
p1, = plt.plot(t,x, 'k')
|
p1, = plt.plot(t,x, 'k')
|
||||||
p2, = plt.plot(t[inoise], e[inoise], 'c')
|
p2, = plt.plot(t[inoise], e[inoise], 'c')
|
||||||
p3, = plt.plot(t[isignal],e[isignal], 'r')
|
p3, = plt.plot(t[isignal],e[isignal], 'r')
|
||||||
p2, = plt.plot(t[inoise], e[inoise])
|
p2, = plt.plot(t[inoise], e[inoise])
|
||||||
p3, = plt.plot(t[isignal],e[isignal], 'r')
|
p3, = plt.plot(t[isignal],e[isignal], 'r')
|
||||||
p4, = plt.plot([t[isignal[0]], t[isignal[len(isignal)-1]]], \
|
p4, = plt.plot([t[isignal[0]], t[isignal[len(isignal)-1]]], \
|
||||||
@@ -642,7 +659,7 @@ def checksignallength(X, pick, TSNR, minsiglength, nfac, minpercent, iplot):
|
|||||||
|
|
||||||
def checkPonsets(pickdic, dttolerance, iplot):
|
def checkPonsets(pickdic, dttolerance, iplot):
|
||||||
'''
|
'''
|
||||||
Function to check statistics of P-onset times: Control deviation from
|
Function to check statistics of P-onset times: Control deviation from
|
||||||
median (maximum adjusted deviation = dttolerance) and apply pseudo-
|
median (maximum adjusted deviation = dttolerance) and apply pseudo-
|
||||||
bootstrapping jackknife.
|
bootstrapping jackknife.
|
||||||
|
|
||||||
@@ -722,7 +739,7 @@ def checkPonsets(pickdic, dttolerance, iplot):
|
|||||||
for i in range(0, len(Ppicks)):
|
for i in range(0, len(Ppicks)):
|
||||||
plt.text(i, Ppicks[i] + 0.2, stations[i])
|
plt.text(i, Ppicks[i] + 0.2, stations[i])
|
||||||
|
|
||||||
plt.xlabel('Number of P Picks')
|
plt.xlabel('Number of P Picks')
|
||||||
plt.ylabel('Onset Time [s] from 1.1.1970')
|
plt.ylabel('Onset Time [s] from 1.1.1970')
|
||||||
plt.legend([p1, p2, p3], ['Skipped P Picks', 'Good P Picks', 'Median'], \
|
plt.legend([p1, p2, p3], ['Skipped P Picks', 'Good P Picks', 'Median'], \
|
||||||
loc='best')
|
loc='best')
|
||||||
@@ -751,7 +768,7 @@ def jackknife(X, phi, h):
|
|||||||
: param: h, size of subgroups, optinal, default = 1
|
: param: h, size of subgroups, optinal, default = 1
|
||||||
: type: integer
|
: type: integer
|
||||||
'''
|
'''
|
||||||
|
|
||||||
PHI_jack = None
|
PHI_jack = None
|
||||||
PHI_pseudo = None
|
PHI_pseudo = None
|
||||||
PHI_sub = None
|
PHI_sub = None
|
||||||
@@ -786,7 +803,7 @@ def jackknife(X, phi, h):
|
|||||||
phi_sub = np.var(xx)
|
phi_sub = np.var(xx)
|
||||||
elif phi == 'MED':
|
elif phi == 'MED':
|
||||||
phi_sub = np.median(xx)
|
phi_sub = np.median(xx)
|
||||||
|
|
||||||
PHI_sub.append(phi_sub)
|
PHI_sub.append(phi_sub)
|
||||||
# pseudo values
|
# pseudo values
|
||||||
phi_pseudo = g * phi_sc - ((g - 1) * phi_sub)
|
phi_pseudo = g * phi_sc - ((g - 1) * phi_sub)
|
||||||
@@ -799,21 +816,21 @@ def jackknife(X, phi, h):
|
|||||||
|
|
||||||
def checkZ4S(X, pick, zfac, checkwin, iplot):
|
def checkZ4S(X, pick, zfac, checkwin, iplot):
|
||||||
'''
|
'''
|
||||||
Function to compare energy content of vertical trace with
|
Function to compare energy content of vertical trace with
|
||||||
energy content of horizontal traces to detect spuriously
|
energy content of horizontal traces to detect spuriously
|
||||||
picked S onsets instead of P onsets. Usually, P coda shows
|
picked S onsets instead of P onsets. Usually, P coda shows
|
||||||
larger longitudal energy on vertical trace than on horizontal
|
larger longitudal energy on vertical trace than on horizontal
|
||||||
traces, where the transversal energy is larger within S coda.
|
traces, where the transversal energy is larger within S coda.
|
||||||
Be careful: there are special circumstances, where this is not
|
Be careful: there are special circumstances, where this is not
|
||||||
the case!
|
the case!
|
||||||
|
|
||||||
: param: X, fitered(!) time series, three traces
|
: param: X, fitered(!) time series, three traces
|
||||||
: type: `~obspy.core.stream.Stream`
|
: type: `~obspy.core.stream.Stream`
|
||||||
|
|
||||||
: param: pick, initial (AIC) P onset time
|
: param: pick, initial (AIC) P onset time
|
||||||
: type: float
|
: type: float
|
||||||
|
|
||||||
: param: zfac, factor for threshold determination,
|
: param: zfac, factor for threshold determination,
|
||||||
vertical energy must exceed coda level times zfac
|
vertical energy must exceed coda level times zfac
|
||||||
to declare a pick as P onset
|
to declare a pick as P onset
|
||||||
: type: float
|
: type: float
|
||||||
@@ -841,7 +858,7 @@ def checkZ4S(X, pick, zfac, checkwin, iplot):
|
|||||||
ndat = X.select(component="N")
|
ndat = X.select(component="N")
|
||||||
if len(ndat) == 0: # check for other components
|
if len(ndat) == 0: # check for other components
|
||||||
ndat = X.select(component="1")
|
ndat = X.select(component="1")
|
||||||
|
|
||||||
|
|
||||||
z = zdat[0].data
|
z = zdat[0].data
|
||||||
tz = np.arange(0, zdat[0].stats.npts / zdat[0].stats.sampling_rate,
|
tz = np.arange(0, zdat[0].stats.npts / zdat[0].stats.sampling_rate,
|
||||||
@@ -863,7 +880,7 @@ def checkZ4S(X, pick, zfac, checkwin, iplot):
|
|||||||
# calculate energy levels
|
# calculate energy levels
|
||||||
zcodalevel = max(absz[isignal])
|
zcodalevel = max(absz[isignal])
|
||||||
encodalevel = max(absen[isignal])
|
encodalevel = max(absen[isignal])
|
||||||
|
|
||||||
# calculate threshold
|
# calculate threshold
|
||||||
minsiglevel = encodalevel * zfac
|
minsiglevel = encodalevel * zfac
|
||||||
|
|
||||||
@@ -873,7 +890,7 @@ def checkZ4S(X, pick, zfac, checkwin, iplot):
|
|||||||
print 'checkZ4S: Maybe S onset? Skip this P pick!'
|
print 'checkZ4S: Maybe S onset? Skip this P pick!'
|
||||||
else:
|
else:
|
||||||
print 'checkZ4S: P onset passes checkZ4S test!'
|
print 'checkZ4S: P onset passes checkZ4S test!'
|
||||||
returnflag = 1
|
returnflag = 1
|
||||||
|
|
||||||
if iplot > 1:
|
if iplot > 1:
|
||||||
te = np.arange(0, edat[0].stats.npts / edat[0].stats.sampling_rate,
|
te = np.arange(0, edat[0].stats.npts / edat[0].stats.sampling_rate,
|
||||||
|
|||||||
@@ -4,8 +4,9 @@ from PySide.QtCore import QThread, Signal
|
|||||||
class WorkerThread(QThread):
|
class WorkerThread(QThread):
|
||||||
message = Signal(str)
|
message = Signal(str)
|
||||||
|
|
||||||
def __init__(self, func, data, param):
|
def __init__(self, parent, func, data, param):
|
||||||
super(WorkerThread, self).__init__()
|
super(WorkerThread, self).__init__()
|
||||||
|
self.setParent(parent)
|
||||||
self.func = func
|
self.func = func
|
||||||
self.data = data
|
self.data = data
|
||||||
self.param = param
|
self.param = param
|
||||||
@@ -13,7 +14,12 @@ class WorkerThread(QThread):
|
|||||||
def run(self):
|
def run(self):
|
||||||
sys.stdout = self
|
sys.stdout = self
|
||||||
|
|
||||||
self.func(self.data, self.param)
|
picks = self.func(self.data, self.param)
|
||||||
|
|
||||||
|
try:
|
||||||
|
self.parent().addPicks(picks)
|
||||||
|
except AttributeError:
|
||||||
|
print picks
|
||||||
|
|
||||||
def write(self, text):
|
def write(self, text):
|
||||||
self.message.emit(text)
|
self.message.emit(text)
|
||||||
Reference in new issue
Block a user