release version 0.2
release notes: ============== Features: - centralize all functionalities of PyLoT and control them from within the main GUI - handling multiple events inside GUI with project files (save and load work progress) - GUI based adjustments of pick parameters and I/O - interactive tuning of parameters from within the GUI - call automatic picking algorithm from within the GUI - comparison of automatic with manual picks for multiple events using clear differentiation of manual picks into 'tune' and 'test-set' (beta) - manual picking of different (user defined) phase types - phase onset estimation with ObsPy TauPy - interactive zoom/scale functionalities in all plots (mousewheel, pan, pan-zoom) - array map to visualize stations and control onsets (beta feature, switch to manual picks not implemented) Platform support: - python 3 support - Windows support Performance: - multiprocessing for automatic picking and restitution of multiple stations - use pyqtgraph library for better performance on main waveform plot Visualization: - pick uncertainty (quality classes) visualization with gradients - pick color unification for all plots - new icons and stylesheets Known Issues:
This commit is contained in:
1 parent
417316a8bb
commit
adc3304840
30 files changed
+376
-2533
No files matched your search
-1177
File diff suppressed because it is too large.
Load diff
Binary file not shown.
|
Before Width: | Height: | Size: 3.0 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 7.1 KiB |
-21
@@ -1,21 +0,0 @@
|
|||||||
# -*- coding: utf-8 -*-
|
|
||||||
|
|
||||||
# Resource object code
|
|
||||||
#
|
|
||||||
# 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\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\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)
|
|
||||||
|
|
||||||
def qCleanupResources():
|
|
||||||
QtCore.qUnregisterResourceData(0x01, qt_resource_struct, qt_resource_name, qt_resource_data)
|
|
||||||
|
|
||||||
qInitResources()
|
|
||||||
@@ -1,100 +0,0 @@
|
|||||||
%This is a parameter input file for autoPyLoT.
|
|
||||||
%All main and special settings regarding data handling
|
|
||||||
%and picking are to be set here!
|
|
||||||
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
|
||||||
|
|
||||||
#main settings#
|
|
||||||
/DATA/Insheim #rootpath# %project path
|
|
||||||
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
|
|
||||||
AUTOLOC_AIC_HOS4_ARH #locfile# %name of autoPILOT output location file
|
|
||||||
AUTOFOCMEC_AIC_HOS4_ARH.in #focmecin# %name of focmec input file containing polarities
|
|
||||||
HYPOSAT #locrt# %location routine used ("HYPOINVERSE" or "HYPOSAT")
|
|
||||||
6 #pmin# %minimum required P picks for location
|
|
||||||
4 #p0min# %minimum required P picks for location if at least
|
|
||||||
%3 excellent P picks are found
|
|
||||||
2 #smin# %minimum required S picks for location
|
|
||||||
/home/ludger/bin/run_HYPOSAT4autoPILOT.csh #cshellp# %path and name of c-shell script to run location routine
|
|
||||||
7.6 8.5 #blon# %longitude bounding for location map
|
|
||||||
49 49.4 #blat# %lattitude bounding for location map
|
|
||||||
#parameters for moment magnitude estimation#
|
|
||||||
5000 #vp# %average P-wave velocity
|
|
||||||
2800 #vs# %average S-wave velocity
|
|
||||||
2200 #rho# %rock density [kg/m^3]
|
|
||||||
300 #Qp# %quality factor for P waves
|
|
||||||
100 #Qs# %quality factor for S waves
|
|
||||||
#common settings picker#
|
|
||||||
15 #pstart# %start time [s] for calculating CF for P-picking
|
|
||||||
40 #pstop# %end time [s] for calculating CF for P-picking
|
|
||||||
-1.0 #sstart# %start time [s] after or before(-) P-onset for calculating CF for S-picking
|
|
||||||
7 #sstop# %end time [s] after P-onset for calculating CF for S-picking
|
|
||||||
2 20 #bpz1# %lower/upper corner freq. of first band pass filter Z-comp. [Hz]
|
|
||||||
2 30 #bpz2# %lower/upper corner freq. of second band pass filter Z-comp. [Hz]
|
|
||||||
2 15 #bph1# %lower/upper corner freq. of first band pass filter H-comp. [Hz]
|
|
||||||
2 20 #bph2# %lower/upper corner freq. of second band pass filter z-comp. [Hz]
|
|
||||||
#special settings for calculating CF#
|
|
||||||
%!!Be careful when editing the following!!
|
|
||||||
#Z-component#
|
|
||||||
HOS #algoP# %choose algorithm for P-onset determination (HOS, ARZ, or AR3)
|
|
||||||
7 #tlta# %for HOS-/AR-AIC-picker, length of LTA window [s]
|
|
||||||
4 #hosorder# %for HOS-picker, order of Higher Order Statistics
|
|
||||||
2 #Parorder# %for AR-picker, order of AR process of Z-component
|
|
||||||
1.2 #tdet1z# %for AR-picker, length of AR determination window [s] for Z-component, 1st pick
|
|
||||||
0.4 #tpred1z# %for AR-picker, length of AR prediction window [s] for Z-component, 1st pick
|
|
||||||
0.6 #tdet2z# %for AR-picker, length of AR determination window [s] for Z-component, 2nd pick
|
|
||||||
0.2 #tpred2z# %for AR-picker, length of AR prediction window [s] for Z-component, 2nd pick
|
|
||||||
0.001 #addnoise# %add noise to seismogram for stable AR prediction
|
|
||||||
3 0.1 0.5 0.1 #tsnrz# %for HOS/AR, window lengths for SNR-and slope estimation [tnoise,tsafetey,tsignal,tslope] [s]
|
|
||||||
3 #pickwinP# %for initial AIC pick, length of P-pick window [s]
|
|
||||||
8 #Precalcwin# %for HOS/AR, window length [s] for recalculation of CF (relative to 1st pick)
|
|
||||||
0 #peps4aic# %for HOS/AR, artificial uplift of samples of AIC-function (P)
|
|
||||||
0.2 #aictsmooth# %for HOS/AR, take average of samples for smoothing of AIC-function [s]
|
|
||||||
0.1 #tsmoothP# %for HOS/AR, take average of samples for smoothing CF [s]
|
|
||||||
0.001 #ausP# %for HOS/AR, artificial uplift of samples (aus) of CF (P)
|
|
||||||
1.3 #nfacP# %for HOS/AR, noise factor for noise level determination (P)
|
|
||||||
#H-components#
|
|
||||||
ARH #algoS# %choose algorithm for S-onset determination (ARH or AR3)
|
|
||||||
0.8 #tdet1h# %for HOS/AR, length of AR-determination window [s], H-components, 1st pick
|
|
||||||
0.4 #tpred1h# %for HOS/AR, length of AR-prediction window [s], H-components, 1st pick
|
|
||||||
0.6 #tdet2h# %for HOS/AR, length of AR-determinaton window [s], H-components, 2nd pick
|
|
||||||
0.3 #tpred2h# %for HOS/AR, length of AR-prediction window [s], H-components, 2nd pick
|
|
||||||
4 #Sarorder# %for AR-picker, order of AR process of H-components
|
|
||||||
6 #Srecalcwin# %for AR-picker, window length [s] for recalculation of CF (2nd pick) (H)
|
|
||||||
3 #pickwinS# %for initial AIC pick, length of S-pick window [s]
|
|
||||||
2 0.2 1.5 0.5 #tsnrh# %for ARH/AR3, window lengths for SNR-and slope estimation [tnoise,tsafetey,tsignal,tslope] [s]
|
|
||||||
0.05 #aictsmoothS# %for AIC-picker, take average of samples for smoothing of AIC-function [s]
|
|
||||||
0.02 #tsmoothS# %for AR-picker, take average of samples for smoothing CF [s] (S)
|
|
||||||
0.2 #pepsS# %for AR-picker, artificial uplift of samples of CF (S)
|
|
||||||
0.4 #ausS# %for HOS/AR, artificial uplift of samples (aus) of CF (S)
|
|
||||||
1.5 #nfacS# %for AR-picker, noise factor for noise level determination (S)
|
|
||||||
%first-motion picker%
|
|
||||||
1 #minfmweight# %minimum required p weight for first-motion determination
|
|
||||||
2 #minFMSNR# %miniumum required SNR for first-motion determination
|
|
||||||
0.2 #fmpickwin# %pick window around P onset for calculating zero crossings
|
|
||||||
%quality assessment%
|
|
||||||
#inital AIC onset#
|
|
||||||
0.01 0.02 0.04 0.08 #timeerrorsP# %discrete time errors [s] corresponding to picking weights [0 1 2 3] for P
|
|
||||||
0.04 0.08 0.16 0.32 #timeerrorsS# %discrete time errors [s] corresponding to picking weights [0 1 2 3] for S
|
|
||||||
80 #minAICPslope# %below this slope [counts/s] the initial P pick is rejected
|
|
||||||
1.2 #minAICPSNR# %below this SNR the initial P pick is rejected
|
|
||||||
50 #minAICSslope# %below this slope [counts/s] the initial S pick is rejected
|
|
||||||
1.5 #minAICSSNR# %below this SNR the initial S pick is rejected
|
|
||||||
#check duration of signal using envelope function#
|
|
||||||
1.5 #prepickwin# %pre-signal window length [s] for noise level estimation
|
|
||||||
0.7 #minsiglength# %minimum required length of signal [s]
|
|
||||||
0.2 #sgap# %safety gap between noise and signal window [s]
|
|
||||||
2 #noisefactor# %noiselevel*noisefactor=threshold
|
|
||||||
60 #minpercent# %per cent of samples required higher than threshold
|
|
||||||
#check for spuriously picked S-onsets#
|
|
||||||
3.0 #zfac# %P-amplitude must exceed zfac times RMS-S amplitude
|
|
||||||
#jackknife-processing for P-picks#
|
|
||||||
3 #thresholdweight#%minimum required weight of picks
|
|
||||||
3 #dttolerance# %maximum allowed deviation of P picks from median [s]
|
|
||||||
4 #minstats# %minimum number of stations with reliable P picks
|
|
||||||
3 #Sdttolerance# %maximum allowed deviation from Wadati-diagram
|
|
||||||
|
|
||||||
@@ -1,99 +0,0 @@
|
|||||||
%This is a parameter input file for autoPyLoT.
|
|
||||||
%All main and special settings regarding data handling
|
|
||||||
%and picking are to be set here!
|
|
||||||
%Parameters are optimized for local data sets!
|
|
||||||
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
|
||||||
#main settings#
|
|
||||||
/DATA/Insheim #rootpath# %project path
|
|
||||||
EVENT_DATA/LOCAL #datapath# %data path
|
|
||||||
2016.08_Insheim #database# %name of data base
|
|
||||||
e0007.224.16 #eventID# %event ID for single event processing
|
|
||||||
/DATA/Insheim/STAT_INFO #invdir# %full path to inventory or dataless-seed file
|
|
||||||
PILOT #datastructure#%choose data structure
|
|
||||||
0 #iplot# %flag for plotting: 0 none, 1 partly, >1 everything
|
|
||||||
True #apverbose# %choose 'True' or 'False' for terminal output
|
|
||||||
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
|
||||||
#NLLoc settings#
|
|
||||||
/home/ludger/NLLOC #nllocbin# %path to NLLoc executable
|
|
||||||
/home/ludger/NLLOC/Insheim #nllocroot# %root of NLLoc-processing directory
|
|
||||||
AUTOPHASES.obs #phasefile# %name of autoPyLoT-output phase file for NLLoc
|
|
||||||
%(in nllocroot/obs)
|
|
||||||
Insheim_min1d032016_auto.in #ctrfile# %name of autoPyLoT-output control file for NLLoc
|
|
||||||
%(in nllocroot/run)
|
|
||||||
ttime #ttpatter# %pattern of NLLoc ttimes from grid
|
|
||||||
%(in nllocroot/times)
|
|
||||||
AUTOLOC_nlloc #outpatter# %pattern of NLLoc-output file
|
|
||||||
%(returns 'eventID_outpatter')
|
|
||||||
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
|
||||||
#parameters for seismic moment estimation#
|
|
||||||
3530 #vp# %average P-wave velocity
|
|
||||||
2500 #rho# %average rock density [kg/m^3]
|
|
||||||
300 0.8 #Qp# %quality factor for P waves ([Qp, ap], Qp*f^a)
|
|
||||||
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
|
||||||
AUTOFOCMEC_AIC_HOS4_ARH.in #focmecin# %name of focmec input file containing derived polarities
|
|
||||||
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
|
||||||
#common settings picker#
|
|
||||||
15.0 #pstart# %start time [s] for calculating CF for P-picking
|
|
||||||
60.0 #pstop# %end time [s] for calculating CF for P-picking
|
|
||||||
-1.0 #sstart# %start time [s] relative to P-onset for calculating CF for S-picking
|
|
||||||
10.0 #sstop# %end time [s] after P-onset for calculating CF for S-picking
|
|
||||||
2 20 #bpz1# %lower/upper corner freq. of first band pass filter Z-comp. [Hz]
|
|
||||||
2 30 #bpz2# %lower/upper corner freq. of second band pass filter Z-comp. [Hz]
|
|
||||||
2 15 #bph1# %lower/upper corner freq. of first band pass filter H-comp. [Hz]
|
|
||||||
2 20 #bph2# %lower/upper corner freq. of second band pass filter z-comp. [Hz]
|
|
||||||
#special settings for calculating CF#
|
|
||||||
%!!Edit the following only if you know what you are doing!!%
|
|
||||||
#Z-component#
|
|
||||||
HOS #algoP# %choose algorithm for P-onset determination (HOS, ARZ, or AR3)
|
|
||||||
7.0 #tlta# %for HOS-/AR-AIC-picker, length of LTA window [s]
|
|
||||||
4 #hosorder# %for HOS-picker, order of Higher Order Statistics
|
|
||||||
2 #Parorder# %for AR-picker, order of AR process of Z-component
|
|
||||||
1.2 #tdet1z# %for AR-picker, length of AR determination window [s] for Z-component, 1st pick
|
|
||||||
0.4 #tpred1z# %for AR-picker, length of AR prediction window [s] for Z-component, 1st pick
|
|
||||||
0.6 #tdet2z# %for AR-picker, length of AR determination window [s] for Z-component, 2nd pick
|
|
||||||
0.2 #tpred2z# %for AR-picker, length of AR prediction window [s] for Z-component, 2nd pick
|
|
||||||
0.001 #addnoise# %add noise to seismogram for stable AR prediction
|
|
||||||
3 0.1 0.5 0.5 #tsnrz# %for HOS/AR, window lengths for SNR-and slope estimation [tnoise,tsafetey,tsignal,tslope] [s]
|
|
||||||
3.0 #pickwinP# %for initial AIC pick, length of P-pick window [s]
|
|
||||||
6.0 #Precalcwin# %for HOS/AR, window length [s] for recalculation of CF (relative to 1st pick)
|
|
||||||
0.2 #aictsmooth# %for HOS/AR, take average of samples for smoothing of AIC-function [s]
|
|
||||||
0.1 #tsmoothP# %for HOS/AR, take average of samples for smoothing CF [s]
|
|
||||||
0.001 #ausP# %for HOS/AR, artificial uplift of samples (aus) of CF (P)
|
|
||||||
1.3 #nfacP# %for HOS/AR, noise factor for noise level determination (P)
|
|
||||||
#H-components#
|
|
||||||
ARH #algoS# %choose algorithm for S-onset determination (ARH or AR3)
|
|
||||||
0.8 #tdet1h# %for HOS/AR, length of AR-determination window [s], H-components, 1st pick
|
|
||||||
0.4 #tpred1h# %for HOS/AR, length of AR-prediction window [s], H-components, 1st pick
|
|
||||||
0.6 #tdet2h# %for HOS/AR, length of AR-determinaton window [s], H-components, 2nd pick
|
|
||||||
0.3 #tpred2h# %for HOS/AR, length of AR-prediction window [s], H-components, 2nd pick
|
|
||||||
4 #Sarorder# %for AR-picker, order of AR process of H-components
|
|
||||||
5.0 #Srecalcwin# %for AR-picker, window length [s] for recalculation of CF (2nd pick) (H)
|
|
||||||
3.0 #pickwinS# %for initial AIC pick, length of S-pick window [s]
|
|
||||||
2 0.2 1.5 0.5 #tsnrh# %for ARH/AR3, window lengths for SNR-and slope estimation [tnoise,tsafetey,tsignal,tslope] [s]
|
|
||||||
0.5 #aictsmoothS# %for AIC-picker, take average of samples for smoothing of AIC-function [s]
|
|
||||||
0.7 #tsmoothS# %for AR-picker, take average of samples for smoothing CF [s] (S)
|
|
||||||
0.9 #ausS# %for HOS/AR, artificial uplift of samples (aus) of CF (S)
|
|
||||||
1.5 #nfacS# %for AR-picker, noise factor for noise level determination (S)
|
|
||||||
%first-motion picker%
|
|
||||||
1 #minfmweight# %minimum required P weight for first-motion determination
|
|
||||||
2 #minFMSNR# %miniumum required SNR for first-motion determination
|
|
||||||
0.2 #fmpickwin# %pick window around P onset for calculating zero crossings
|
|
||||||
%quality assessment%
|
|
||||||
#inital AIC onset#
|
|
||||||
0.01 0.02 0.04 0.08 #timeerrorsP# %discrete time errors [s] corresponding to picking weights [0 1 2 3] for P
|
|
||||||
0.04 0.08 0.16 0.32 #timeerrorsS# %discrete time errors [s] corresponding to picking weights [0 1 2 3] for S
|
|
||||||
4 #minAICPslope# %below this slope [counts/s] the initial P pick is rejected
|
|
||||||
1.2 #minAICPSNR# %below this SNR the initial P pick is rejected
|
|
||||||
2 #minAICSslope# %below this slope [counts/s] the initial S pick is rejected
|
|
||||||
1.5 #minAICSSNR# %below this SNR the initial S pick is rejected
|
|
||||||
#check duration of signal using envelope function#
|
|
||||||
3 #minsiglength# %minimum required length of signal [s]
|
|
||||||
1.0 #noisefactor# %noiselevel*noisefactor=threshold
|
|
||||||
40 #minpercent# %required percentage of samples higher than threshold
|
|
||||||
#check for spuriously picked S-onsets#
|
|
||||||
2.0 #zfac# %P-amplitude must exceed at least zfac times RMS-S amplitude
|
|
||||||
#check statistics of P onsets#
|
|
||||||
2.5 #mdttolerance# %maximum allowed deviation of P picks from median [s]
|
|
||||||
#wadati check#
|
|
||||||
1.0 #wdttolerance# %maximum allowed deviation from Wadati-diagram
|
|
||||||
|
|
||||||
@@ -1,100 +0,0 @@
|
|||||||
%This is a parameter input file for autoPyLoT.
|
|
||||||
%All main and special settings regarding data handling
|
|
||||||
%and picking are to be set here!
|
|
||||||
%Parameters are optimized for regional data sets!
|
|
||||||
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
|
||||||
|
|
||||||
#main settings#
|
|
||||||
/DATA/Egelados #rootpath# %project path
|
|
||||||
EVENT_DATA/LOCAL #datapath# %data path
|
|
||||||
2006.01_Nisyros #database# %name of data base
|
|
||||||
e1412.008.06 #eventID# %event ID for single event processing
|
|
||||||
/DATA/Egelados/STAT_INFO #invdir# %full path to inventory or dataless-seed file
|
|
||||||
PILOT #datastructure# %choose data structure
|
|
||||||
0 #iplot# %flag for plotting: 0 none, 1, partly, >1 everything
|
|
||||||
True #apverbose# %choose 'True' or 'False' for terminal output
|
|
||||||
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
|
||||||
#NLLoc settings#
|
|
||||||
/home/ludger/NLLOC #nllocbin# %path to NLLoc executable
|
|
||||||
/home/ludger/NLLOC/Insheim #nllocroot# %root of NLLoc-processing directory
|
|
||||||
AUTOPHASES.obs #phasefile# %name of autoPyLoT-output phase file for NLLoc
|
|
||||||
%(in nllocroot/obs)
|
|
||||||
Insheim_min1d2015_auto.in #ctrfile# %name of autoPyLoT-output control file for NLLoc
|
|
||||||
%(in nllocroot/run)
|
|
||||||
ttime #ttpatter# %pattern of NLLoc ttimes from grid
|
|
||||||
%(in nllocroot/times)
|
|
||||||
AUTOLOC_nlloc #outpatter# %pattern of NLLoc-output file
|
|
||||||
%(returns 'eventID_outpatter')
|
|
||||||
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
|
||||||
#parameters for seismic moment estimation#
|
|
||||||
3530 #vp# %average P-wave velocity
|
|
||||||
2700 #rho# %average rock density [kg/m^3]
|
|
||||||
1000f**0.8 #Qp# %quality factor for P waves (Qp*f^a)
|
|
||||||
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
|
||||||
AUTOFOCMEC_AIC_HOS4_ARH.in #focmecin# %name of focmec input file containing derived polarities
|
|
||||||
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
|
||||||
#common settings picker#
|
|
||||||
20 #pstart# %start time [s] for calculating CF for P-picking
|
|
||||||
100 #pstop# %end time [s] for calculating CF for P-picking
|
|
||||||
1.0 #sstart# %start time [s] after or before(-) P-onset for calculating CF for S-picking
|
|
||||||
100 #sstop# %end time [s] after P-onset for calculating CF for S-picking
|
|
||||||
3 10 #bpz1# %lower/upper corner freq. of first band pass filter Z-comp. [Hz]
|
|
||||||
3 12 #bpz2# %lower/upper corner freq. of second band pass filter Z-comp. [Hz]
|
|
||||||
3 8 #bph1# %lower/upper corner freq. of first band pass filter H-comp. [Hz]
|
|
||||||
3 6 #bph2# %lower/upper corner freq. of second band pass filter H-comp. [Hz]
|
|
||||||
#special settings for calculating CF#
|
|
||||||
%!!Be careful when editing the following!!
|
|
||||||
#Z-component#
|
|
||||||
HOS #algoP# %choose algorithm for P-onset determination (HOS, ARZ, or AR3)
|
|
||||||
7 #tlta# %for HOS-/AR-AIC-picker, length of LTA window [s]
|
|
||||||
4 #hosorder# %for HOS-picker, order of Higher Order Statistics
|
|
||||||
2 #Parorder# %for AR-picker, order of AR process of Z-component
|
|
||||||
1.2 #tdet1z# %for AR-picker, length of AR determination window [s] for Z-component, 1st pick
|
|
||||||
0.4 #tpred1z# %for AR-picker, length of AR prediction window [s] for Z-component, 1st pick
|
|
||||||
0.6 #tdet2z# %for AR-picker, length of AR determination window [s] for Z-component, 2nd pick
|
|
||||||
0.2 #tpred2z# %for AR-picker, length of AR prediction window [s] for Z-component, 2nd pick
|
|
||||||
0.001 #addnoise# %add noise to seismogram for stable AR prediction
|
|
||||||
5 0.2 3.0 1.5 #tsnrz# %for HOS/AR, window lengths for SNR-and slope estimation [tnoise,tsafetey,tsignal,tslope] [s]
|
|
||||||
3 #pickwinP# %for initial AIC and refined pick, length of P-pick window [s]
|
|
||||||
8 #Precalcwin# %for HOS/AR, window length [s] for recalculation of CF (relative to 1st pick)
|
|
||||||
1.0 #aictsmooth# %for HOS/AR, take average of samples for smoothing of AIC-function [s]
|
|
||||||
0.3 #tsmoothP# %for HOS/AR, take average of samples for smoothing CF [s]
|
|
||||||
0.3 #ausP# %for HOS/AR, artificial uplift of samples (aus) of CF (P)
|
|
||||||
1.3 #nfacP# %for HOS/AR, noise factor for noise level determination (P)
|
|
||||||
#H-components#
|
|
||||||
ARH #algoS# %choose algorithm for S-onset determination (ARH or AR3)
|
|
||||||
0.8 #tdet1h# %for HOS/AR, length of AR-determination window [s], H-components, 1st pick
|
|
||||||
0.4 #tpred1h# %for HOS/AR, length of AR-prediction window [s], H-components, 1st pick
|
|
||||||
0.6 #tdet2h# %for HOS/AR, length of AR-determinaton window [s], H-components, 2nd pick
|
|
||||||
0.3 #tpred2h# %for HOS/AR, length of AR-prediction window [s], H-components, 2nd pick
|
|
||||||
4 #Sarorder# %for AR-picker, order of AR process of H-components
|
|
||||||
10 #Srecalcwin# %for AR-picker, window length [s] for recalculation of CF (2nd pick) (H)
|
|
||||||
25 #pickwinS# %for initial AIC and refined pick, length of S-pick window [s]
|
|
||||||
5 0.2 3.0 3.0 #tsnrh# %for ARH/AR3, window lengths for SNR-and slope estimation [tnoise,tsafetey,tsignal,tslope] [s]
|
|
||||||
3.5 #aictsmoothS# %for AIC-picker, take average of samples for smoothing of AIC-function [s]
|
|
||||||
1.0 #tsmoothS# %for AR-picker, take average of samples for smoothing CF [s] (S)
|
|
||||||
0.2 #ausS# %for HOS/AR, artificial uplift of samples (aus) of CF (S)
|
|
||||||
1.5 #nfacS# %for AR-picker, noise factor for noise level determination (S)
|
|
||||||
%first-motion picker%
|
|
||||||
1 #minfmweight# %minimum required p weight for first-motion determination
|
|
||||||
2 #minFMSNR# %miniumum required SNR for first-motion determination
|
|
||||||
6.0 #fmpickwin# %pick window around P onset for calculating zero crossings
|
|
||||||
%quality assessment%
|
|
||||||
#inital AIC onset#
|
|
||||||
0.04 0.08 0.16 0.32 #timeerrorsP# %discrete time errors [s] corresponding to picking weights [0 1 2 3] for P
|
|
||||||
0.04 0.08 0.16 0.32 #timeerrorsS# %discrete time errors [s] corresponding to picking weights [0 1 2 3] for S
|
|
||||||
3 #minAICPslope# %below this slope [counts/s] the initial P pick is rejected
|
|
||||||
1.2 #minAICPSNR# %below this SNR the initial P pick is rejected
|
|
||||||
5 #minAICSslope# %below this slope [counts/s] the initial S pick is rejected
|
|
||||||
2.5 #minAICSSNR# %below this SNR the initial S pick is rejected
|
|
||||||
#check duration of signal using envelope function#
|
|
||||||
30 #minsiglength# %minimum required length of signal [s]
|
|
||||||
2.5 #noisefactor# %noiselevel*noisefactor=threshold
|
|
||||||
60 #minpercent# %required percentage of samples higher than threshold
|
|
||||||
#check for spuriously picked S-onsets#
|
|
||||||
0.5 #zfac# %P-amplitude must exceed at least zfac times RMS-S amplitude
|
|
||||||
#check statistics of P onsets#
|
|
||||||
45 #mdttolerance# %maximum allowed deviation of P picks from median [s]
|
|
||||||
#wadati check#
|
|
||||||
3.0 #wdttolerance# %maximum allowed deviation from Wadati-diagram
|
|
||||||
|
|
||||||
@@ -1,2 +0,0 @@
|
|||||||
P bandpass 4 2.0 20.0
|
|
||||||
S bandpass 4 2.0 15.0
|
|
||||||
@@ -1,98 +0,0 @@
|
|||||||
%This is a example parameter input file for PyLoT.
|
|
||||||
%All main and special settings regarding data handling
|
|
||||||
%and picking are to be set here!
|
|
||||||
%Parameters shown here are optimized for local data sets!
|
|
||||||
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
|
||||||
#main settings#
|
|
||||||
/data/Geothermie/Insheim #rootpath# %project path
|
|
||||||
EVENT_DATA/LOCAL #datapath# %data path
|
|
||||||
2013.02_Insheim #database# %name of data base
|
|
||||||
e0019.048.13 #eventID# %event ID for single event processing
|
|
||||||
/data/Geothermie/Insheim/STAT_INFO #invdir# %full path to inventory or dataless-seed file
|
|
||||||
PILOT #datastructure# %choose data structure
|
|
||||||
0 #iplot# %flag for plotting: 0 none, 1 partly, >1 everything
|
|
||||||
True #apverbose# %choose 'True' or 'False' for terminal output
|
|
||||||
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
|
||||||
#NLLoc settings#
|
|
||||||
/progs/bin #nllocbin# %path to NLLoc executable
|
|
||||||
/data/Geothermie/Insheim/LOCALISATION/NLLoc #nllocroot# %root of NLLoc-processing directory
|
|
||||||
AUTOPHASES.obs #phasefile# %name of autoPyLoT-output phase file for NLLoc
|
|
||||||
%(in nllocroot/obs)
|
|
||||||
Insheim_min1d2015.in #ctrfile# %name of PyLoT-output control file for NLLoc
|
|
||||||
%(in nllocroot/run)
|
|
||||||
ttime #ttpatter# %pattern of NLLoc ttimes from grid
|
|
||||||
%(in nllocroot/times)
|
|
||||||
AUTOLOC_nlloc #outpatter# %pattern of NLLoc-output file
|
|
||||||
%(returns 'eventID_outpatter')
|
|
||||||
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
|
||||||
#parameters for seismic moment estimation#
|
|
||||||
3530 #vp# %average P-wave velocity
|
|
||||||
2500 #rho# %average rock density [kg/m^3]
|
|
||||||
300 0.8 #Qp# %quality factor for P waves (Qp*f^a); list(Qp, a)
|
|
||||||
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
|
||||||
AUTOFOCMEC_AIC_HOS4_ARH.in #focmecin# %name of focmec input file containing derived polarities
|
|
||||||
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
|
||||||
#common settings picker#
|
|
||||||
15.0 #pstart# %start time [s] for calculating CF for P-picking
|
|
||||||
60.0 #pstop# %end time [s] for calculating CF for P-picking
|
|
||||||
-1.0 #sstart# %start time [s] relative to P-onset for calculating CF for S-picking
|
|
||||||
10.0 #sstop# %end time [s] after P-onset for calculating CF for S-picking
|
|
||||||
2 20 #bpz1# %lower/upper corner freq. of first band pass filter Z-comp. [Hz]
|
|
||||||
2 30 #bpz2# %lower/upper corner freq. of second band pass filter Z-comp. [Hz]
|
|
||||||
2 15 #bph1# %lower/upper corner freq. of first band pass filter H-comp. [Hz]
|
|
||||||
2 20 #bph2# %lower/upper corner freq. of second band pass filter z-comp. [Hz]
|
|
||||||
#special settings for calculating CF#
|
|
||||||
%!!Edit the following only if you know what you are doing!!%
|
|
||||||
#Z-component#
|
|
||||||
HOS #algoP# %choose algorithm for P-onset determination (HOS, ARZ, or AR3)
|
|
||||||
7.0 #tlta# %for HOS-/AR-AIC-picker, length of LTA window [s]
|
|
||||||
4 #hosorder# %for HOS-picker, order of Higher Order Statistics
|
|
||||||
2 #Parorder# %for AR-picker, order of AR process of Z-component
|
|
||||||
1.2 #tdet1z# %for AR-picker, length of AR determination window [s] for Z-component, 1st pick
|
|
||||||
0.4 #tpred1z# %for AR-picker, length of AR prediction window [s] for Z-component, 1st pick
|
|
||||||
0.6 #tdet2z# %for AR-picker, length of AR determination window [s] for Z-component, 2nd pick
|
|
||||||
0.2 #tpred2z# %for AR-picker, length of AR prediction window [s] for Z-component, 2nd pick
|
|
||||||
0.001 #addnoise# %add noise to seismogram for stable AR prediction
|
|
||||||
3 0.1 0.5 0.5 #tsnrz# %for HOS/AR, window lengths for SNR-and slope estimation [tnoise,tsafetey,tsignal,tslope] [s]
|
|
||||||
3.0 #pickwinP# %for initial AIC pick, length of P-pick window [s]
|
|
||||||
6.0 #Precalcwin# %for HOS/AR, window length [s] for recalculation of CF (relative to 1st pick)
|
|
||||||
0.2 #aictsmooth# %for HOS/AR, take average of samples for smoothing of AIC-function [s]
|
|
||||||
0.1 #tsmoothP# %for HOS/AR, take average of samples for smoothing CF [s]
|
|
||||||
0.001 #ausP# %for HOS/AR, artificial uplift of samples (aus) of CF (P)
|
|
||||||
1.3 #nfacP# %for HOS/AR, noise factor for noise level determination (P)
|
|
||||||
#H-components#
|
|
||||||
ARH #algoS# %choose algorithm for S-onset determination (ARH or AR3)
|
|
||||||
0.8 #tdet1h# %for HOS/AR, length of AR-determination window [s], H-components, 1st pick
|
|
||||||
0.4 #tpred1h# %for HOS/AR, length of AR-prediction window [s], H-components, 1st pick
|
|
||||||
0.6 #tdet2h# %for HOS/AR, length of AR-determinaton window [s], H-components, 2nd pick
|
|
||||||
0.3 #tpred2h# %for HOS/AR, length of AR-prediction window [s], H-components, 2nd pick
|
|
||||||
4 #Sarorder# %for AR-picker, order of AR process of H-components
|
|
||||||
5.0 #Srecalcwin# %for AR-picker, window length [s] for recalculation of CF (2nd pick) (H)
|
|
||||||
3.0 #pickwinS# %for initial AIC pick, length of S-pick window [s]
|
|
||||||
2 0.2 1.5 0.5 #tsnrh# %for ARH/AR3, window lengths for SNR-and slope estimation [tnoise,tsafetey,tsignal,tslope] [s]
|
|
||||||
0.5 #aictsmoothS# %for AIC-picker, take average of samples for smoothing of AIC-function [s]
|
|
||||||
0.7 #tsmoothS# %for AR-picker, take average of samples for smoothing CF [s] (S)
|
|
||||||
0.9 #ausS# %for HOS/AR, artificial uplift of samples (aus) of CF (S)
|
|
||||||
1.5 #nfacS# %for AR-picker, noise factor for noise level determination (S)
|
|
||||||
%first-motion picker%
|
|
||||||
1 #minfmweight# %minimum required P weight for first-motion determination
|
|
||||||
2 #minFMSNR# %miniumum required SNR for first-motion determination
|
|
||||||
0.2 #fmpickwin# %pick window around P onset for calculating zero crossings
|
|
||||||
%quality assessment%
|
|
||||||
#inital AIC onset#
|
|
||||||
0.01 0.02 0.04 0.08 #timeerrorsP# %discrete time errors [s] corresponding to picking weights [0 1 2 3] for P
|
|
||||||
0.04 0.08 0.16 0.32 #timeerrorsS# %discrete time errors [s] corresponding to picking weights [0 1 2 3] for S
|
|
||||||
4 #minAICPslope# %below this slope [counts/s] the initial P pick is rejected
|
|
||||||
1.2 #minAICPSNR# %below this SNR the initial P pick is rejected
|
|
||||||
2 #minAICSslope# %below this slope [counts/s] the initial S pick is rejected
|
|
||||||
1.5 #minAICSSNR# %below this SNR the initial S pick is rejected
|
|
||||||
#check duration of signal using envelope function#
|
|
||||||
3 #minsiglength# %minimum required length of signal [s]
|
|
||||||
1.0 #noisefactor# %noiselevel*noisefactor=threshold
|
|
||||||
40 #minpercent# %required percentage of samples higher than threshold
|
|
||||||
#check for spuriously picked S-onsets#
|
|
||||||
2.0 #zfac# %P-amplitude must exceed at least zfac times RMS-S amplitude
|
|
||||||
#check statistics of P onsets#
|
|
||||||
2.5 #mdttolerance# %maximum allowed deviation of P picks from median [s]
|
|
||||||
#wadati check#
|
|
||||||
1.0 #wdttolerance# %maximum allowed deviation from Wadati-diagram
|
|
||||||
Binary file not shown.
|
Before Width: | Height: | Size: 2.2 KiB |
@@ -1 +0,0 @@
|
|||||||
0.1a
|
|
||||||
@@ -1,21 +0,0 @@
|
|||||||
#!/usr/bin/env python
|
|
||||||
# -*- coding: utf-8 -*-
|
|
||||||
|
|
||||||
from pylot.core.io.phases import writephases
|
|
||||||
from pylot.core.util.version import get_git_version as _getVersionString
|
|
||||||
|
|
||||||
__version__ = _getVersionString()
|
|
||||||
|
|
||||||
def export(picks, fnout):
|
|
||||||
'''
|
|
||||||
Take <picks> dictionary and exports picking data to a NLLOC-obs
|
|
||||||
<phasefile> without creating an ObsPy event object.
|
|
||||||
|
|
||||||
:param picks: picking data dictionary
|
|
||||||
:type picks: dict
|
|
||||||
|
|
||||||
:param fnout: complete path to the exporting obs file
|
|
||||||
:type fnout: str
|
|
||||||
'''
|
|
||||||
# write phases to NLLoc-phase file
|
|
||||||
writephases(picks, 'HYPO71', fnout)
|
|
||||||
@@ -0,0 +1,376 @@
|
|||||||
|
#!/usr/bin/env python
|
||||||
|
# -*- coding: utf-8 -*-
|
||||||
|
|
||||||
|
import matplotlib.pyplot as plt
|
||||||
|
import numpy as np
|
||||||
|
import obspy
|
||||||
|
from PySide import QtGui
|
||||||
|
from matplotlib.backends.backend_qt4agg import NavigationToolbar2QT as NavigationToolbar
|
||||||
|
from mpl_toolkits.basemap import Basemap
|
||||||
|
from pylot.core.util.widgets import PickDlg
|
||||||
|
from scipy.interpolate import griddata
|
||||||
|
|
||||||
|
plt.interactive(False)
|
||||||
|
|
||||||
|
|
||||||
|
class map_projection(QtGui.QWidget):
|
||||||
|
def __init__(self, parent, figure=None):
|
||||||
|
'''
|
||||||
|
|
||||||
|
:param: picked, can be False, auto, manual
|
||||||
|
:value: str
|
||||||
|
'''
|
||||||
|
QtGui.QWidget.__init__(self)
|
||||||
|
self._parent = parent
|
||||||
|
self.metadata = parent.metadata
|
||||||
|
self.parser = parent.metadata[1]
|
||||||
|
self.picks = None
|
||||||
|
self.picks_dict = None
|
||||||
|
self.eventLoc = None
|
||||||
|
self.figure = figure
|
||||||
|
self.init_graphics()
|
||||||
|
self.init_stations()
|
||||||
|
self.init_basemap(resolution='l')
|
||||||
|
self.init_map()
|
||||||
|
# self.show()
|
||||||
|
|
||||||
|
def init_map(self):
|
||||||
|
self.init_lat_lon_dimensions()
|
||||||
|
self.init_lat_lon_grid()
|
||||||
|
self.init_x_y_dimensions()
|
||||||
|
self.connectSignals()
|
||||||
|
self.draw_everything()
|
||||||
|
|
||||||
|
def onpick(self, event):
|
||||||
|
ind = event.ind
|
||||||
|
button = event.mouseevent.button
|
||||||
|
if ind == [] or not button == 1:
|
||||||
|
return
|
||||||
|
data = self._parent.get_data().getWFData()
|
||||||
|
for index in ind:
|
||||||
|
station = str(self.station_names[index].split('.')[-1])
|
||||||
|
try:
|
||||||
|
pickDlg = PickDlg(self, parameter=self._parent._inputs,
|
||||||
|
data=data.select(station=station),
|
||||||
|
station=station,
|
||||||
|
picks=self._parent.get_current_event().getPick(station),
|
||||||
|
autopicks=self._parent.get_current_event().getAutopick(station))
|
||||||
|
except Exception as e:
|
||||||
|
message = 'Could not generate Plot for station {st}.\n {er}'.format(st=station, er=e)
|
||||||
|
self._warn(message)
|
||||||
|
print(message, e)
|
||||||
|
return
|
||||||
|
pyl_mw = self._parent
|
||||||
|
try:
|
||||||
|
if pickDlg.exec_():
|
||||||
|
pyl_mw.setDirty(True)
|
||||||
|
pyl_mw.update_status('picks accepted ({0})'.format(station))
|
||||||
|
replot = pyl_mw.get_current_event().setPick(station, pickDlg.getPicks())
|
||||||
|
self._refresh_drawings()
|
||||||
|
if replot:
|
||||||
|
pyl_mw.plotWaveformData()
|
||||||
|
pyl_mw.drawPicks()
|
||||||
|
pyl_mw.draw()
|
||||||
|
else:
|
||||||
|
pyl_mw.drawPicks(station)
|
||||||
|
pyl_mw.draw()
|
||||||
|
else:
|
||||||
|
pyl_mw.update_status('picks discarded ({0})'.format(station))
|
||||||
|
except Exception as e:
|
||||||
|
message = 'Could not save picks for station {st}.\n{er}'.format(st=station, er=e)
|
||||||
|
self._warn(message)
|
||||||
|
print(message, e)
|
||||||
|
|
||||||
|
def connectSignals(self):
|
||||||
|
self.comboBox_phase.currentIndexChanged.connect(self._refresh_drawings)
|
||||||
|
self.zoom_id = self.basemap.ax.figure.canvas.mpl_connect('scroll_event', self.zoom)
|
||||||
|
|
||||||
|
def init_graphics(self):
|
||||||
|
if not self.figure:
|
||||||
|
if not hasattr(self._parent, 'am_figure'):
|
||||||
|
self.figure = plt.figure()
|
||||||
|
self.toolbar = NavigationToolbar(self.figure.canvas, self)
|
||||||
|
else:
|
||||||
|
self.figure = self._parent.am_figure
|
||||||
|
self.toolbar = self._parent.am_toolbar
|
||||||
|
|
||||||
|
self.main_ax = self.figure.add_subplot(111)
|
||||||
|
self.canvas = self.figure.canvas
|
||||||
|
|
||||||
|
self.main_box = QtGui.QVBoxLayout()
|
||||||
|
self.setLayout(self.main_box)
|
||||||
|
|
||||||
|
self.top_row = QtGui.QHBoxLayout()
|
||||||
|
self.main_box.addLayout(self.top_row)
|
||||||
|
|
||||||
|
self.comboBox_phase = QtGui.QComboBox()
|
||||||
|
self.comboBox_phase.insertItem(0, 'P')
|
||||||
|
self.comboBox_phase.insertItem(1, 'S')
|
||||||
|
|
||||||
|
self.comboBox_am = QtGui.QComboBox()
|
||||||
|
self.comboBox_am.insertItem(0, 'auto')
|
||||||
|
self.comboBox_am.insertItem(1, 'manual')
|
||||||
|
|
||||||
|
self.top_row.addWidget(QtGui.QLabel('Select a phase: '))
|
||||||
|
self.top_row.addWidget(self.comboBox_phase)
|
||||||
|
self.top_row.setStretch(1, 1) # set stretch of item 1 to 1
|
||||||
|
|
||||||
|
self.main_box.addWidget(self.canvas)
|
||||||
|
self.main_box.addWidget(self.toolbar)
|
||||||
|
|
||||||
|
def init_stations(self):
|
||||||
|
def get_station_names_lat_lon(parser):
|
||||||
|
station_names = []
|
||||||
|
lat = []
|
||||||
|
lon = []
|
||||||
|
for station in parser.stations:
|
||||||
|
station_name = station[0].station_call_letters
|
||||||
|
network = station[0].network_code
|
||||||
|
if not station_name in station_names:
|
||||||
|
station_names.append(network + '.' + station_name)
|
||||||
|
lat.append(station[0].latitude)
|
||||||
|
lon.append(station[0].longitude)
|
||||||
|
return station_names, lat, lon
|
||||||
|
|
||||||
|
station_names, lat, lon = get_station_names_lat_lon(self.parser)
|
||||||
|
self.station_names = station_names
|
||||||
|
self.lat = lat
|
||||||
|
self.lon = lon
|
||||||
|
|
||||||
|
def init_picks(self):
|
||||||
|
phase = self.comboBox_phase.currentText()
|
||||||
|
|
||||||
|
def get_picks(station_names):
|
||||||
|
picks = []
|
||||||
|
for station in station_names:
|
||||||
|
try:
|
||||||
|
station = station.split('.')[-1]
|
||||||
|
picks.append(self.picks_dict[station][phase]['mpp'])
|
||||||
|
except:
|
||||||
|
picks.append(np.nan)
|
||||||
|
return picks
|
||||||
|
|
||||||
|
def get_picks_rel(picks):
|
||||||
|
picks_rel = []
|
||||||
|
picks_utc = []
|
||||||
|
for pick in picks:
|
||||||
|
if type(pick) is obspy.core.utcdatetime.UTCDateTime:
|
||||||
|
picks_utc.append(pick)
|
||||||
|
minp = min(picks_utc)
|
||||||
|
for pick in picks:
|
||||||
|
if type(pick) is obspy.core.utcdatetime.UTCDateTime:
|
||||||
|
pick -= minp
|
||||||
|
picks_rel.append(pick)
|
||||||
|
return picks_rel
|
||||||
|
|
||||||
|
self.picks = get_picks(self.station_names)
|
||||||
|
self.picks_rel = get_picks_rel(self.picks)
|
||||||
|
|
||||||
|
def init_picks_active(self):
|
||||||
|
def remove_nan_picks(picks):
|
||||||
|
picks_no_nan = []
|
||||||
|
for pick in picks:
|
||||||
|
if not np.isnan(pick):
|
||||||
|
picks_no_nan.append(pick)
|
||||||
|
return picks_no_nan
|
||||||
|
|
||||||
|
self.picks_no_nan = remove_nan_picks(self.picks_rel)
|
||||||
|
|
||||||
|
def init_stations_active(self):
|
||||||
|
def remove_nan_lat_lon(picks, lat, lon):
|
||||||
|
lat_no_nan = []
|
||||||
|
lon_no_nan = []
|
||||||
|
for index, pick in enumerate(picks):
|
||||||
|
if not np.isnan(pick):
|
||||||
|
lat_no_nan.append(lat[index])
|
||||||
|
lon_no_nan.append(lon[index])
|
||||||
|
return lat_no_nan, lon_no_nan
|
||||||
|
|
||||||
|
self.lat_no_nan, self.lon_no_nan = remove_nan_lat_lon(self.picks_rel, self.lat, self.lon)
|
||||||
|
|
||||||
|
def init_lat_lon_dimensions(self):
|
||||||
|
def get_lon_lat_dim(lon, lat):
|
||||||
|
londim = max(lon) - min(lon)
|
||||||
|
latdim = max(lat) - min(lat)
|
||||||
|
return londim, latdim
|
||||||
|
|
||||||
|
self.londim, self.latdim = get_lon_lat_dim(self.lon, self.lat)
|
||||||
|
|
||||||
|
def init_x_y_dimensions(self):
|
||||||
|
def get_x_y_dim(x, y):
|
||||||
|
xdim = max(x) - min(x)
|
||||||
|
ydim = max(y) - min(y)
|
||||||
|
return xdim, ydim
|
||||||
|
|
||||||
|
self.x, self.y = self.basemap(self.lon, self.lat)
|
||||||
|
self.xdim, self.ydim = get_x_y_dim(self.x, self.y)
|
||||||
|
|
||||||
|
def init_basemap(self, resolution='l'):
|
||||||
|
# basemap = Basemap(projection=projection, resolution = resolution, ax=self.main_ax)
|
||||||
|
basemap = Basemap(projection='lcc', resolution=resolution, ax=self.main_ax,
|
||||||
|
width=5e6, height=2e6,
|
||||||
|
lat_0=(min(self.lat) + max(self.lat)) / 2.,
|
||||||
|
lon_0=(min(self.lon) + max(self.lon)) / 2.)
|
||||||
|
|
||||||
|
# basemap.fillcontinents(color=None, lake_color='aqua',zorder=1)
|
||||||
|
basemap.drawmapboundary(zorder=2) # fill_color='darkblue')
|
||||||
|
basemap.shadedrelief(zorder=3)
|
||||||
|
basemap.drawcountries(zorder=4)
|
||||||
|
basemap.drawstates(zorder=5)
|
||||||
|
basemap.drawcoastlines(zorder=6)
|
||||||
|
self.basemap = basemap
|
||||||
|
self.figure.tight_layout()
|
||||||
|
|
||||||
|
def init_lat_lon_grid(self):
|
||||||
|
def get_lat_lon_axis(lat, lon):
|
||||||
|
steplat = (max(lat) - min(lat)) / 250
|
||||||
|
steplon = (max(lon) - min(lon)) / 250
|
||||||
|
|
||||||
|
lataxis = np.arange(min(lat), max(lat), steplat)
|
||||||
|
lonaxis = np.arange(min(lon), max(lon), steplon)
|
||||||
|
return lataxis, lonaxis
|
||||||
|
|
||||||
|
def get_lat_lon_grid(lataxis, lonaxis):
|
||||||
|
longrid, latgrid = np.meshgrid(lonaxis, lataxis)
|
||||||
|
return latgrid, longrid
|
||||||
|
|
||||||
|
self.lataxis, self.lonaxis = get_lat_lon_axis(self.lat, self.lon)
|
||||||
|
self.latgrid, self.longrid = get_lat_lon_grid(self.lataxis, self.lonaxis)
|
||||||
|
|
||||||
|
def init_picksgrid(self):
|
||||||
|
self.picksgrid_no_nan = griddata((self.lat_no_nan, self.lon_no_nan),
|
||||||
|
self.picks_no_nan, (self.latgrid, self.longrid),
|
||||||
|
method='linear') ##################
|
||||||
|
|
||||||
|
def draw_contour_filled(self, nlevel='50'):
|
||||||
|
levels = np.linspace(min(self.picks_no_nan), max(self.picks_no_nan), nlevel)
|
||||||
|
self.contourf = self.basemap.contourf(self.longrid, self.latgrid, self.picksgrid_no_nan,
|
||||||
|
levels, latlon=True, zorder=9, alpha=0.5)
|
||||||
|
|
||||||
|
def scatter_all_stations(self):
|
||||||
|
self.sc = self.basemap.scatter(self.lon, self.lat, s=50, facecolor='none', latlon=True,
|
||||||
|
zorder=10, picker=True, edgecolor='m', label='Not Picked')
|
||||||
|
self.cid = self.canvas.mpl_connect('pick_event', self.onpick)
|
||||||
|
if self.eventLoc:
|
||||||
|
lat, lon = self.eventLoc
|
||||||
|
self.sc_event = self.basemap.scatter(lon, lat, s=100, facecolor='red',
|
||||||
|
latlon=True, zorder=11, label='Event (might be outside map region)')
|
||||||
|
|
||||||
|
def scatter_picked_stations(self):
|
||||||
|
lon = self.lon_no_nan
|
||||||
|
lat = self.lat_no_nan
|
||||||
|
|
||||||
|
# workaround because of an issue with latlon transformation of arrays with len <3
|
||||||
|
if len(lon) <= 2 and len(lat) <= 2:
|
||||||
|
self.sc_picked = self.basemap.scatter(lon[0], lat[0], s=50, facecolor='white',
|
||||||
|
c=self.picks_no_nan[0], latlon=True, zorder=11, label='Picked')
|
||||||
|
if len(lon) == 2 and len(lat) == 2:
|
||||||
|
self.sc_picked = self.basemap.scatter(lon[1], lat[1], s=50, facecolor='white',
|
||||||
|
c=self.picks_no_nan[1], latlon=True, zorder=11)
|
||||||
|
else:
|
||||||
|
self.sc_picked = self.basemap.scatter(lon, lat, s=50, facecolor='white',
|
||||||
|
c=self.picks_no_nan, latlon=True, zorder=11, label='Picked')
|
||||||
|
|
||||||
|
def annotate_ax(self):
|
||||||
|
self.annotations = []
|
||||||
|
for index, name in enumerate(self.station_names):
|
||||||
|
self.annotations.append(self.main_ax.annotate(' %s' % name, xy=(self.x[index], self.y[index]),
|
||||||
|
fontsize='x-small', color='white', zorder=12))
|
||||||
|
self.legend = self.main_ax.legend(loc=1)
|
||||||
|
|
||||||
|
def add_cbar(self, label):
|
||||||
|
cbar = self.main_ax.figure.colorbar(self.sc_picked, fraction=0.025)
|
||||||
|
cbar.set_label(label)
|
||||||
|
return cbar
|
||||||
|
|
||||||
|
def refresh_drawings(self, picks=None):
|
||||||
|
self.picks_dict = picks
|
||||||
|
self._refresh_drawings()
|
||||||
|
|
||||||
|
def _refresh_drawings(self):
|
||||||
|
self.remove_drawings()
|
||||||
|
self.draw_everything()
|
||||||
|
|
||||||
|
def draw_everything(self):
|
||||||
|
if self.picks_dict:
|
||||||
|
self.init_picks()
|
||||||
|
self.init_picks_active()
|
||||||
|
self.init_stations_active()
|
||||||
|
if len(self.picks_no_nan) >= 3:
|
||||||
|
self.init_picksgrid()
|
||||||
|
self.draw_contour_filled()
|
||||||
|
self.scatter_all_stations()
|
||||||
|
if self.picks_dict:
|
||||||
|
self.scatter_picked_stations()
|
||||||
|
self.cbar = self.add_cbar(label='Time relative to first onset [s]')
|
||||||
|
self.comboBox_phase.setEnabled(True)
|
||||||
|
else:
|
||||||
|
self.comboBox_phase.setEnabled(False)
|
||||||
|
self.annotate_ax()
|
||||||
|
self.canvas.draw()
|
||||||
|
|
||||||
|
def remove_drawings(self):
|
||||||
|
if hasattr(self, 'sc_picked'):
|
||||||
|
self.sc_picked.remove()
|
||||||
|
del (self.sc_picked)
|
||||||
|
if hasattr(self, 'sc_event'):
|
||||||
|
self.sc_event.remove()
|
||||||
|
del (self.sc_event)
|
||||||
|
if hasattr(self, 'cbar'):
|
||||||
|
self.cbar.remove()
|
||||||
|
del (self.cbar)
|
||||||
|
if hasattr(self, 'contourf'):
|
||||||
|
self.remove_contourf()
|
||||||
|
del (self.contourf)
|
||||||
|
if hasattr(self, 'cid'):
|
||||||
|
self.canvas.mpl_disconnect(self.cid)
|
||||||
|
del (self.cid)
|
||||||
|
try:
|
||||||
|
self.sc.remove()
|
||||||
|
except Exception as e:
|
||||||
|
print('Warning: could not remove station scatter plot.\nReason: {}'.format(e))
|
||||||
|
try:
|
||||||
|
self.legend.remove()
|
||||||
|
except Exception as e:
|
||||||
|
print('Warning: could not remove legend. Reason: {}'.format(e))
|
||||||
|
self.canvas.draw()
|
||||||
|
|
||||||
|
def remove_contourf(self):
|
||||||
|
for item in self.contourf.collections:
|
||||||
|
item.remove()
|
||||||
|
|
||||||
|
def remove_annotations(self):
|
||||||
|
for annotation in self.annotations:
|
||||||
|
annotation.remove()
|
||||||
|
|
||||||
|
def zoom(self, event):
|
||||||
|
map = self.basemap
|
||||||
|
xlim = map.ax.get_xlim()
|
||||||
|
ylim = map.ax.get_ylim()
|
||||||
|
x, y = event.xdata, event.ydata
|
||||||
|
zoom = {'up': 1. / 2.,
|
||||||
|
'down': 2.}
|
||||||
|
|
||||||
|
if not event.xdata or not event.ydata:
|
||||||
|
return
|
||||||
|
|
||||||
|
if event.button in zoom:
|
||||||
|
factor = zoom[event.button]
|
||||||
|
xdiff = (xlim[1] - xlim[0]) * factor
|
||||||
|
xl = x - 0.5 * xdiff
|
||||||
|
xr = x + 0.5 * xdiff
|
||||||
|
ydiff = (ylim[1] - ylim[0]) * factor
|
||||||
|
yb = y - 0.5 * ydiff
|
||||||
|
yt = y + 0.5 * ydiff
|
||||||
|
|
||||||
|
if xl < map.xmin or yb < map.ymin or xr > map.xmax or yt > map.ymax:
|
||||||
|
xl, xr = map.xmin, map.xmax
|
||||||
|
yb, yt = map.ymin, map.ymax
|
||||||
|
map.ax.set_xlim(xl, xr)
|
||||||
|
map.ax.set_ylim(yb, yt)
|
||||||
|
map.ax.figure.canvas.draw()
|
||||||
|
|
||||||
|
def _warn(self, message):
|
||||||
|
self.qmb = QtGui.QMessageBox(QtGui.QMessageBox.Icon.Warning,
|
||||||
|
'Warning', message)
|
||||||
|
self.qmb.show()
|
||||||
Whitespace-only changes.
@@ -1,12 +0,0 @@
|
|||||||
#!/usr/bin/env python
|
|
||||||
# -*- coding: utf-8 -*-
|
|
||||||
|
|
||||||
import sys, time
|
|
||||||
from PySide.QtGui import QApplication
|
|
||||||
from pylot.core.util.widgets import HelpForm
|
|
||||||
|
|
||||||
app = QApplication(sys.argv)
|
|
||||||
|
|
||||||
win = HelpForm()
|
|
||||||
win.show()
|
|
||||||
app.exec_()
|
|
||||||
@@ -1,20 +0,0 @@
|
|||||||
#!/usr/bin/env python
|
|
||||||
# -*- coding: utf-8 -*-
|
|
||||||
|
|
||||||
import sys
|
|
||||||
import matplotlib
|
|
||||||
|
|
||||||
matplotlib.use('Qt4Agg')
|
|
||||||
matplotlib.rcParams['backend.qt4'] = 'PySide'
|
|
||||||
|
|
||||||
from PySide.QtGui import QApplication
|
|
||||||
from obspy.core import read
|
|
||||||
from pylot.core.util.widgets import PickDlg
|
|
||||||
import icons_rc
|
|
||||||
|
|
||||||
app = QApplication(sys.argv)
|
|
||||||
|
|
||||||
data = read()
|
|
||||||
win = PickDlg(data=data)
|
|
||||||
win.show()
|
|
||||||
app.exec_()
|
|
||||||
@@ -1,12 +0,0 @@
|
|||||||
#!/usr/bin/env python
|
|
||||||
# -*- coding: utf-8 -*-
|
|
||||||
|
|
||||||
import sys, time
|
|
||||||
from PySide.QtGui import QApplication
|
|
||||||
from pylot.core.util.widgets import PropertiesDlg
|
|
||||||
|
|
||||||
app = QApplication(sys.argv)
|
|
||||||
|
|
||||||
win = PropertiesDlg()
|
|
||||||
win.show()
|
|
||||||
app.exec_()
|
|
||||||
@@ -1,17 +0,0 @@
|
|||||||
#!/usr/bin/env python
|
|
||||||
# -*- coding: utf-8 -*-
|
|
||||||
|
|
||||||
|
|
||||||
import sys, time
|
|
||||||
from PySide.QtGui import QApplication
|
|
||||||
from pylot.core.util.widgets import FilterOptionsDialog, PropertiesDlg, HelpForm
|
|
||||||
|
|
||||||
dialogs = [FilterOptionsDialog, PropertiesDlg, HelpForm]
|
|
||||||
|
|
||||||
app = QApplication(sys.argv)
|
|
||||||
|
|
||||||
for dlg in dialogs:
|
|
||||||
win = dlg()
|
|
||||||
win.show()
|
|
||||||
time.sleep(1)
|
|
||||||
win.destroy()
|
|
||||||
@@ -1,27 +0,0 @@
|
|||||||
# -*- coding: utf-8 -*-
|
|
||||||
'''
|
|
||||||
Created on 10.11.2014
|
|
||||||
|
|
||||||
@author: sebastianw
|
|
||||||
'''
|
|
||||||
import unittest
|
|
||||||
|
|
||||||
|
|
||||||
class Test(unittest.TestCase):
|
|
||||||
|
|
||||||
|
|
||||||
def setUp(self):
|
|
||||||
pass
|
|
||||||
|
|
||||||
|
|
||||||
def tearDown(self):
|
|
||||||
pass
|
|
||||||
|
|
||||||
|
|
||||||
def testName(self):
|
|
||||||
pass
|
|
||||||
|
|
||||||
|
|
||||||
if __name__ == "__main__":
|
|
||||||
#import sys;sys.argv = ['', 'Test.testName']
|
|
||||||
unittest.main()
|
|
||||||
@@ -1,19 +0,0 @@
|
|||||||
# -*- coding: utf-8 -*-
|
|
||||||
'''
|
|
||||||
Created on 10.11.2014
|
|
||||||
|
|
||||||
@author: sebastianw
|
|
||||||
'''
|
|
||||||
import unittest
|
|
||||||
|
|
||||||
|
|
||||||
class Test(unittest.TestCase):
|
|
||||||
|
|
||||||
|
|
||||||
def testName(self):
|
|
||||||
pass
|
|
||||||
|
|
||||||
|
|
||||||
if __name__ == "__main__":
|
|
||||||
#import sys;sys.argv = ['', 'Test.testName']
|
|
||||||
unittest.main()
|
|
||||||
@@ -1,303 +0,0 @@
|
|||||||
#!/usr/bin/env python
|
|
||||||
# -*- coding: utf-8 -*-
|
|
||||||
|
|
||||||
"""
|
|
||||||
Script to run autoPyLoT-script "makeCF.py".
|
|
||||||
Only for test purposes!
|
|
||||||
"""
|
|
||||||
|
|
||||||
from obspy.core import read
|
|
||||||
import matplotlib.pyplot as plt
|
|
||||||
import numpy as np
|
|
||||||
from pylot.core.pick.charfuns import *
|
|
||||||
from pylot.core.pick.picker import *
|
|
||||||
import glob
|
|
||||||
import argparse
|
|
||||||
|
|
||||||
def run_makeCF(project, database, event, iplot, station=None):
|
|
||||||
#parameters for CF calculation
|
|
||||||
t2 = 7 #length of moving window for HOS calculation [sec]
|
|
||||||
p = 4 #order of HOS
|
|
||||||
cuttimes = [10, 50] #start and end time for CF calculation
|
|
||||||
bpz = [2, 30] #corner frequencies of bandpass filter, vertical component
|
|
||||||
bph = [2, 15] #corner frequencies of bandpass filter, horizontal components
|
|
||||||
tdetz= 1.2 #length of AR-determination window [sec], vertical component
|
|
||||||
tdeth= 0.8 #length of AR-determination window [sec], horizontal components
|
|
||||||
tpredz = 0.4 #length of AR-prediction window [sec], vertical component
|
|
||||||
tpredh = 0.4 #length of AR-prediction window [sec], horizontal components
|
|
||||||
addnoise = 0.001 #add noise to seismogram for stable AR prediction
|
|
||||||
arzorder = 2 #chosen order of AR process, vertical component
|
|
||||||
arhorder = 4 #chosen order of AR process, horizontal components
|
|
||||||
TSNRhos = [5, 0.5, 1, 0.1] #window lengths [s] for calculating SNR for earliest/latest pick and quality assessment
|
|
||||||
#from HOS-CF [noise window, safety gap, signal window, slope determination window]
|
|
||||||
TSNRarz = [5, 0.5, 1, 0.5] #window lengths [s] for calculating SNR for earliest/lates pick and quality assessment
|
|
||||||
#from ARZ-CF
|
|
||||||
#get waveform data
|
|
||||||
if station:
|
|
||||||
dpz = '/data/%s/EVENT_DATA/LOCAL/%s/%s/%s*HZ.msd' % (project, database, event, station)
|
|
||||||
dpe = '/data/%s/EVENT_DATA/LOCAL/%s/%s/%s*HE.msd' % (project, database, event, station)
|
|
||||||
dpn = '/data/%s/EVENT_DATA/LOCAL/%s/%s/%s*HN.msd' % (project, database, event, station)
|
|
||||||
#dpz = '/DATA/%s/EVENT_DATA/LOCAL/%s/%s/%s*_z.gse' % (project, database, event, station)
|
|
||||||
#dpe = '/DATA/%s/EVENT_DATA/LOCAL/%s/%s/%s*_e.gse' % (project, database, event, station)
|
|
||||||
#dpn = '/DATA/%s/EVENT_DATA/LOCAL/%s/%s/%s*_n.gse' % (project, database, event, station)
|
|
||||||
else:
|
|
||||||
# dpz = '/DATA/%s/EVENT_DATA/LOCAL/%s/%s/*_z.gse' % (project, database, event)
|
|
||||||
# dpe = '/DATA/%s/EVENT_DATA/LOCAL/%s/%s/*_e.gse' % (project, database, event)
|
|
||||||
# dpn = '/DATA/%s/EVENT_DATA/LOCAL/%s/%s/*_n.gse' % (project, database, event)
|
|
||||||
dpz = '/data/%s/EVENT_DATA/LOCAL/%s/%s/*HZ.msd' % (project, database, event)
|
|
||||||
dpe = '/data/%s/EVENT_DATA/LOCAL/%s/%s/*HE.msd' % (project, database, event)
|
|
||||||
dpn = '/data/%s/EVENT_DATA/LOCAL/%s/%s/*HN.msd' % (project, database, event)
|
|
||||||
wfzfiles = glob.glob(dpz)
|
|
||||||
wfefiles = glob.glob(dpe)
|
|
||||||
wfnfiles = glob.glob(dpn)
|
|
||||||
if wfzfiles:
|
|
||||||
for i in range(len(wfzfiles)):
|
|
||||||
print 'Vertical component data found ...'
|
|
||||||
print wfzfiles[i]
|
|
||||||
st = read('%s' % wfzfiles[i])
|
|
||||||
st_copy = st.copy()
|
|
||||||
#filter and taper data
|
|
||||||
tr_filt = st[0].copy()
|
|
||||||
tr_filt.filter('bandpass', freqmin=bpz[0], freqmax=bpz[1], zerophase=False)
|
|
||||||
tr_filt.taper(max_percentage=0.05, type='hann')
|
|
||||||
st_copy[0].data = tr_filt.data
|
|
||||||
##############################################################
|
|
||||||
#calculate HOS-CF using subclass HOScf of class CharacteristicFunction
|
|
||||||
hoscf = HOScf(st_copy, cuttimes, t2, p) #instance of HOScf
|
|
||||||
##############################################################
|
|
||||||
#calculate AIC-HOS-CF using subclass AICcf of class CharacteristicFunction
|
|
||||||
#class needs stream object => build it
|
|
||||||
tr_aic = tr_filt.copy()
|
|
||||||
tr_aic.data = hoscf.getCF()
|
|
||||||
st_copy[0].data = tr_aic.data
|
|
||||||
aiccf = AICcf(st_copy, cuttimes) #instance of AICcf
|
|
||||||
##############################################################
|
|
||||||
#get prelimenary onset time from AIC-HOS-CF using subclass AICPicker of class AutoPicking
|
|
||||||
aicpick = AICPicker(aiccf, None, TSNRhos, 3, 10, None, 0.1)
|
|
||||||
##############################################################
|
|
||||||
#get refined onset time from HOS-CF using class Picker
|
|
||||||
hospick = PragPicker(hoscf, None, TSNRhos, 2, 10, 0.001, 0.2, aicpick.getpick())
|
|
||||||
#get earliest and latest possible picks
|
|
||||||
hosELpick = EarlLatePicker(hoscf, 1.5, TSNRhos, None, 10, None, None, hospick.getpick())
|
|
||||||
##############################################################
|
|
||||||
#calculate ARZ-CF using subclass ARZcf of class CharcteristicFunction
|
|
||||||
#get stream object of filtered data
|
|
||||||
st_copy[0].data = tr_filt.data
|
|
||||||
arzcf = ARZcf(st_copy, cuttimes, tpredz, arzorder, tdetz, addnoise) #instance of ARZcf
|
|
||||||
##############################################################
|
|
||||||
#calculate AIC-ARZ-CF using subclass AICcf of class CharacteristicFunction
|
|
||||||
#class needs stream object => build it
|
|
||||||
tr_arzaic = tr_filt.copy()
|
|
||||||
tr_arzaic.data = arzcf.getCF()
|
|
||||||
st_copy[0].data = tr_arzaic.data
|
|
||||||
araiccf = AICcf(st_copy, cuttimes, tpredz, 0, tdetz) #instance of AICcf
|
|
||||||
##############################################################
|
|
||||||
#get onset time from AIC-ARZ-CF using subclass AICPicker of class AutoPicking
|
|
||||||
aicarzpick = AICPicker(araiccf, 1.5, TSNRarz, 2, 10, None, 0.1)
|
|
||||||
##############################################################
|
|
||||||
#get refined onset time from ARZ-CF using class Picker
|
|
||||||
arzpick = PragPicker(arzcf, 1.5, TSNRarz, 2.0, 10, 0.1, 0.05, aicarzpick.getpick())
|
|
||||||
#get earliest and latest possible picks
|
|
||||||
arzELpick = EarlLatePicker(arzcf, 1.5, TSNRarz, None, 10, None, None, arzpick.getpick())
|
|
||||||
elif not wfzfiles:
|
|
||||||
print 'No vertical component data found!'
|
|
||||||
|
|
||||||
if wfefiles and wfnfiles:
|
|
||||||
for i in range(len(wfefiles)):
|
|
||||||
print 'Horizontal component data found ...'
|
|
||||||
print wfefiles[i]
|
|
||||||
print wfnfiles[i]
|
|
||||||
#merge streams
|
|
||||||
H = read('%s' % wfefiles[i])
|
|
||||||
H += read('%s' % wfnfiles[i])
|
|
||||||
H_copy = H.copy()
|
|
||||||
#filter and taper data
|
|
||||||
trH1_filt = H[0].copy()
|
|
||||||
trH2_filt = H[1].copy()
|
|
||||||
trH1_filt.filter('bandpass', freqmin=bph[0], freqmax=bph[1], zerophase=False)
|
|
||||||
trH2_filt.filter('bandpass', freqmin=bph[0], freqmax=bph[1], zerophase=False)
|
|
||||||
trH1_filt.taper(max_percentage=0.05, type='hann')
|
|
||||||
trH2_filt.taper(max_percentage=0.05, type='hann')
|
|
||||||
H_copy[0].data = trH1_filt.data
|
|
||||||
H_copy[1].data = trH2_filt.data
|
|
||||||
|
|
||||||
##############################################################
|
|
||||||
#calculate ARH-CF using subclass ARHcf of class CharcteristicFunction
|
|
||||||
arhcf = ARHcf(H_copy, cuttimes, tpredh, arhorder, tdeth, addnoise) #instance of ARHcf
|
|
||||||
##############################################################
|
|
||||||
#calculate AIC-ARH-CF using subclass AICcf of class CharacteristicFunction
|
|
||||||
#class needs stream object => build it
|
|
||||||
tr_arhaic = trH1_filt.copy()
|
|
||||||
tr_arhaic.data = arhcf.getCF()
|
|
||||||
H_copy[0].data = tr_arhaic.data
|
|
||||||
#calculate ARH-AIC-CF
|
|
||||||
arhaiccf = AICcf(H_copy, cuttimes, tpredh, 0, tdeth) #instance of AICcf
|
|
||||||
##############################################################
|
|
||||||
#get onset time from AIC-ARH-CF using subclass AICPicker of class AutoPicking
|
|
||||||
aicarhpick = AICPicker(arhaiccf, 1.5, TSNRarz, 4, 10, None, 0.1)
|
|
||||||
###############################################################
|
|
||||||
#get refined onset time from ARH-CF using class Picker
|
|
||||||
arhpick = PragPicker(arhcf, 1.5, TSNRarz, 2.5, 10, 0.1, 0.05, aicarhpick.getpick())
|
|
||||||
#get earliest and latest possible picks
|
|
||||||
arhELpick = EarlLatePicker(arhcf, 1.5, TSNRarz, None, 10, None, None, arhpick.getpick())
|
|
||||||
|
|
||||||
#create stream with 3 traces
|
|
||||||
#merge streams
|
|
||||||
AllC = read('%s' % wfefiles[i])
|
|
||||||
AllC += read('%s' % wfnfiles[i])
|
|
||||||
AllC += read('%s' % wfzfiles[i])
|
|
||||||
#filter and taper data
|
|
||||||
All1_filt = AllC[0].copy()
|
|
||||||
All2_filt = AllC[1].copy()
|
|
||||||
All3_filt = AllC[2].copy()
|
|
||||||
All1_filt.filter('bandpass', freqmin=bph[0], freqmax=bph[1], zerophase=False)
|
|
||||||
All2_filt.filter('bandpass', freqmin=bph[0], freqmax=bph[1], zerophase=False)
|
|
||||||
All3_filt.filter('bandpass', freqmin=bpz[0], freqmax=bpz[1], zerophase=False)
|
|
||||||
All1_filt.taper(max_percentage=0.05, type='hann')
|
|
||||||
All2_filt.taper(max_percentage=0.05, type='hann')
|
|
||||||
All3_filt.taper(max_percentage=0.05, type='hann')
|
|
||||||
AllC[0].data = All1_filt.data
|
|
||||||
AllC[1].data = All2_filt.data
|
|
||||||
AllC[2].data = All3_filt.data
|
|
||||||
#calculate AR3C-CF using subclass AR3Ccf of class CharacteristicFunction
|
|
||||||
ar3ccf = AR3Ccf(AllC, cuttimes, tpredz, arhorder, tdetz, addnoise) #instance of AR3Ccf
|
|
||||||
#get earliest and latest possible pick from initial ARH-pick
|
|
||||||
ar3cELpick = EarlLatePicker(ar3ccf, 1.5, TSNRarz, None, 10, None, None, arhpick.getpick())
|
|
||||||
##############################################################
|
|
||||||
if iplot:
|
|
||||||
#plot vertical trace
|
|
||||||
plt.figure()
|
|
||||||
tr = st[0]
|
|
||||||
tdata = np.arange(0, tr.stats.npts / tr.stats.sampling_rate, tr.stats.delta)
|
|
||||||
p1, = plt.plot(tdata, tr_filt.data/max(tr_filt.data), 'k')
|
|
||||||
p2, = plt.plot(hoscf.getTimeArray(), hoscf.getCF() / max(hoscf.getCF()), 'r')
|
|
||||||
p3, = plt.plot(aiccf.getTimeArray(), aiccf.getCF()/max(aiccf.getCF()), 'b')
|
|
||||||
p4, = plt.plot(arzcf.getTimeArray(), arzcf.getCF()/max(arzcf.getCF()), 'g')
|
|
||||||
p5, = plt.plot(araiccf.getTimeArray(), araiccf.getCF()/max(araiccf.getCF()), 'y')
|
|
||||||
plt.plot([aicpick.getpick(), aicpick.getpick()], [-1, 1], 'b--')
|
|
||||||
plt.plot([aicpick.getpick()-0.5, aicpick.getpick()+0.5], [1, 1], 'b')
|
|
||||||
plt.plot([aicpick.getpick()-0.5, aicpick.getpick()+0.5], [-1, -1], 'b')
|
|
||||||
plt.plot([hospick.getpick(), hospick.getpick()], [-1.3, 1.3], 'r', linewidth=2)
|
|
||||||
plt.plot([hospick.getpick()-0.5, hospick.getpick()+0.5], [1.3, 1.3], 'r')
|
|
||||||
plt.plot([hospick.getpick()-0.5, hospick.getpick()+0.5], [-1.3, -1.3], 'r')
|
|
||||||
plt.plot([hosELpick.getLpick(), hosELpick.getLpick()], [-1.1, 1.1], 'r--')
|
|
||||||
plt.plot([hosELpick.getEpick(), hosELpick.getEpick()], [-1.1, 1.1], 'r--')
|
|
||||||
plt.plot([aicarzpick.getpick(), aicarzpick.getpick()], [-1.2, 1.2], 'y', linewidth=2)
|
|
||||||
plt.plot([aicarzpick.getpick()-0.5, aicarzpick.getpick()+0.5], [1.2, 1.2], 'y')
|
|
||||||
plt.plot([aicarzpick.getpick()-0.5, aicarzpick.getpick()+0.5], [-1.2, -1.2], 'y')
|
|
||||||
plt.plot([arzpick.getpick(), arzpick.getpick()], [-1.4, 1.4], 'g', linewidth=2)
|
|
||||||
plt.plot([arzpick.getpick()-0.5, arzpick.getpick()+0.5], [1.4, 1.4], 'g')
|
|
||||||
plt.plot([arzpick.getpick()-0.5, arzpick.getpick()+0.5], [-1.4, -1.4], 'g')
|
|
||||||
plt.plot([arzELpick.getLpick(), arzELpick.getLpick()], [-1.2, 1.2], 'g--')
|
|
||||||
plt.plot([arzELpick.getEpick(), arzELpick.getEpick()], [-1.2, 1.2], 'g--')
|
|
||||||
plt.yticks([])
|
|
||||||
plt.ylim([-1.5, 1.5])
|
|
||||||
plt.xlabel('Time [s]')
|
|
||||||
plt.ylabel('Normalized Counts')
|
|
||||||
plt.title('%s, %s, CF-SNR=%7.2f, CF-Slope=%12.2f' % (tr.stats.station, \
|
|
||||||
tr.stats.channel, aicpick.getSNR(), aicpick.getSlope()))
|
|
||||||
plt.suptitle(tr.stats.starttime)
|
|
||||||
plt.legend([p1, p2, p3, p4, p5], ['Data', 'HOS-CF', 'HOSAIC-CF', 'ARZ-CF', 'ARZAIC-CF'])
|
|
||||||
#plot horizontal traces
|
|
||||||
plt.figure(2)
|
|
||||||
plt.subplot(2,1,1)
|
|
||||||
tsteph = tpredh / 4
|
|
||||||
th1data = np.arange(0, trH1_filt.stats.npts / trH1_filt.stats.sampling_rate, trH1_filt.stats.delta)
|
|
||||||
th2data = np.arange(0, trH2_filt.stats.npts / trH2_filt.stats.sampling_rate, trH2_filt.stats.delta)
|
|
||||||
tarhcf = np.arange(0, len(arhcf.getCF()) * tsteph, tsteph) + cuttimes[0] + tdeth +tpredh
|
|
||||||
p21, = plt.plot(th1data, trH1_filt.data/max(trH1_filt.data), 'k')
|
|
||||||
p22, = plt.plot(arhcf.getTimeArray(), arhcf.getCF()/max(arhcf.getCF()), 'r')
|
|
||||||
p23, = plt.plot(arhaiccf.getTimeArray(), arhaiccf.getCF()/max(arhaiccf.getCF()))
|
|
||||||
plt.plot([aicarhpick.getpick(), aicarhpick.getpick()], [-1, 1], 'b')
|
|
||||||
plt.plot([aicarhpick.getpick()-0.5, aicarhpick.getpick()+0.5], [1, 1], 'b')
|
|
||||||
plt.plot([aicarhpick.getpick()-0.5, aicarhpick.getpick()+0.5], [-1, -1], 'b')
|
|
||||||
plt.plot([arhpick.getpick(), arhpick.getpick()], [-1, 1], 'r')
|
|
||||||
plt.plot([arhpick.getpick()-0.5, arhpick.getpick()+0.5], [1, 1], 'r')
|
|
||||||
plt.plot([arhpick.getpick()-0.5, arhpick.getpick()+0.5], [-1, -1], 'r')
|
|
||||||
plt.plot([arhELpick.getLpick(), arhELpick.getLpick()], [-0.8, 0.8], 'r--')
|
|
||||||
plt.plot([arhELpick.getEpick(), arhELpick.getEpick()], [-0.8, 0.8], 'r--')
|
|
||||||
plt.plot([arhpick.getpick() + arhELpick.getPickError(), arhpick.getpick() + arhELpick.getPickError()], \
|
|
||||||
[-0.2, 0.2], 'r--')
|
|
||||||
plt.plot([arhpick.getpick() - arhELpick.getPickError(), arhpick.getpick() - arhELpick.getPickError()], \
|
|
||||||
[-0.2, 0.2], 'r--')
|
|
||||||
plt.yticks([])
|
|
||||||
plt.ylim([-1.5, 1.5])
|
|
||||||
plt.ylabel('Normalized Counts')
|
|
||||||
plt.title([trH1_filt.stats.station, trH1_filt.stats.channel])
|
|
||||||
plt.suptitle(trH1_filt.stats.starttime)
|
|
||||||
plt.legend([p21, p22, p23], ['Data', 'ARH-CF', 'ARHAIC-CF'])
|
|
||||||
plt.subplot(2,1,2)
|
|
||||||
plt.plot(th2data, trH2_filt.data/max(trH2_filt.data), 'k')
|
|
||||||
plt.plot(arhcf.getTimeArray(), arhcf.getCF()/max(arhcf.getCF()), 'r')
|
|
||||||
plt.plot(arhaiccf.getTimeArray(), arhaiccf.getCF()/max(arhaiccf.getCF()))
|
|
||||||
plt.plot([aicarhpick.getpick(), aicarhpick.getpick()], [-1, 1], 'b')
|
|
||||||
plt.plot([aicarhpick.getpick()-0.5, aicarhpick.getpick()+0.5], [1, 1], 'b')
|
|
||||||
plt.plot([aicarhpick.getpick()-0.5, aicarhpick.getpick()+0.5], [-1, -1], 'b')
|
|
||||||
plt.plot([arhpick.getpick(), arhpick.getpick()], [-1, 1], 'r')
|
|
||||||
plt.plot([arhpick.getpick()-0.5, arhpick.getpick()+0.5], [1, 1], 'r')
|
|
||||||
plt.plot([arhpick.getpick()-0.5, arhpick.getpick()+0.5], [-1, -1], 'r')
|
|
||||||
plt.plot([arhELpick.getLpick(), arhELpick.getLpick()], [-0.8, 0.8], 'r--')
|
|
||||||
plt.plot([arhELpick.getEpick(), arhELpick.getEpick()], [-0.8, 0.8], 'r--')
|
|
||||||
plt.plot([arhpick.getpick() + arhELpick.getPickError(), arhpick.getpick() + arhELpick.getPickError()], \
|
|
||||||
[-0.2, 0.2], 'r--')
|
|
||||||
plt.plot([arhpick.getpick() - arhELpick.getPickError(), arhpick.getpick() - arhELpick.getPickError()], \
|
|
||||||
[-0.2, 0.2], 'r--')
|
|
||||||
plt.title([trH2_filt.stats.station, trH2_filt.stats.channel])
|
|
||||||
plt.yticks([])
|
|
||||||
plt.ylim([-1.5, 1.5])
|
|
||||||
plt.xlabel('Time [s]')
|
|
||||||
plt.ylabel('Normalized Counts')
|
|
||||||
#plot 3-component window
|
|
||||||
plt.figure(3)
|
|
||||||
plt.subplot(3,1,1)
|
|
||||||
p31, = plt.plot(tdata, tr_filt.data/max(tr_filt.data), 'k')
|
|
||||||
p32, = plt.plot(ar3ccf.getTimeArray(), ar3ccf.getCF()/max(ar3ccf.getCF()), 'r')
|
|
||||||
plt.plot([arhpick.getpick(), arhpick.getpick()], [-1, 1], 'b')
|
|
||||||
plt.plot([arhpick.getpick()-0.5, arhpick.getpick()+0.5], [-1, -1], 'b')
|
|
||||||
plt.plot([arhpick.getpick()-0.5, arhpick.getpick()+0.5], [1, 1], 'b')
|
|
||||||
plt.plot([ar3cELpick.getLpick(), ar3cELpick.getLpick()], [-0.8, 0.8], 'b--')
|
|
||||||
plt.plot([ar3cELpick.getEpick(), ar3cELpick.getEpick()], [-0.8, 0.8], 'b--')
|
|
||||||
plt.yticks([])
|
|
||||||
plt.xticks([])
|
|
||||||
plt.ylabel('Normalized Counts')
|
|
||||||
plt.title([tr.stats.station, tr.stats.channel])
|
|
||||||
plt.suptitle(trH1_filt.stats.starttime)
|
|
||||||
plt.legend([p31, p32], ['Data', 'AR3C-CF'])
|
|
||||||
plt.subplot(3,1,2)
|
|
||||||
plt.plot(th1data, trH1_filt.data/max(trH1_filt.data), 'k')
|
|
||||||
plt.plot(ar3ccf.getTimeArray(), ar3ccf.getCF()/max(ar3ccf.getCF()), 'r')
|
|
||||||
plt.plot([arhpick.getpick(), arhpick.getpick()], [-1, 1], 'b')
|
|
||||||
plt.plot([arhpick.getpick()-0.5, arhpick.getpick()+0.5], [-1, -1], 'b')
|
|
||||||
plt.plot([arhpick.getpick()-0.5, arhpick.getpick()+0.5], [1, 1], 'b')
|
|
||||||
plt.plot([ar3cELpick.getLpick(), ar3cELpick.getLpick()], [-0.8, 0.8], 'b--')
|
|
||||||
plt.plot([ar3cELpick.getEpick(), ar3cELpick.getEpick()], [-0.8, 0.8], 'b--')
|
|
||||||
plt.yticks([])
|
|
||||||
plt.xticks([])
|
|
||||||
plt.ylabel('Normalized Counts')
|
|
||||||
plt.title([trH1_filt.stats.station, trH1_filt.stats.channel])
|
|
||||||
plt.subplot(3,1,3)
|
|
||||||
plt.plot(th2data, trH2_filt.data/max(trH2_filt.data), 'k')
|
|
||||||
plt.plot(ar3ccf.getTimeArray(), ar3ccf.getCF()/max(ar3ccf.getCF()), 'r')
|
|
||||||
plt.plot([arhpick.getpick(), arhpick.getpick()], [-1, 1], 'b')
|
|
||||||
plt.plot([arhpick.getpick()-0.5, arhpick.getpick()+0.5], [-1, -1], 'b')
|
|
||||||
plt.plot([arhpick.getpick()-0.5, arhpick.getpick()+0.5], [1, 1], 'b')
|
|
||||||
plt.plot([ar3cELpick.getLpick(), ar3cELpick.getLpick()], [-0.8, 0.8], 'b--')
|
|
||||||
plt.plot([ar3cELpick.getEpick(), ar3cELpick.getEpick()], [-0.8, 0.8], 'b--')
|
|
||||||
plt.yticks([])
|
|
||||||
plt.ylabel('Normalized Counts')
|
|
||||||
plt.title([trH2_filt.stats.station, trH2_filt.stats.channel])
|
|
||||||
plt.xlabel('Time [s]')
|
|
||||||
plt.show()
|
|
||||||
raw_input()
|
|
||||||
plt.close()
|
|
||||||
|
|
||||||
if __name__ == '__main__':
|
|
||||||
parser = argparse.ArgumentParser()
|
|
||||||
parser.add_argument('--project', type=str, help='project name (e.g. Insheim)')
|
|
||||||
parser.add_argument('--database', type=str, help='event data base (e.g. 2014.09_Insheim)')
|
|
||||||
parser.add_argument('--event', type=str, help='event ID (e.g. e0010.015.14)')
|
|
||||||
parser.add_argument('--iplot', help='anything, if set, figure occurs')
|
|
||||||
parser.add_argument('--station', type=str, help='Station ID (e.g. INS3) (optional)')
|
|
||||||
args = parser.parse_args()
|
|
||||||
|
|
||||||
run_makeCF(args.project, args.database, args.event, args.iplot, args.station)
|
|
||||||
@@ -1,7 +0,0 @@
|
|||||||
#!/usr/bin/env python
|
|
||||||
# -*- coding: utf-8 -*-
|
|
||||||
|
|
||||||
from pylot.core.util.pdf import ProbabilityDensityFunction
|
|
||||||
pdf = ProbabilityDensityFunction.from_pick(0.34, 0.5, 0.54, type='exp')
|
|
||||||
pdf2 = ProbabilityDensityFunction.from_pick(0.34, 0.5, 0.54, type='exp')
|
|
||||||
diff = pdf - pdf2
|
|
||||||
@@ -1,15 +0,0 @@
|
|||||||
#!/usr/bin/env python
|
|
||||||
# -*- coding: utf-8 -*-
|
|
||||||
|
|
||||||
import argparse
|
|
||||||
import numpy
|
|
||||||
from pylot.core.pick.utils import getnoisewin
|
|
||||||
|
|
||||||
if __name__ == "__main__":
|
|
||||||
parser = argparse.ArgumentParser()
|
|
||||||
parser.add_argument('--t', type=numpy.array, help='numpy array of time stamps')
|
|
||||||
parser.add_argument('--t1', type=float, help='time from which relativ to it noise window is extracted')
|
|
||||||
parser.add_argument('--tnoise', type=float, help='length of time window [s] for noise part extraction')
|
|
||||||
parser.add_argument('--tgap', type=float, help='safety gap between signal (t1=onset) and noise')
|
|
||||||
args = parser.parse_args()
|
|
||||||
getnoisewin(args.t, args.t1, args.tnoise, args.tgap)
|
|
||||||
@@ -1,28 +0,0 @@
|
|||||||
#!/usr/bin/python
|
|
||||||
# -*- coding: utf-8 -*-
|
|
||||||
"""
|
|
||||||
Created Mar 2015
|
|
||||||
Transcription of the rezipe of Diehl et al. (2009) for consistent phase
|
|
||||||
picking. For a given inital (the most likely) pick, the corresponding earliest
|
|
||||||
and latest possible pick is calculated based on noise measurements in front of
|
|
||||||
the most likely pick and signal wavelength derived from zero crossings.
|
|
||||||
|
|
||||||
:author: Ludger Kueperkoch / MAGS2 EP3 working group
|
|
||||||
"""
|
|
||||||
|
|
||||||
import argparse
|
|
||||||
import obspy
|
|
||||||
from pylot.core.pick.utils import earllatepicker
|
|
||||||
|
|
||||||
if __name__ == "__main__":
|
|
||||||
parser = argparse.ArgumentParser()
|
|
||||||
parser.add_argument('--X', type=~obspy.core.stream.Stream,
|
|
||||||
help='time series (seismogram) read with obspy module read')
|
|
||||||
parser.add_argument('--nfac', type=int,
|
|
||||||
help='(noise factor), nfac times noise level to calculate latest possible pick')
|
|
||||||
parser.add_argument('--TSNR', type=tuple, help='length of time windows around pick used to determine SNR \
|
|
||||||
[s] (Tnoise, Tgap, Tsignal)')
|
|
||||||
parser.add_argument('--Pick1', type=float, help='Onset time of most likely pick')
|
|
||||||
parser.add_argument('--iplot', type=int, help='if set, figure no. iplot occurs')
|
|
||||||
args = parser.parse_args()
|
|
||||||
earllatepicker(args.X, args.nfac, args.TSNR, args.Pick1, args.iplot)
|
|
||||||
@@ -1,24 +0,0 @@
|
|||||||
#!/usr/bin/python
|
|
||||||
# -*- coding: utf-8 -*-
|
|
||||||
"""
|
|
||||||
Created Mar 2015
|
|
||||||
Function to derive first motion (polarity) for given phase onset based on zero crossings.
|
|
||||||
|
|
||||||
:author: MAGS2 EP3 working group / Ludger Kueperkoch
|
|
||||||
"""
|
|
||||||
|
|
||||||
import argparse
|
|
||||||
import obspy
|
|
||||||
from pylot.core.pick.utils import fmpicker
|
|
||||||
|
|
||||||
if __name__ == "__main__":
|
|
||||||
parser = argparse.ArgumentParser()
|
|
||||||
parser.add_argument('--Xraw', type=obspy.core.stream.Stream,
|
|
||||||
help='unfiltered time series (seismogram) read with obspy module read')
|
|
||||||
parser.add_argument('--Xfilt', type=obspy.core.stream.Stream,
|
|
||||||
help='filtered time series (seismogram) read with obspy module read')
|
|
||||||
parser.add_argument('--pickwin', type=float, help='length of pick window [s] for first motion determination')
|
|
||||||
parser.add_argument('--Pick', type=float, help='Onset time of most likely pick')
|
|
||||||
parser.add_argument('--iplot', type=int, help='if set, figure no. iplot occurs')
|
|
||||||
args = parser.parse_args()
|
|
||||||
fmpicker(args.Xraw, args.Xfilt, args.pickwin, args.Pick, args.iplot)
|
|
||||||
@@ -1,41 +0,0 @@
|
|||||||
#!/usr/bin/env python
|
|
||||||
# -*- coding: utf-8 -*-
|
|
||||||
|
|
||||||
import argparse
|
|
||||||
|
|
||||||
from pylot.core.util.version import get_git_version as _getVersionString
|
|
||||||
from pylot.core.io.phases import reassess_pilot_db
|
|
||||||
|
|
||||||
__version__ = _getVersionString()
|
|
||||||
__author__ = 'S. Wehling-Benatelli'
|
|
||||||
|
|
||||||
if __name__ == '__main__':
|
|
||||||
parser = argparse.ArgumentParser(
|
|
||||||
description='reassess old PILOT event data base in terms of consistent '
|
|
||||||
'automatic uncertainty estimation',
|
|
||||||
epilog='Script written by {author} belonging to PyLoT version'
|
|
||||||
' {version}\n'.format(author=__author__,
|
|
||||||
version=__version__)
|
|
||||||
)
|
|
||||||
|
|
||||||
parser.add_argument(
|
|
||||||
'root', type=str, help='specifies the root directory'
|
|
||||||
)
|
|
||||||
parser.add_argument(
|
|
||||||
'db', type=str, help='specifies the database name'
|
|
||||||
)
|
|
||||||
parser.add_argument(
|
|
||||||
'--output', '-o', type=str, help='path to the output directory',
|
|
||||||
dest='output'
|
|
||||||
)
|
|
||||||
parser.add_argument(
|
|
||||||
'--parameterfile', '-p', type=str,
|
|
||||||
help='full path to the parameterfile', dest='parfile'
|
|
||||||
)
|
|
||||||
parser.add_argument(
|
|
||||||
'--verbosity', '-v', action='count', help='increase output verbosity',
|
|
||||||
default=0, dest='verbosity'
|
|
||||||
)
|
|
||||||
|
|
||||||
args = parser.parse_args()
|
|
||||||
reassess_pilot_db(args.root, args.db, args.output, args.parfile, args.verbosity)
|
|
||||||
@@ -1,38 +0,0 @@
|
|||||||
#!/usr/bin/env python
|
|
||||||
# -*- coding: utf-8 -*-
|
|
||||||
|
|
||||||
import argparse
|
|
||||||
|
|
||||||
from pylot.core.util.version import get_git_version as _getVersionString
|
|
||||||
from pylot.core.io.phases import reassess_pilot_event
|
|
||||||
|
|
||||||
__version__ = _getVersionString()
|
|
||||||
__author__ = 'S. Wehling-Benatelli'
|
|
||||||
|
|
||||||
if __name__ == '__main__':
|
|
||||||
parser = argparse.ArgumentParser(
|
|
||||||
description='reassess old PILOT event data in terms of consistent '
|
|
||||||
'automatic uncertainty estimation',
|
|
||||||
epilog='Script written by {author} belonging to PyLoT version'
|
|
||||||
' {version}\n'.format(author=__author__,
|
|
||||||
version=__version__)
|
|
||||||
)
|
|
||||||
|
|
||||||
parser.add_argument(
|
|
||||||
'root', type=str, help='specifies the root directory'
|
|
||||||
)
|
|
||||||
parser.add_argument(
|
|
||||||
'db', type=str, help='specifies the database name'
|
|
||||||
)
|
|
||||||
parser.add_argument(
|
|
||||||
'id', type=str, help='PILOT event identifier'
|
|
||||||
)
|
|
||||||
parser.add_argument(
|
|
||||||
'--output', '-o', type=str, help='path to the output directory', dest='output'
|
|
||||||
)
|
|
||||||
parser.add_argument(
|
|
||||||
'--parameterfile', '-p', type=str, help='full path to the parameterfile', dest='parfile'
|
|
||||||
)
|
|
||||||
|
|
||||||
args = parser.parse_args()
|
|
||||||
reassess_pilot_event(args.root, args.db, args.id, args.output, args.parfile)
|
|
||||||
@@ -1,14 +0,0 @@
|
|||||||
#!/usr/bin/env python
|
|
||||||
# -*- coding: utf-8 -*-
|
|
||||||
|
|
||||||
import argparse
|
|
||||||
import numpy
|
|
||||||
from pylot.core.pick.utils import getsignalwin
|
|
||||||
|
|
||||||
if __name__ == "__main__":
|
|
||||||
parser = argparse.ArgumentParser()
|
|
||||||
parser.add_argument('--t', type=numpy.array, help='numpy array of time stamps')
|
|
||||||
parser.add_argument('--t1', type=float, help='time from which relativ to it signal window is extracted')
|
|
||||||
parser.add_argument('--tsignal', type=float, help='length of time window [s] for signal part extraction')
|
|
||||||
args = parser.parse_args()
|
|
||||||
getsignalwin(args.t, args.t1, args.tsignal)
|
|
||||||
@@ -1,30 +0,0 @@
|
|||||||
#!/usr/bin/python
|
|
||||||
# -*- coding: utf-8 -*-
|
|
||||||
"""
|
|
||||||
Created Mar/Apr 2015
|
|
||||||
Function to calculate SNR of certain part of seismogram relative
|
|
||||||
to given time. Returns SNR and SNR [dB].
|
|
||||||
|
|
||||||
:author: Ludger Kueperkoch /MAGS EP3 working group
|
|
||||||
"""
|
|
||||||
|
|
||||||
import argparse
|
|
||||||
import obspy
|
|
||||||
from pylot.core.pick.utils import getSNR
|
|
||||||
|
|
||||||
if __name__ == "__main__":
|
|
||||||
parser = argparse.ArgumentParser()
|
|
||||||
parser.add_argument('--data', '-d', type=obspy.core.stream.Stream,
|
|
||||||
help='time series (seismogram) read with obspy module '
|
|
||||||
'read',
|
|
||||||
dest='data')
|
|
||||||
parser.add_argument('--tsnr', '-s', type=tuple,
|
|
||||||
help='length of time windows around pick used to '
|
|
||||||
'determine SNR [s] (Tnoise, Tgap, Tsignal)',
|
|
||||||
dest='tsnr')
|
|
||||||
parser.add_argument('--time', '-t', type=float,
|
|
||||||
help='initial time from which noise and signal windows '
|
|
||||||
'are calculated',
|
|
||||||
dest='time')
|
|
||||||
args = parser.parse_args()
|
|
||||||
print getSNR(args.data, args.tsnr, args.time)
|
|
||||||
@@ -1,307 +0,0 @@
|
|||||||
#!/usr/bin/python
|
|
||||||
# -*- coding: utf-8 -*-
|
|
||||||
|
|
||||||
"""
|
|
||||||
Script to run autoPyLoT-script "run_makeCF.py".
|
|
||||||
Only for test purposes!
|
|
||||||
"""
|
|
||||||
|
|
||||||
from obspy.core import read
|
|
||||||
import matplotlib.pyplot as plt
|
|
||||||
import numpy as np
|
|
||||||
from pylot.core.pick.charfuns import CharacteristicFunction
|
|
||||||
from pylot.core.pick.picker import AutoPicker
|
|
||||||
from pylot.core.pick.utils import *
|
|
||||||
import glob
|
|
||||||
import argparse
|
|
||||||
|
|
||||||
def run_makeCF(project, database, event, iplot, station=None):
|
|
||||||
#parameters for CF calculation
|
|
||||||
t2 = 7 #length of moving window for HOS calculation [sec]
|
|
||||||
p = 4 #order of HOS
|
|
||||||
cuttimes = [10, 50] #start and end time for CF calculation
|
|
||||||
bpz = [2, 30] #corner frequencies of bandpass filter, vertical component
|
|
||||||
bph = [2, 15] #corner frequencies of bandpass filter, horizontal components
|
|
||||||
tdetz= 1.2 #length of AR-determination window [sec], vertical component
|
|
||||||
tdeth= 0.8 #length of AR-determination window [sec], horizontal components
|
|
||||||
tpredz = 0.4 #length of AR-prediction window [sec], vertical component
|
|
||||||
tpredh = 0.4 #length of AR-prediction window [sec], horizontal components
|
|
||||||
addnoise = 0.001 #add noise to seismogram for stable AR prediction
|
|
||||||
arzorder = 2 #chosen order of AR process, vertical component
|
|
||||||
arhorder = 4 #chosen order of AR process, horizontal components
|
|
||||||
TSNRhos = [5, 0.5, 1, .6] #window lengths [s] for calculating SNR for earliest/latest pick and quality assessment
|
|
||||||
#from HOS-CF [noise window, safety gap, signal window, slope determination window]
|
|
||||||
TSNRarz = [5, 0.5, 1, 1.0] #window lengths [s] for calculating SNR for earliest/lates pick and quality assessment
|
|
||||||
#from ARZ-CF
|
|
||||||
#get waveform data
|
|
||||||
if station:
|
|
||||||
dpz = '/DATA/%s/EVENT_DATA/LOCAL/%s/%s/%s*HZ.msd' % (project, database, event, station)
|
|
||||||
dpe = '/DATA/%s/EVENT_DATA/LOCAL/%s/%s/%s*HE.msd' % (project, database, event, station)
|
|
||||||
dpn = '/DATA/%s/EVENT_DATA/LOCAL/%s/%s/%s*HN.msd' % (project, database, event, station)
|
|
||||||
#dpz = '/DATA/%s/EVENT_DATA/LOCAL/%s/%s/%s*_z.gse' % (project, database, event, station)
|
|
||||||
#dpe = '/DATA/%s/EVENT_DATA/LOCAL/%s/%s/%s*_e.gse' % (project, database, event, station)
|
|
||||||
#dpn = '/DATA/%s/EVENT_DATA/LOCAL/%s/%s/%s*_n.gse' % (project, database, event, station)
|
|
||||||
else:
|
|
||||||
dpz = '/DATA/%s/EVENT_DATA/LOCAL/%s/%s/*HZ.msd' % (project, database, event)
|
|
||||||
dpe = '/DATA/%s/EVENT_DATA/LOCAL/%s/%s/*HE.msd' % (project, database, event)
|
|
||||||
dpn = '/DATA/%s/EVENT_DATA/LOCAL/%s/%s/*HN.msd' % (project, database, event)
|
|
||||||
wfzfiles = glob.glob(dpz)
|
|
||||||
wfefiles = glob.glob(dpe)
|
|
||||||
wfnfiles = glob.glob(dpn)
|
|
||||||
if wfzfiles:
|
|
||||||
for i in range(len(wfzfiles)):
|
|
||||||
print 'Vertical component data found ...'
|
|
||||||
print wfzfiles[i]
|
|
||||||
st = read('%s' % wfzfiles[i])
|
|
||||||
st_copy = st.copy()
|
|
||||||
#filter and taper data
|
|
||||||
tr_filt = st[0].copy()
|
|
||||||
tr_filt.filter('bandpass', freqmin=bpz[0], freqmax=bpz[1], zerophase=False)
|
|
||||||
tr_filt.taper(max_percentage=0.05, type='hann')
|
|
||||||
st_copy[0].data = tr_filt.data
|
|
||||||
##############################################################
|
|
||||||
#calculate HOS-CF using subclass HOScf of class CharacteristicFunction
|
|
||||||
hoscf = HOScf(st_copy, cuttimes, t2, p) #instance of HOScf
|
|
||||||
##############################################################
|
|
||||||
#calculate AIC-HOS-CF using subclass AICcf of class CharacteristicFunction
|
|
||||||
#class needs stream object => build it
|
|
||||||
tr_aic = tr_filt.copy()
|
|
||||||
tr_aic.data = hoscf.getCF()
|
|
||||||
st_copy[0].data = tr_aic.data
|
|
||||||
aiccf = AICcf(st_copy, cuttimes) #instance of AICcf
|
|
||||||
##############################################################
|
|
||||||
#get prelimenary onset time from AIC-HOS-CF using subclass AICPicker of class AutoPicking
|
|
||||||
aicpick = AICPicker(aiccf, TSNRhos, 3, 10, None, 0.1)
|
|
||||||
##############################################################
|
|
||||||
#get refined onset time from HOS-CF using class Picker
|
|
||||||
hospick = PragPicker(hoscf, TSNRhos, 2, 10, 0.001, 0.2, aicpick.getpick())
|
|
||||||
#############################################################
|
|
||||||
#get earliest and latest possible picks
|
|
||||||
st_copy[0].data = tr_filt.data
|
|
||||||
[lpickhos, epickhos, pickerrhos] = earllatepicker(st_copy, 1.5, TSNRhos, hospick.getpick(), 10)
|
|
||||||
#############################################################
|
|
||||||
#get SNR
|
|
||||||
[SNR, SNRdB] = getSNR(st_copy, TSNRhos, hospick.getpick())
|
|
||||||
print 'SNR:', SNR, 'SNR[dB]:', SNRdB
|
|
||||||
##########################################################
|
|
||||||
#get first motion of onset
|
|
||||||
hosfm = fmpicker(st, st_copy, 0.2, hospick.getpick(), 11)
|
|
||||||
##############################################################
|
|
||||||
#calculate ARZ-CF using subclass ARZcf of class CharcteristicFunction
|
|
||||||
arzcf = ARZcf(st, cuttimes, tpredz, arzorder, tdetz, addnoise) #instance of ARZcf
|
|
||||||
##############################################################
|
|
||||||
#calculate AIC-ARZ-CF using subclass AICcf of class CharacteristicFunction
|
|
||||||
#class needs stream object => build it
|
|
||||||
tr_arzaic = tr_filt.copy()
|
|
||||||
tr_arzaic.data = arzcf.getCF()
|
|
||||||
st_copy[0].data = tr_arzaic.data
|
|
||||||
araiccf = AICcf(st_copy, cuttimes, tpredz, 0, tdetz) #instance of AICcf
|
|
||||||
##############################################################
|
|
||||||
#get onset time from AIC-ARZ-CF using subclass AICPicker of class AutoPicking
|
|
||||||
aicarzpick = AICPicker(araiccf, TSNRarz, 2, 10, None, 0.1)
|
|
||||||
##############################################################
|
|
||||||
#get refined onset time from ARZ-CF using class Picker
|
|
||||||
arzpick = PragPicker(arzcf, TSNRarz, 2.0, 10, 0.1, 0.05, aicarzpick.getpick())
|
|
||||||
#get earliest and latest possible picks
|
|
||||||
st_copy[0].data = tr_filt.data
|
|
||||||
[lpickarz, epickarz, pickerrarz] = earllatepicker(st_copy, 1.5, TSNRarz, arzpick.getpick(), 10)
|
|
||||||
elif not wfzfiles:
|
|
||||||
print 'No vertical component data found!'
|
|
||||||
|
|
||||||
if wfefiles and wfnfiles:
|
|
||||||
for i in range(len(wfefiles)):
|
|
||||||
print 'Horizontal component data found ...'
|
|
||||||
print wfefiles[i]
|
|
||||||
print wfnfiles[i]
|
|
||||||
#merge streams
|
|
||||||
H = read('%s' % wfefiles[i])
|
|
||||||
H += read('%s' % wfnfiles[i])
|
|
||||||
H_copy = H.copy()
|
|
||||||
#filter and taper data
|
|
||||||
trH1_filt = H[0].copy()
|
|
||||||
trH2_filt = H[1].copy()
|
|
||||||
trH1_filt.filter('bandpass', freqmin=bph[0], freqmax=bph[1], zerophase=False)
|
|
||||||
trH2_filt.filter('bandpass', freqmin=bph[0], freqmax=bph[1], zerophase=False)
|
|
||||||
trH1_filt.taper(max_percentage=0.05, type='hann')
|
|
||||||
trH2_filt.taper(max_percentage=0.05, type='hann')
|
|
||||||
H_copy[0].data = trH1_filt.data
|
|
||||||
H_copy[1].data = trH2_filt.data
|
|
||||||
|
|
||||||
##############################################################
|
|
||||||
#calculate ARH-CF using subclass ARHcf of class CharcteristicFunction
|
|
||||||
arhcf = ARHcf(H_copy, cuttimes, tpredh, arhorder, tdeth, addnoise) #instance of ARHcf
|
|
||||||
##############################################################
|
|
||||||
#calculate AIC-ARH-CF using subclass AICcf of class CharacteristicFunction
|
|
||||||
#class needs stream object => build it
|
|
||||||
tr_arhaic = trH1_filt.copy()
|
|
||||||
tr_arhaic.data = arhcf.getCF()
|
|
||||||
H_copy[0].data = tr_arhaic.data
|
|
||||||
#calculate ARH-AIC-CF
|
|
||||||
arhaiccf = AICcf(H_copy, cuttimes, tpredh, 0, tdeth) #instance of AICcf
|
|
||||||
##############################################################
|
|
||||||
#get onset time from AIC-ARH-CF using subclass AICPicker of class AutoPicking
|
|
||||||
aicarhpick = AICPicker(arhaiccf, TSNRarz, 4, 10, None, 0.1)
|
|
||||||
###############################################################
|
|
||||||
#get refined onset time from ARH-CF using class Picker
|
|
||||||
arhpick = PragPicker(arhcf, TSNRarz, 2.5, 10, 0.1, 0.05, aicarhpick.getpick())
|
|
||||||
#get earliest and latest possible picks
|
|
||||||
H_copy[0].data = trH1_filt.data
|
|
||||||
[lpickarh1, epickarh1, pickerrarh1] = earllatepicker(H_copy, 1.5, TSNRarz, arhpick.getpick(), 10)
|
|
||||||
H_copy[0].data = trH2_filt.data
|
|
||||||
[lpickarh2, epickarh2, pickerrarh2] = earllatepicker(H_copy, 1.5, TSNRarz, arhpick.getpick(), 10)
|
|
||||||
#get earliest pick of both earliest possible picks
|
|
||||||
epick = [epickarh1, epickarh2]
|
|
||||||
lpick = [lpickarh1, lpickarh2]
|
|
||||||
pickerr = [pickerrarh1, pickerrarh2]
|
|
||||||
ipick =np.argmin([epickarh1, epickarh2])
|
|
||||||
epickarh = epick[ipick]
|
|
||||||
lpickarh = lpick[ipick]
|
|
||||||
pickerrarh = pickerr[ipick]
|
|
||||||
|
|
||||||
#create stream with 3 traces
|
|
||||||
#merge streams
|
|
||||||
AllC = read('%s' % wfefiles[i])
|
|
||||||
AllC += read('%s' % wfnfiles[i])
|
|
||||||
AllC += read('%s' % wfzfiles[i])
|
|
||||||
#filter and taper data
|
|
||||||
All1_filt = AllC[0].copy()
|
|
||||||
All2_filt = AllC[1].copy()
|
|
||||||
All3_filt = AllC[2].copy()
|
|
||||||
All1_filt.filter('bandpass', freqmin=bph[0], freqmax=bph[1], zerophase=False)
|
|
||||||
All2_filt.filter('bandpass', freqmin=bph[0], freqmax=bph[1], zerophase=False)
|
|
||||||
All3_filt.filter('bandpass', freqmin=bpz[0], freqmax=bpz[1], zerophase=False)
|
|
||||||
All1_filt.taper(max_percentage=0.05, type='hann')
|
|
||||||
All2_filt.taper(max_percentage=0.05, type='hann')
|
|
||||||
All3_filt.taper(max_percentage=0.05, type='hann')
|
|
||||||
AllC[0].data = All1_filt.data
|
|
||||||
AllC[1].data = All2_filt.data
|
|
||||||
AllC[2].data = All3_filt.data
|
|
||||||
#calculate AR3C-CF using subclass AR3Ccf of class CharacteristicFunction
|
|
||||||
ar3ccf = AR3Ccf(AllC, cuttimes, tpredz, arhorder, tdetz, addnoise) #instance of AR3Ccf
|
|
||||||
##############################################################
|
|
||||||
if iplot:
|
|
||||||
#plot vertical trace
|
|
||||||
plt.figure()
|
|
||||||
tr = st[0]
|
|
||||||
tdata = np.arange(0, tr.stats.npts / tr.stats.sampling_rate, tr.stats.delta)
|
|
||||||
p1, = plt.plot(tdata, tr_filt.data/max(tr_filt.data), 'k')
|
|
||||||
p2, = plt.plot(hoscf.getTimeArray(), hoscf.getCF() / max(hoscf.getCF()), 'r')
|
|
||||||
p3, = plt.plot(aiccf.getTimeArray(), aiccf.getCF()/max(aiccf.getCF()), 'b')
|
|
||||||
p4, = plt.plot(arzcf.getTimeArray(), arzcf.getCF()/max(arzcf.getCF()), 'g')
|
|
||||||
p5, = plt.plot(araiccf.getTimeArray(), araiccf.getCF()/max(araiccf.getCF()), 'y')
|
|
||||||
plt.plot([aicpick.getpick(), aicpick.getpick()], [-1, 1], 'b--')
|
|
||||||
plt.plot([aicpick.getpick()-0.5, aicpick.getpick()+0.5], [1, 1], 'b')
|
|
||||||
plt.plot([aicpick.getpick()-0.5, aicpick.getpick()+0.5], [-1, -1], 'b')
|
|
||||||
plt.plot([hospick.getpick(), hospick.getpick()], [-1.3, 1.3], 'r', linewidth=2)
|
|
||||||
plt.plot([hospick.getpick()-0.5, hospick.getpick()+0.5], [1.3, 1.3], 'r')
|
|
||||||
plt.plot([hospick.getpick()-0.5, hospick.getpick()+0.5], [-1.3, -1.3], 'r')
|
|
||||||
plt.plot([lpickhos, lpickhos], [-1.1, 1.1], 'r--')
|
|
||||||
plt.plot([epickhos, epickhos], [-1.1, 1.1], 'r--')
|
|
||||||
plt.plot([aicarzpick.getpick(), aicarzpick.getpick()], [-1.2, 1.2], 'y', linewidth=2)
|
|
||||||
plt.plot([aicarzpick.getpick()-0.5, aicarzpick.getpick()+0.5], [1.2, 1.2], 'y')
|
|
||||||
plt.plot([aicarzpick.getpick()-0.5, aicarzpick.getpick()+0.5], [-1.2, -1.2], 'y')
|
|
||||||
plt.plot([arzpick.getpick(), arzpick.getpick()], [-1.4, 1.4], 'g', linewidth=2)
|
|
||||||
plt.plot([arzpick.getpick()-0.5, arzpick.getpick()+0.5], [1.4, 1.4], 'g')
|
|
||||||
plt.plot([arzpick.getpick()-0.5, arzpick.getpick()+0.5], [-1.4, -1.4], 'g')
|
|
||||||
plt.plot([lpickarz, lpickarz], [-1.2, 1.2], 'g--')
|
|
||||||
plt.plot([epickarz, epickarz], [-1.2, 1.2], 'g--')
|
|
||||||
plt.yticks([])
|
|
||||||
plt.ylim([-1.5, 1.5])
|
|
||||||
plt.xlabel('Time [s]')
|
|
||||||
plt.ylabel('Normalized Counts')
|
|
||||||
plt.title('%s, %s, CF-SNR=%7.2f, CF-Slope=%12.2f' % (tr.stats.station,
|
|
||||||
tr.stats.channel, aicpick.getSNR(), aicpick.getSlope()))
|
|
||||||
plt.suptitle(tr.stats.starttime)
|
|
||||||
plt.legend([p1, p2, p3, p4, p5], ['Data', 'HOS-CF', 'HOSAIC-CF', 'ARZ-CF', 'ARZAIC-CF'])
|
|
||||||
#plot horizontal traces
|
|
||||||
plt.figure(2)
|
|
||||||
plt.subplot(2,1,1)
|
|
||||||
tsteph = tpredh / 4
|
|
||||||
th1data = np.arange(0, trH1_filt.stats.npts / trH1_filt.stats.sampling_rate, trH1_filt.stats.delta)
|
|
||||||
th2data = np.arange(0, trH2_filt.stats.npts / trH2_filt.stats.sampling_rate, trH2_filt.stats.delta)
|
|
||||||
tarhcf = np.arange(0, len(arhcf.getCF()) * tsteph, tsteph) + cuttimes[0] + tdeth +tpredh
|
|
||||||
p21, = plt.plot(th1data, trH1_filt.data/max(trH1_filt.data), 'k')
|
|
||||||
p22, = plt.plot(arhcf.getTimeArray(), arhcf.getCF()/max(arhcf.getCF()), 'r')
|
|
||||||
p23, = plt.plot(arhaiccf.getTimeArray(), arhaiccf.getCF()/max(arhaiccf.getCF()))
|
|
||||||
plt.plot([aicarhpick.getpick(), aicarhpick.getpick()], [-1, 1], 'b')
|
|
||||||
plt.plot([aicarhpick.getpick()-0.5, aicarhpick.getpick()+0.5], [1, 1], 'b')
|
|
||||||
plt.plot([aicarhpick.getpick()-0.5, aicarhpick.getpick()+0.5], [-1, -1], 'b')
|
|
||||||
plt.plot([arhpick.getpick(), arhpick.getpick()], [-1, 1], 'r')
|
|
||||||
plt.plot([arhpick.getpick()-0.5, arhpick.getpick()+0.5], [1, 1], 'r')
|
|
||||||
plt.plot([arhpick.getpick()-0.5, arhpick.getpick()+0.5], [-1, -1], 'r')
|
|
||||||
plt.plot([lpickarh, lpickarh], [-0.8, 0.8], 'r--')
|
|
||||||
plt.plot([epickarh, epickarh], [-0.8, 0.8], 'r--')
|
|
||||||
plt.plot([arhpick.getpick() + pickerrarh, arhpick.getpick() + pickerrarh], [-0.2, 0.2], 'r--')
|
|
||||||
plt.plot([arhpick.getpick() - pickerrarh, arhpick.getpick() - pickerrarh], [-0.2, 0.2], 'r--')
|
|
||||||
plt.yticks([])
|
|
||||||
plt.ylim([-1.5, 1.5])
|
|
||||||
plt.ylabel('Normalized Counts')
|
|
||||||
plt.title([trH1_filt.stats.station, trH1_filt.stats.channel])
|
|
||||||
plt.suptitle(trH1_filt.stats.starttime)
|
|
||||||
plt.legend([p21, p22, p23], ['Data', 'ARH-CF', 'ARHAIC-CF'])
|
|
||||||
plt.subplot(2,1,2)
|
|
||||||
plt.plot(th2data, trH2_filt.data/max(trH2_filt.data), 'k')
|
|
||||||
plt.plot(arhcf.getTimeArray(), arhcf.getCF()/max(arhcf.getCF()), 'r')
|
|
||||||
plt.plot(arhaiccf.getTimeArray(), arhaiccf.getCF()/max(arhaiccf.getCF()))
|
|
||||||
plt.plot([aicarhpick.getpick(), aicarhpick.getpick()], [-1, 1], 'b')
|
|
||||||
plt.plot([aicarhpick.getpick()-0.5, aicarhpick.getpick()+0.5], [1, 1], 'b')
|
|
||||||
plt.plot([aicarhpick.getpick()-0.5, aicarhpick.getpick()+0.5], [-1, -1], 'b')
|
|
||||||
plt.plot([arhpick.getpick(), arhpick.getpick()], [-1, 1], 'r')
|
|
||||||
plt.plot([arhpick.getpick()-0.5, arhpick.getpick()+0.5], [1, 1], 'r')
|
|
||||||
plt.plot([arhpick.getpick()-0.5, arhpick.getpick()+0.5], [-1, -1], 'r')
|
|
||||||
plt.plot([lpickarh, lpickarh], [-0.8, 0.8], 'r--')
|
|
||||||
plt.plot([epickarh, epickarh], [-0.8, 0.8], 'r--')
|
|
||||||
plt.plot([arhpick.getpick() + pickerrarh, arhpick.getpick() + pickerrarh], [-0.2, 0.2], 'r--')
|
|
||||||
plt.plot([arhpick.getpick() - pickerrarh, arhpick.getpick() - pickerrarh], [-0.2, 0.2], 'r--')
|
|
||||||
plt.title([trH2_filt.stats.station, trH2_filt.stats.channel])
|
|
||||||
plt.yticks([])
|
|
||||||
plt.ylim([-1.5, 1.5])
|
|
||||||
plt.xlabel('Time [s]')
|
|
||||||
plt.ylabel('Normalized Counts')
|
|
||||||
#plot 3-component window
|
|
||||||
plt.figure(3)
|
|
||||||
plt.subplot(3,1,1)
|
|
||||||
p31, = plt.plot(tdata, tr_filt.data/max(tr_filt.data), 'k')
|
|
||||||
p32, = plt.plot(ar3ccf.getTimeArray(), ar3ccf.getCF()/max(ar3ccf.getCF()), 'r')
|
|
||||||
plt.plot([arhpick.getpick(), arhpick.getpick()], [-1, 1], 'b')
|
|
||||||
plt.plot([arhpick.getpick()-0.5, arhpick.getpick()+0.5], [-1, -1], 'b')
|
|
||||||
plt.plot([arhpick.getpick()-0.5, arhpick.getpick()+0.5], [1, 1], 'b')
|
|
||||||
plt.yticks([])
|
|
||||||
plt.xticks([])
|
|
||||||
plt.ylabel('Normalized Counts')
|
|
||||||
plt.title([tr.stats.station, tr.stats.channel])
|
|
||||||
plt.suptitle(trH1_filt.stats.starttime)
|
|
||||||
plt.legend([p31, p32], ['Data', 'AR3C-CF'])
|
|
||||||
plt.subplot(3,1,2)
|
|
||||||
plt.plot(th1data, trH1_filt.data/max(trH1_filt.data), 'k')
|
|
||||||
plt.plot(ar3ccf.getTimeArray(), ar3ccf.getCF()/max(ar3ccf.getCF()), 'r')
|
|
||||||
plt.plot([arhpick.getpick(), arhpick.getpick()], [-1, 1], 'b')
|
|
||||||
plt.plot([arhpick.getpick()-0.5, arhpick.getpick()+0.5], [-1, -1], 'b')
|
|
||||||
plt.plot([arhpick.getpick()-0.5, arhpick.getpick()+0.5], [1, 1], 'b')
|
|
||||||
plt.yticks([])
|
|
||||||
plt.xticks([])
|
|
||||||
plt.ylabel('Normalized Counts')
|
|
||||||
plt.title([trH1_filt.stats.station, trH1_filt.stats.channel])
|
|
||||||
plt.subplot(3,1,3)
|
|
||||||
plt.plot(th2data, trH2_filt.data/max(trH2_filt.data), 'k')
|
|
||||||
plt.plot(ar3ccf.getTimeArray(), ar3ccf.getCF()/max(ar3ccf.getCF()), 'r')
|
|
||||||
plt.plot([arhpick.getpick(), arhpick.getpick()], [-1, 1], 'b')
|
|
||||||
plt.plot([arhpick.getpick()-0.5, arhpick.getpick()+0.5], [-1, -1], 'b')
|
|
||||||
plt.plot([arhpick.getpick()-0.5, arhpick.getpick()+0.5], [1, 1], 'b')
|
|
||||||
plt.yticks([])
|
|
||||||
plt.ylabel('Normalized Counts')
|
|
||||||
plt.title([trH2_filt.stats.station, trH2_filt.stats.channel])
|
|
||||||
plt.xlabel('Time [s]')
|
|
||||||
plt.show()
|
|
||||||
raw_input()
|
|
||||||
plt.close()
|
|
||||||
|
|
||||||
parser = argparse.ArgumentParser()
|
|
||||||
parser.add_argument('--project', type=str, help='project name (e.g. Insheim)')
|
|
||||||
parser.add_argument('--database', type=str, help='event data base (e.g. 2014.09_Insheim)')
|
|
||||||
parser.add_argument('--event', type=str, help='event ID (e.g. e0010.015.14)')
|
|
||||||
parser.add_argument('--iplot', help='anything, if set, figure occurs')
|
|
||||||
parser.add_argument('--station', type=str, help='Station ID (e.g. INS3) (optional)')
|
|
||||||
args = parser.parse_args()
|
|
||||||
|
|
||||||
run_makeCF(args.project, args.database, args.event, args.iplot, args.station)
|
|
||||||
Reference in new issue
Block a user