domainiac 8.0.9__py3-none-any.whl → 8.0.10__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import pandas as pd
|
|
2
|
+
from scipy import interpolate
|
|
3
|
+
|
|
4
|
+
from domainiac.functions import conversions
|
|
5
|
+
from domainiac.functions.typing import RealFunction
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
def interpolate_temperature(times: pd.Series, temperature: pd.Series) -> RealFunction:
|
|
9
|
+
"""Interpolate temperature using linear interpolation between
|
|
10
|
+
observed values.
|
|
11
|
+
|
|
12
|
+
Args:
|
|
13
|
+
times (pd.Series): Times of observations
|
|
14
|
+
temperature (pd.Series): Observed values
|
|
15
|
+
|
|
16
|
+
Returns:
|
|
17
|
+
RealFunction: Interpolation function
|
|
18
|
+
"""
|
|
19
|
+
x = conversions.datetime_to_float(times)
|
|
20
|
+
y = conversions.as_array(temperature)
|
|
21
|
+
|
|
22
|
+
f = interpolate.make_interp_spline(x, y, k=1)
|
|
23
|
+
|
|
24
|
+
def estimate(times):
|
|
25
|
+
x = conversions.datetime_to_float(times)
|
|
26
|
+
return f(x)
|
|
27
|
+
|
|
28
|
+
return estimate
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import pandas as pd
|
|
2
|
+
from scipy import interpolate
|
|
3
|
+
|
|
4
|
+
from domainiac.functions import conversions
|
|
5
|
+
from domainiac.functions.typing import RealFunction
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
def interpolate_wind_components(
|
|
9
|
+
times: pd.Series, wind_components: pd.DataFrame
|
|
10
|
+
) -> RealFunction:
|
|
11
|
+
"""Interpolate wind vector using linear interpolation
|
|
12
|
+
between observed values on the u- and v-components separately.
|
|
13
|
+
|
|
14
|
+
Args:
|
|
15
|
+
times (pd.Series): Times
|
|
16
|
+
wind_components (pd.DataFrame): Observed values
|
|
17
|
+
|
|
18
|
+
Returns:
|
|
19
|
+
RealFunction: Interpolation function
|
|
20
|
+
"""
|
|
21
|
+
x = conversions.datetime_to_float(times)
|
|
22
|
+
y = conversions.as_array(wind_components)
|
|
23
|
+
|
|
24
|
+
f = interpolate.make_interp_spline(x, y, k=1)
|
|
25
|
+
|
|
26
|
+
def estimate(times):
|
|
27
|
+
x = conversions.datetime_to_float(times)
|
|
28
|
+
return f(x)
|
|
29
|
+
|
|
30
|
+
return estimate
|
|
@@ -2,7 +2,9 @@ domainiac/__init__.py,sha256=Wuix4jscZD4sy7YB0RAedAo_eiRW5AcPlef58lKvg6s,207
|
|
|
2
2
|
domainiac/functions/conversions.py,sha256=RZU5cpHD4uBHeqFfiFplJCv5gN-xzEHvQCKrizi1hMA,490
|
|
3
3
|
domainiac/functions/interpolation.py,sha256=NSKoejDOUmHEIqxj7oFFv-gf94ccZb_weYGjU_z8Y_U,3707
|
|
4
4
|
domainiac/functions/solar.py,sha256=nU9ivDLA4gE0CTMttCb_7ztoQUQicWNe_11ZqVC7d-Y,2249
|
|
5
|
+
domainiac/functions/temperature.py,sha256=r5ot06Wjm9MoY8ZlZcZPSie-HIvIMOm6rspMu-WJniE,753
|
|
5
6
|
domainiac/functions/typing.py,sha256=gOvHUYIWSEv_aMttY1nMEyh-pdQKMJ8O31x9y47-U5U,229
|
|
7
|
+
domainiac/functions/wind.py,sha256=CXi90cXBUhudZry19YdCiEZzWNQNMRiu75rUz0wtP_s,803
|
|
6
8
|
domainiac/managers/__init__.py,sha256=7N-iEsFidupPi1u3EURfeWAoQ-NdrzAwR13faA_VWUs,298
|
|
7
9
|
domainiac/managers/masterdata_manager.py,sha256=_xIHEWVYssdvC2VMujvR0ANXCI_Er3qOlfAX427yimk,2298
|
|
8
10
|
domainiac/managers/metering_manager.py,sha256=MauMncY_yaVPx8Y9CCD8nJiE1BGHFKTVC1bOtiyl2pI,1701
|
|
@@ -16,6 +18,6 @@ domainiac/modeling/nwp.py,sha256=PolrBdQn8W-e1M0_pefvmLn2mr4HT0NqlYlkyCV0dds,438
|
|
|
16
18
|
domainiac/modeling/plant.py,sha256=Y0_Q6V6Lj3irJh5z-49r5gFJdD4Xl_pfHIMUhdaJVUI,2226
|
|
17
19
|
domainiac/wrappers/__init__.py,sha256=vZOw9maXgVoAvudZqioD-GTPkgPI6fm7_CUELQcR_-g,43
|
|
18
20
|
domainiac/wrappers/cache_wrapper.py,sha256=jDg-Lt_y-YzItyP-74tGULOxb07s_CcutmOHP1Ie00Q,355
|
|
19
|
-
domainiac-8.0.
|
|
20
|
-
domainiac-8.0.
|
|
21
|
-
domainiac-8.0.
|
|
21
|
+
domainiac-8.0.10.dist-info/METADATA,sha256=hqPnBJRzuCbOe5DAHnyNtBgBVzi76vBsNHRr-6353YM,550
|
|
22
|
+
domainiac-8.0.10.dist-info/WHEEL,sha256=zp0Cn7JsFoX2ATtOhtaFYIiE2rmFAD4OcMhtUki8W3U,88
|
|
23
|
+
domainiac-8.0.10.dist-info/RECORD,,
|
|
File without changes
|