-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathconfig.py
32 lines (25 loc) · 884 Bytes
/
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
import oyaml as yaml
import os
version = 'v1.3_real'
signal = 'real'
alpha = 130
beta = 130
max_spline = 4
window_length = 800
min_portion = 0.05
max_portion = 0.25
def make_summary():
filename = 'documentation/config_' + version + '.yaml'
# Now, put it all together
dict_for_yaml = {'Signal': signal,
'Step size time': alpha,
'Step size Frequency': beta,
'Highest Spline order': max_spline,
'Spline window length': window_length,
'Minimum portion of Coefficients': min_portion,
'Maximum portion of Coefficients': max_portion}
# Write into yaml file. Overwrites existing files.
if not os.path.exists('documentation'):
os.makedirs('documentation')
with open(filename, "w") as f:
yaml.safe_dump(dict_for_yaml, f)