-
Notifications
You must be signed in to change notification settings - Fork 23
/
config.py
38 lines (36 loc) · 1.85 KB
/
config.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
""" Configure file
"""
import data_pipeline as dp
import numpy as np
class Config(object):
def __init__(self):
# 1. picker params
self.win_sta = [0.8,0.4,1.] # win for STA: det, p, s
self.win_lta = [6.,2.,2.] # win for LTA: det, p, s
self.win_kurt = [5.,1.] # win for kurtosis: long & short
self.trig_thres = 12. # threshold to trig picker (by energy)
self.p_win = [.5,1.] # search win for P
self.s_win = 10. # search win for S
self.pca_win = 1. # win_len for PCA filter
self.pca_range = [0.,2.] # time range to apply PCA filter
self.fd_thres = 2.5 # min value of dominant frequency
self.amp_ratio_thres = [5,8,3] # max amp ratio for Peak, P/P_tail, & P/S
self.amp_win = [1.,5.] # time win to get S amplitude
self.det_gap = 5. # time gap between detections
self.to_prep = True # whether to preprocess the raw data
self.freq_band = [1,20] # frequency band
# 2. assoc params
self.min_sta = 4 # min num of stations to assoc
self.ot_dev = 2. # max time deviation for ot assoc
self.max_res = 1.5 # max P res for loc assoc
self.max_drop = 1 # max num of drop of each pick
self.xy_margin = 0.1 # ratio of lateral margin, relative to sta range
self.xy_grid = 0.02 # lateral grid width, in degree
self.z_grids = np.arange(2,20,3) # z (dep) grids
self.vp = 6.0 # averaged P velocity
self.vs = 3.45 # averaged S velocity
# 3. data pipeline
self.get_data_dict = dp.get_data_dict
self.get_sta_dict = dp.get_sta_dict
self.get_picks = dp.get_pal_picks
self.read_data = dp.read_data