-
Notifications
You must be signed in to change notification settings - Fork 1
/
version_timings.py
67 lines (59 loc) · 1.42 KB
/
version_timings.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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
import inspect
import matplotlib.pyplot as plt
import numpy as np
import pandas as pd
import perfplot
import scipy.optimize
import flux_correlation_functions
HOURS_PER_DAY = 24
DAYS_PER_YEAR = 365.2425
HOURS_PER_YEAR = HOURS_PER_DAY * DAYS_PER_YEAR
N_YEARS_DATA = 4
STARTING_PARAMS = dict(
daily_coef=0.2,
daily_coef1=0.6,
daily_coef2=0.5,
daily_width=0.4,
Td=30, # weeks
dm_width=0.3,
dm_coef1=0.1,
dm_coef2=+0.3,
ann_coef1=+0.3,
ann_coef2=+0.3,
ann_coef=0.1,
ann_width=0.3,
Ta=30.0, # years
resid_coef=0.1,
To=2.0, # weeks
ec_coef=0.7,
Tec=2.0, # hours
)
for coef, val in STARTING_PARAMS.items():
STARTING_PARAMS[coef] = np.float32(val)
LOOP_NAMES = [
corr_name
for corr_name in dir(flux_correlation_functions)
if corr_name.endswith("loop")
]
LOOP_FUNCTIONS = [
getattr(flux_correlation_functions, corr_name)
for corr_name in CORRELATION_FUNCTION_NAMES
]
NUMPY_NAMES = [
corr_name
for corr_name in dir(flux_correlation_functions)
if corr_name.endswith("numpy")
]
NUMPY_FUNCTIONS = [
getattr(flux_correlation_functions, corr_name)
for corr_name in CORRELATION_FUNCTION_NAMES
]
NUMEXPR_NAMES = [
corr_name
for corr_name in dir(flux_correlation_functions)
if corr_name.endswith("numexpr")
]
NUMEXPR_EXPRESSIONS = [
getattr(flux_correlation_functions, corr_name)
for corr_name in CORRELATION_FUNCTION_NAMES
]