Merge branch 'develop' of ariadne.geophysik.ruhr-uni-bochum.de:/data/git/pylot into develop

This commit is contained in:
marcel committed 2016-06-07 13:39:34 +02:00
commit 661b4d11c0
7 files changed
+155 -39

No files matched your search

+42 -27
View File
@@ -53,7 +53,7 @@ from pylot.core.util.utils import fnConstructor, getLogin, \
getGlobalTimes
from pylot.core.io.location import create_creation_info, create_event
from pylot.core.util.widgets import FilterOptionsDialog, NewEventDlg, \
MPLWidget, PropertiesDlg, HelpForm, createAction, PickDlg
WaveformWidget, PropertiesDlg, HelpForm, createAction, PickDlg, getDataType
from pylot.core.util.structure import DATASTRUCTURE
from pylot.core.util.thread import AutoPickThread
from pylot.core.util.version import get_git_version as _getVersionString
@@ -142,8 +142,8 @@ class MainWindow(QMainWindow):
plottitle = "Overview: {0} components ".format(self.getComponent())
# create central matplotlib figure canvas widget
self.DataPlot = MPLWidget(parent=self, xlabel=xlab, ylabel=None,
title=plottitle)
self.DataPlot = WaveformWidget(parent=self, xlabel=xlab, ylabel=None,
title=plottitle)
self.DataPlot.mpl_connect('button_press_event',
self.pickOnStation)
self.DataPlot.mpl_connect('axes_enter_event',
@@ -178,6 +178,8 @@ class MainWindow(QMainWindow):
auto_icon.addPixmap(QPixmap(':/icons/sync.png'))
locate_icon = QIcon()
locate_icon.addPixmap(QPixmap(':/icons/locate.png'))
compare_icon = QIcon()
compare_icon.addPixmap(QPixmap(':/icons/compare.png'))
newEventAction = self.createAction(self, "&New event ...",
self.createNewEvent,
@@ -244,6 +246,12 @@ class MainWindow(QMainWindow):
"Alt+S",
s_icon,
"Toggle S phase", True)
self.compare_action = self.createAction(self, "&Compare picks...",
self.comparePicks, "Alt+C",
compare_icon, "Comparison of "
"manual and "
"automatic pick "
"data.", False)
printAction = self.createAction(self, "&Print event ...",
self.printEvent, QKeySequence.Print,
print_icon,
@@ -318,7 +326,7 @@ class MainWindow(QMainWindow):
' displayed!')
autoPickToolBar = self.addToolBar("autoPyLoT")
autoPickActions = (auto_pick,)
autoPickActions = (auto_pick, self.compare_action)
self.addActions(autoPickToolBar, autoPickActions)
# pickToolBar = self.addToolBar("PickTools")
@@ -389,43 +397,32 @@ class MainWindow(QMainWindow):
settings = QSettings()
return settings.value("data/dataRoot")
def getType(self):
type = QInputDialog().getItem(self, self.tr("Select phases type"),
self.tr("Type:"), [self.tr("manual"),
self.tr("automatic")])
if type[0].startswith('auto'):
type = 'auto'
else:
type = type[0]
return type
def load_autopicks(self, fname=None):
self.load_data(fname, type='auto')
def load_loc(self, fname=None):
self.load_data(fname, type='loc')
type = getDataType(self)
self.load_data(fname, type=type, loc=True)
def load_pilotevent(self):
filt = "PILOT location files (*.mat)"
filt = "PILOT location files (*LOC*.mat)"
caption = "Select PILOT location file"
fn_loc = QFileDialog().getOpenFileName(self, caption=caption,
filter=filt, dir=self.getRoot())
fn_loc = fn_loc[0]
loc_dir = os.path.split(fn_loc)[0]
filt = "PILOT phases files (*.mat)"
filt = "PILOT phases files (*PHASES*.mat)"
caption = "Select PILOT phases file"
fn_phases = QFileDialog().getOpenFileName(self, caption=caption,
filter=filt, dir=loc_dir)
fn_phases = fn_phases[0]
type = self.getType()
type = getDataType(self)
fname_dict = dict(phasfn=fn_phases, locfn=fn_loc)
self.load_data(fname_dict, type=type)
def load_data(self, fname=None, type='manual'):
def load_data(self, fname=None, type='manual', loc=False):
if not self.okToContinue():
return
if fname is None:
@@ -435,7 +432,7 @@ class MainWindow(QMainWindow):
self.set_fname(fname, type)
data = dict(auto=self.autodata, manual=self.data)
data[type] += Data(self, evtdata=fname)
if 'loc' not in type:
if not loc:
self.updatePicks(type=type)
self.drawPicks(picktype=type)
self.draw()
@@ -485,9 +482,9 @@ class MainWindow(QMainWindow):
filt = "Supported file formats" \
" (*.mat *.qml *.xml *.kor *.evt)"
caption = "Open an event file"
fname = QFileDialog().getOpenFileName(self,
caption=caption,
filter=filt)
fname = QFileDialog().getOpenFileName(self, caption=caption,
filter=filt,
dir=self.getRoot())
fname = fname[0]
else:
fname = str(action.data().toString())
@@ -579,6 +576,10 @@ class MainWindow(QMainWindow):
except KeyError:
return None
def comparePicks(self):
if self.check4Comparison():
compare_dlg = ComparisonDialog(self)
def getPlotWidget(self):
return self.DataPlot
@@ -839,6 +840,7 @@ class MainWindow(QMainWindow):
self.picks.update(picks)
elif type == 'auto':
self.autopicks.update(picks)
self.check4Comparison()
def drawPicks(self, station=None, picktype='manual'):
# if picks to draw not specified, draw all picks available
@@ -893,9 +895,22 @@ class MainWindow(QMainWindow):
def check4Loc(self):
return self.picksNum() > 4
def picksNum(self):
def check4Comparison(self):
mpicks = self.getPicks()
apicks = self.getPicks('auto')
for station, phases in mpicks.items():
try:
aphases = apicks[station]
for phase in phases.keys():
if phase in aphases.keys():
return True
except KeyError:
continue
return False
def picksNum(self, type='manual'):
num = 0
for phases in self.getPicks().values():
for phases in self.getPicks(type).values():
num += len(phases)
return num
+1
View File
@@ -5,6 +5,7 @@
<file>icons/locate.png</file>
<file>icons/printer.png</file>
<file>icons/delete.png</file>
<file>icons/compare.png</file>
<file>icons/key_E.png</file>
<file>icons/key_N.png</file>
<file>icons/key_P.png</file>
BIN
View File
Binary file not shown.

After

Width:  |  Height:  |  Size: 3.0 KiB

+4 -4
View File
@@ -2,16 +2,16 @@
# Resource object code
#
# Created: Mo. Nov. 9 08:50:04 2015
# Created: Fr. Jun 3 09:37:04 2016
# by: The Resource Compiler for PySide (Qt v4.8.6)
#
# WARNING! All changes made in this file will be lost!
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\x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!\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\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\x0a\x0c\xad\x0f\x07\x00d\x00e\x00l\x00e\x00t\x00e\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\x0a\x08\xaa<g\x00l\x00o\x00c\x00a\x00t\x00e\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\x0a\x033{\x87\x00z\x00o\x00o\x00m\x00_\x000\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\x1a\x00\x00\x00\x0e\x00\x02\x00\x00\x00\x15\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\x02@\x00\x00\x00\x00\x00\x01\x00\x02^+\x00\x00\x02&\x00\x00\x00\x00\x00\x01\x00\x02B~\x00\x00\x00z\x00\x00\x00\x00\x00\x01\x00\x00\xbc\xce\x00\x00\x01\xde\x00\x00\x00\x00\x00\x01\x00\x02\x19E\x00\x00\x01z\x00\x00\x00\x00\x00\x01\x00\x01\xcd\xb4\x00\x00\x01D\x00\x00\x00\x00\x00\x01\x00\x01\xa2B\x00\x00\x00\xf6\x00\x00\x00\x00\x00\x01\x00\x01\x5cQ\x00\x00\x01(\x00\x00\x00\x00\x00\x01\x00\x01\x88#\x00\x00\x00\xdc\x00\x00\x00\x00\x00\x01\x00\x01I\xf1\x00\x00\x00\x92\x00\x00\x00\x00\x00\x01\x00\x01\x16\x10\x00\x00\x01\x10\x00\x00\x00\x00\x00\x01\x00\x01x\xa9\x00\x00\x01\xc6\x00\x00\x00\x00\x00\x01\x00\x02\x09k\x00\x00\x00b\x00\x00\x00\x00\x00\x01\x00\x00\xad&\x00\x00\x00\xc4\x00\x00\x00\x00\x00\x01\x00\x019\x96\x00\x00\x01\xae\x00\x00\x00\x00\x00\x01\x00\x01\xf9\x85\x00\x00\x02\x0e\x00\x00\x00\x00\x00\x01\x00\x022\x9c\x00\x00\x00J\x00\x00\x00\x00\x00\x01\x00\x00\x9e\x08\x00\x00\x00\xac\x00\x00\x00\x00\x00\x01\x00\x01)\xf3\x00\x00\x01\x96\x00\x00\x00\x00\x00\x01\x00\x01\xe9\x94\x00\x00\x01\xf6\x00\x00\x00\x00\x00\x01\x00\x02\x22\x07\x00\x00\x01b\x00\x00\x00\x00\x00\x01\x00\x01\xbd\xf1\x00\x00\x00\x00\x00\x02\x00\x00\x00\x01\x00\x00\x00\x1b\x00\x00\x02V\x00\x00\x00\x00\x00\x01\x00\x02n\xd9"
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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\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\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\x0a\x0c\xad\x0f\x07\x00d\x00e\x00l\x00e\x00t\x00e\x00.\x00p\x00n\x00g\x00\x09\x0fH\xb4\xc7\x00k\x00e\x00y\x00_\x00U\x00.\x00p\x00n\x00g\x00\x0b\x08T\x9f\x87\x00c\x00o\x00m\x00p\x00a\x00r\x00e\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\x0a\x08\xaa<g\x00l\x00o\x00c\x00a\x00t\x00e\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\x0a\x033{\x87\x00z\x00o\x00o\x00m\x00_\x000\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\x1b\x00\x00\x00\x0e\x00\x02\x00\x00\x00\x16\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\x02\x5c\x00\x00\x00\x00\x00\x01\x00\x02jS\x00\x00\x02B\x00\x00\x00\x00\x00\x01\x00\x02N\xa6\x00\x00\x00z\x00\x00\x00\x00\x00\x01\x00\x00\xbc\xce\x00\x00\x01\xfa\x00\x00\x00\x00\x00\x01\x00\x02%m\x00\x00\x01\x96\x00\x00\x00\x00\x00\x01\x00\x01\xd9\xdc\x00\x00\x01`\x00\x00\x00\x00\x00\x01\x00\x01\xaej\x00\x00\x00\xc4\x00\x00\x00\x00\x00\x01\x00\x019\x96\x00\x00\x01\x12\x00\x00\x00\x00\x00\x01\x00\x01hy\x00\x00\x01D\x00\x00\x00\x00\x00\x01\x00\x01\x94K\x00\x00\x00\xf8\x00\x00\x00\x00\x00\x01\x00\x01V\x19\x00\x00\x00\x92\x00\x00\x00\x00\x00\x01\x00\x01\x16\x10\x00\x00\x01,\x00\x00\x00\x00\x00\x01\x00\x01\x84\xd1\x00\x00\x01\xe2\x00\x00\x00\x00\x00\x01\x00\x02\x15\x93\x00\x00\x00b\x00\x00\x00\x00\x00\x01\x00\x00\xad&\x00\x00\x00\xe0\x00\x00\x00\x00\x00\x01\x00\x01E\xbe\x00\x00\x01\xca\x00\x00\x00\x00\x00\x01\x00\x02\x05\xad\x00\x00\x02*\x00\x00\x00\x00\x00\x01\x00\x02>\xc4\x00\x00\x00J\x00\x00\x00\x00\x00\x01\x00\x00\x9e\x08\x00\x00\x00\xac\x00\x00\x00\x00\x00\x01\x00\x01)\xf3\x00\x00\x01\xb2\x00\x00\x00\x00\x00\x01\x00\x01\xf5\xbc\x00\x00\x02\x12\x00\x00\x00\x00\x00\x01\x00\x02./\x00\x00\x01~\x00\x00\x00\x00\x00\x01\x00\x01\xca\x19\x00\x00\x00\x00\x00\x02\x00\x00\x00\x01\x00\x00\x00\x1c\x00\x00\x02r\x00\x00\x00\x00\x00\x01\x00\x02{\x01"
def qInitResources():
QtCore.qRegisterResourceData(0x01, qt_resource_struct, qt_resource_name, qt_resource_data)
+1
View File
@@ -8,6 +8,7 @@
EVENT_DATA/LOCAL #datapath# %data path
2013.02_Insheim #database# %name of data base
e0019.048.13 #eventID# %certain evnt ID for processing
True #apverbose#
PILOT #datastructure# %choose data structure
0 #iplot# %flag for plotting: 0 none, 1, partly, >1 everything
AUTOPHASES_AIC_HOS4_ARH #phasefile# %name of autoPILOT output phase file
+12 -4
View File
@@ -29,7 +29,10 @@ class Comparison(object):
names = list()
self._pdfs = dict()
for name, fn in kwargs.items():
self._pdfs[name] = PDFDictionary.from_quakeml(fn)
if not isinstance(PDFDictionary, fn):
self._pdfs[name] = PDFDictionary.from_quakeml(fn)
else:
self._pdfs[name] = fn
names.append(name)
if len(names) > 2:
raise ValueError('Comparison is only defined for two '
@@ -101,14 +104,19 @@ class Comparison(object):
return compare_pdfs
def plot(self):
nstations = self.nstations
stations = self.stations
def plot(self, stations=None):
if stations is None:
nstations = self.nstations
stations = self.stations
else:
nstations = len(stations)
istations = range(nstations)
fig, axarr = plt.subplots(nstations, 2, sharex='col', sharey='row')
for n in istations:
station = stations[n]
if station not in self.comparison.keys():
continue
compare_pdf = self.comparison[station]
for l, phase in enumerate(compare_pdf.keys()):
axarr[n, l].plot(compare_pdf[phase].axis,
+95 -4
View File
@@ -20,7 +20,8 @@ from matplotlib.widgets import MultiCursor
from PySide.QtGui import QAction, QApplication, QComboBox, QDateTimeEdit, \
QDialog, QDialogButtonBox, QDoubleSpinBox, QGroupBox, QGridLayout, \
QIcon, QKeySequence, QLabel, QLineEdit, QMessageBox, QPixmap, QSpinBox, \
QTabWidget, QToolBar, QVBoxLayout, QWidget, QPushButton, QFileDialog
QTabWidget, QToolBar, QVBoxLayout, QWidget, QPushButton, QFileDialog, \
QInputDialog
from PySide.QtCore import QSettings, Qt, QUrl, Signal, Slot
from PySide.QtWebKit import QWebView
from obspy import Stream, UTCDateTime
@@ -33,6 +34,18 @@ from pylot.core.util.utils import prepTimeAxis, getGlobalTimes, scaleWFData, \
demeanTrace, isSorted, findComboBoxIndex
def getDataType(parent):
type = QInputDialog().getItem(parent, "Select phases type", "Type:",
["manual", "automatic"])
if type[0].startswith('auto'):
type = 'auto'
else:
type = type[0]
return type
def createAction(parent, text, slot=None, shortcut=None, icon=None,
tip=None, checkable=False):
"""
@@ -51,8 +64,86 @@ def createAction(parent, text, slot=None, shortcut=None, icon=None,
action.setCheckable(True)
return action
class ComparsionDialog(QDialog):
def __init__(self, c, parent=None):
self._data = c
self._stats = c.keys()
self._canvas = PlotWidget(parent)
super(ComparsionDialog, self).__init__(parent)
self
class MPLWidget(FigureCanvas):
def setupUI(self):
pass
@property
def canvas(self):
return self._canvas
@property
def stations(self):
return self._stats
@stations.setter
def stations(self, stations):
self._stats = stations
@property
def data(self):
return self._data
@data.setter
def data(self, data):
self.stations = data.keys()
self._data = data
class PlotWidget(FigureCanvas):
def __init__(self, parent=None, xlabel='x', ylabel='y', title='Title'):
self._parent = parent
self._fig = Figure()
self._xl = xlabel
self._yl = ylabel
self._title = title
super(PlotWidget, self).__init__(self.figure)
@property
def figure(self):
return self._fig
@figure.setter
def figure(self, fig):
self._fig = fig
@property
def xlabel(self):
return self._xl
@xlabel.setter
def xlabel(self, label):
self._xl = label
@property
def ylabel(self):
return self._yl
@ylabel.setter
def ylabel(self, label):
self._yl = label
@property
def title(self):
return self._title
@title.setter
def title(self, title):
self._title = title
@property
def parent(self):
return self._parent
class WaveformWidget(FigureCanvas):
def __init__(self, parent=None, xlabel='x', ylabel='y', title='Title'):
self._parent = None
@@ -66,7 +157,7 @@ class MPLWidget(FigureCanvas):
# clear axes each time plot is called
self.axes.hold(True)
# initialize super class
super(MPLWidget, self).__init__(self.figure)
super(WaveformWidget, self).__init__(self.figure)
# add an cursor for station selection
self.multiCursor = MultiCursor(self.figure.canvas, (self.axes,),
horizOn=True,
@@ -210,7 +301,7 @@ class PickDlg(QDialog):
self.stime, self.etime = getGlobalTimes(self.getWFData())
# initialize plotting widget
self.multicompfig = MPLWidget(self)
self.multicompfig = WaveformWidget(self)
# setup ui
self.setupUi()