forked from ibrewster/seismic_spectrogram
-
Notifications
You must be signed in to change notification settings - Fork 0
/
gen_config.py
36 lines (28 loc) · 949 Bytes
/
gen_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
import configparser
config = configparser.ConfigParser(allow_no_value=True)
config['GLOBAL'] = {
'MinutesPerImage': 10,
}
config.set('GLOBAL', '; Location to save spectrogram PNG files.')
config.set('GLOBAL', '; Will be relative to the generate_spectrograms.py script if it does not start with /')
config.set('GLOBAL', 'PlotImgDir', '../specweb/static/plots')
config['WINSTON'] = {'url': 'pubavo1.wr.usgs.gov',
'port': 16022, }
config['IRIS'] = {'url': 'https://service.iris.edu/fdsnws/station/1/query', }
# Data filters to apply to the raw data
config['FILTER'] = {
'LowCut': .5,
'HighCut': 15,
'Order': 2,
}
# Parameters for generating the seismic spectrogram function
config['SPECTROGRAM'] = {
'WindowType': 'hamming',
'WindowSize': 1024,
'Overlap': 924,
'NFFT': 1024,
'MaxFreq': 10,
'MinFreq': 0,
}
with open('specgen/config.ini', 'w') as conffile:
config.write(conffile)