Different time windows for slope determination from AR- and HOS-CF.

This commit is contained in:
Ludger Küperkoch 2015-03-04 15:53:18 +01:00
parent 8f71297884
commit 77c87067da

View File

@ -10,7 +10,7 @@ from obspy.core import read
import matplotlib.pyplot as plt import matplotlib.pyplot as plt
import numpy as np import numpy as np
from pylot.core.pick.CharFuns import CharacteristicFunction from pylot.core.pick.CharFuns import CharacteristicFunction
from pylot.core.pick.Picker import Picker from pylot.core.pick.Picker import AutoPicking
import glob import glob
import argparse import argparse
@ -28,8 +28,10 @@ def run_makeCF(project, database, event, iplot, station=None):
addnoise = 0.001 #add noise to seismogram for stable AR prediction addnoise = 0.001 #add noise to seismogram for stable AR prediction
arzorder = 2 #chosen order of AR process, vertical component arzorder = 2 #chosen order of AR process, vertical component
arhorder = 4 #chosen order of AR process, horizontal components arhorder = 4 #chosen order of AR process, horizontal components
TSNR = [5, 0.5, 1, 0.03] #window lengths [s] for calculating SNR for earliest/latest pick and quality assessment TSNRhos = [5, 0.5, 1, 0.1] #window lengths [s] for calculating SNR for earliest/latest pick and quality assessment
#[noise window, safety gap, signal window, slope determination window] #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 #get waveform data
if station: if station:
dpz = '/DATA/%s/EVENT_DATA/LOCAL/%s/%s/%s*HZ.msd' % (project, database, event, station) dpz = '/DATA/%s/EVENT_DATA/LOCAL/%s/%s/%s*HZ.msd' % (project, database, event, station)
@ -68,12 +70,12 @@ def run_makeCF(project, database, event, iplot, station=None):
aiccf = AICcf(st_copy, cuttimes) #instance of AICcf aiccf = AICcf(st_copy, cuttimes) #instance of AICcf
############################################################## ##############################################################
#get prelimenary onset time from AIC-HOS-CF using subclass AICPicker of class AutoPicking #get prelimenary onset time from AIC-HOS-CF using subclass AICPicker of class AutoPicking
aicpick = AICPicker(aiccf, None, TSNR, 3, 10, None, 0.1) aicpick = AICPicker(aiccf, None, TSNRhos, 3, 10, None, 0.1)
############################################################## ##############################################################
#get refined onset time from HOS-CF using class Picker #get refined onset time from HOS-CF using class Picker
hospick = PragPicker(hoscf, None, TSNR, 2, 10, 0.001, 0.2, aicpick.getpick()) hospick = PragPicker(hoscf, None, TSNRhos, 2, 10, 0.001, 0.2, aicpick.getpick())
#get earliest and latest possible picks #get earliest and latest possible picks
hosELpick = EarlLatePicker(hoscf, 1.5, TSNR, None, 10, None, None, hospick.getpick()) hosELpick = EarlLatePicker(hoscf, 1.5, TSNRhos, None, 10, None, None, hospick.getpick())
############################################################## ##############################################################
#calculate ARZ-CF using subclass ARZcf of class CharcteristicFunction #calculate ARZ-CF using subclass ARZcf of class CharcteristicFunction
#get stream object of filtered data #get stream object of filtered data
@ -88,12 +90,12 @@ def run_makeCF(project, database, event, iplot, station=None):
araiccf = AICcf(st_copy, cuttimes, tpredz, 0, tdetz) #instance of AICcf araiccf = AICcf(st_copy, cuttimes, tpredz, 0, tdetz) #instance of AICcf
############################################################## ##############################################################
#get onset time from AIC-ARZ-CF using subclass AICPicker of class AutoPicking #get onset time from AIC-ARZ-CF using subclass AICPicker of class AutoPicking
aicarzpick = AICPicker(araiccf, 1.5, TSNR, 2, 10, None, 0.1) aicarzpick = AICPicker(araiccf, 1.5, TSNRarz, 2, 10, None, 0.1)
############################################################## ##############################################################
#get refined onset time from ARZ-CF using class Picker #get refined onset time from ARZ-CF using class Picker
arzpick = PragPicker(arzcf, 1.5, TSNR, 2.0, 10, 0.1, 0.05, aicarzpick.getpick()) arzpick = PragPicker(arzcf, 1.5, TSNRarz, 2.0, 10, 0.1, 0.05, aicarzpick.getpick())
#get earliest and latest possible picks #get earliest and latest possible picks
arzELpick = EarlLatePicker(arzcf, 1.5, TSNR, None, 10, None, None, arzpick.getpick()) arzELpick = EarlLatePicker(arzcf, 1.5, TSNRarz, None, 10, None, None, arzpick.getpick())
elif not wfzfiles: elif not wfzfiles:
print 'No vertical component data found!' print 'No vertical component data found!'
@ -129,12 +131,12 @@ def run_makeCF(project, database, event, iplot, station=None):
arhaiccf = AICcf(H_copy, cuttimes, tpredh, 0, tdeth) #instance of AICcf arhaiccf = AICcf(H_copy, cuttimes, tpredh, 0, tdeth) #instance of AICcf
############################################################## ##############################################################
#get onset time from AIC-ARH-CF using subclass AICPicker of class AutoPicking #get onset time from AIC-ARH-CF using subclass AICPicker of class AutoPicking
aicarhpick = AICPicker(arhaiccf, 1.5, TSNR, 4, 10, None, 0.1) aicarhpick = AICPicker(arhaiccf, 1.5, TSNRarz, 4, 10, None, 0.1)
############################################################### ###############################################################
#get refined onset time from ARH-CF using class Picker #get refined onset time from ARH-CF using class Picker
arhpick = PragPicker(arhcf, 1.5, TSNR, 2.5, 10, 0.1, 0.05, aicarhpick.getpick()) arhpick = PragPicker(arhcf, 1.5, TSNRarz, 2.5, 10, 0.1, 0.05, aicarhpick.getpick())
#get earliest and latest possible picks #get earliest and latest possible picks
arhELpick = EarlLatePicker(arhcf, 1.5, TSNR, None, 10, None, None, arhpick.getpick()) arhELpick = EarlLatePicker(arhcf, 1.5, TSNRarz, None, 10, None, None, arhpick.getpick())
#create stream with 3 traces #create stream with 3 traces
#merge streams #merge streams
@ -157,7 +159,7 @@ def run_makeCF(project, database, event, iplot, station=None):
#calculate AR3C-CF using subclass AR3Ccf of class CharacteristicFunction #calculate AR3C-CF using subclass AR3Ccf of class CharacteristicFunction
ar3ccf = AR3Ccf(AllC, cuttimes, tpredz, arhorder, tdetz, addnoise) #instance of AR3Ccf ar3ccf = AR3Ccf(AllC, cuttimes, tpredz, arhorder, tdetz, addnoise) #instance of AR3Ccf
#get earliest and latest possible pick from initial ARH-pick #get earliest and latest possible pick from initial ARH-pick
ar3cELpick = EarlLatePicker(ar3ccf, 1.5, TSNR, None, 10, None, None, arhpick.getpick()) ar3cELpick = EarlLatePicker(ar3ccf, 1.5, TSNRarz, None, 10, None, None, arhpick.getpick())
############################################################## ##############################################################
if iplot: if iplot:
#plot vertical trace #plot vertical trace