doppy 0.5.1__cp310-abi3-win_amd64.whl → 0.5.2__cp310-abi3-win_amd64.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.
Potentially problematic release.
This version of doppy might be problematic. Click here for more details.
- doppy/product/turbulence.py +13 -14
- doppy/rs.pyd +0 -0
- {doppy-0.5.1.dist-info → doppy-0.5.2.dist-info}/METADATA +1 -1
- {doppy-0.5.1.dist-info → doppy-0.5.2.dist-info}/RECORD +7 -7
- {doppy-0.5.1.dist-info → doppy-0.5.2.dist-info}/WHEEL +0 -0
- {doppy-0.5.1.dist-info → doppy-0.5.2.dist-info}/entry_points.txt +0 -0
- {doppy-0.5.1.dist-info → doppy-0.5.2.dist-info}/licenses/LICENSE +0 -0
doppy/product/turbulence.py
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
# type: ignore
|
|
2
1
|
from __future__ import annotations
|
|
3
2
|
|
|
4
3
|
from dataclasses import dataclass
|
|
@@ -94,18 +93,18 @@ def _compute_variance(vert: VerticalWind, period: float) -> VarResult:
|
|
|
94
93
|
N_cumsum = N_i.cumsum(axis=0)
|
|
95
94
|
|
|
96
95
|
def N_func(i: int, j: int) -> npt.NDArray[np.float64]:
|
|
97
|
-
return N_cumsum[j] - N_cumsum[i] + N_i[i]
|
|
96
|
+
return np.array(N_cumsum[j] - N_cumsum[i] + N_i[i], dtype=np.float64)
|
|
98
97
|
|
|
99
98
|
def S(i: int, j: int) -> npt.NDArray[np.float64]:
|
|
100
|
-
return X_cumsum[j] - X_cumsum[i] + X[i]
|
|
99
|
+
return np.array(X_cumsum[j] - X_cumsum[i] + X[i], dtype=np.float64)
|
|
101
100
|
|
|
102
101
|
def S2(i: int, j: int) -> npt.NDArray[np.float64]:
|
|
103
|
-
return X2_cumsum[j] - X2_cumsum[i] + X2[i]
|
|
102
|
+
return np.array(X2_cumsum[j] - X2_cumsum[i] + X2[i], dtype=np.float64)
|
|
104
103
|
|
|
105
104
|
def var_ij(i: int, j: int) -> npt.NDArray[np.float64]:
|
|
106
105
|
N = N_func(i, j)
|
|
107
106
|
with np.errstate(invalid="ignore"):
|
|
108
|
-
return (S2(i, j) - S(i, j) ** 2 / N) / N
|
|
107
|
+
return np.array((S2(i, j) - S(i, j) ** 2 / N) / N, dtype=np.float64)
|
|
109
108
|
|
|
110
109
|
half_period = np.timedelta64(int(1e6 * period / 2), "us")
|
|
111
110
|
period_start = np.full(vert.w.shape, np.datetime64("NaT", "us"))
|
|
@@ -147,7 +146,7 @@ def _length_scale_low(
|
|
|
147
146
|
|
|
148
147
|
def _preprocess_horiontal_wind(
|
|
149
148
|
vert: VerticalWind, hori: HorizontalWind, options: Options
|
|
150
|
-
):
|
|
149
|
+
) -> npt.NDArray[np.float64]:
|
|
151
150
|
if np.isnan(hori.V).any():
|
|
152
151
|
raise ValueError("horizontal wind speed cannot contains NaNs")
|
|
153
152
|
trg_points = np.meshgrid(vert.time, vert.height, indexing="ij")
|
|
@@ -186,8 +185,8 @@ def _rolling_mean_over_time(
|
|
|
186
185
|
|
|
187
186
|
S = arr.cumsum(axis=0)
|
|
188
187
|
|
|
189
|
-
def rolling_mean(i: int, j: int) -> npt.NDArray[np.
|
|
190
|
-
return (S[j] - S[i] + arr[i]) / (j - i + 1)
|
|
188
|
+
def rolling_mean(i: int, j: int) -> npt.NDArray[np.float64]:
|
|
189
|
+
return np.array((S[j] - S[i] + arr[i]) / (j - i + 1), dtype=np.float64)
|
|
191
190
|
|
|
192
191
|
half_period = np.timedelta64(int(period * 0.5e6), "us")
|
|
193
192
|
rol_mean = np.full(arr.shape, np.nan, dtype=np.float64)
|
|
@@ -208,7 +207,7 @@ def _compute_dissipation_rate(
|
|
|
208
207
|
variance: npt.NDArray[np.float64],
|
|
209
208
|
length_scale_lower: npt.NDArray[np.float64],
|
|
210
209
|
length_scale_upper: npt.NDArray[np.float64],
|
|
211
|
-
):
|
|
210
|
+
) -> npt.NDArray[np.float64]:
|
|
212
211
|
"""
|
|
213
212
|
Parameters
|
|
214
213
|
----------
|
|
@@ -225,10 +224,10 @@ def _compute_dissipation_rate(
|
|
|
225
224
|
* (length_scale_upper ** (2 / 3) - length_scale_lower ** (2 / 3))
|
|
226
225
|
** (-3 / 2)
|
|
227
226
|
)
|
|
228
|
-
return dr
|
|
227
|
+
return np.array(dr, dtype=np.float64)
|
|
229
228
|
|
|
230
229
|
|
|
231
|
-
def _next_valid_from_mask(mask):
|
|
230
|
+
def _next_valid_from_mask(mask: npt.NDArray[np.bool_]) -> npt.NDArray[np.int64]:
|
|
232
231
|
"""
|
|
233
232
|
mask[t,v] (time,value)
|
|
234
233
|
|
|
@@ -244,10 +243,10 @@ def _next_valid_from_mask(mask):
|
|
|
244
243
|
for t in reversed(range(n - 1)):
|
|
245
244
|
N[t][~mask[t]] = t
|
|
246
245
|
N[t][mask[t]] = N[t + 1][mask[t]]
|
|
247
|
-
return N
|
|
246
|
+
return np.array(N, dtype=np.int64)
|
|
248
247
|
|
|
249
248
|
|
|
250
|
-
def _prev_valid_from_mask(mask):
|
|
249
|
+
def _prev_valid_from_mask(mask: npt.NDArray[np.bool_]) -> npt.NDArray[np.int64]:
|
|
251
250
|
"""
|
|
252
251
|
mask[t,v] (time,value)
|
|
253
252
|
|
|
@@ -262,4 +261,4 @@ def _prev_valid_from_mask(mask):
|
|
|
262
261
|
for t in range(1, n):
|
|
263
262
|
N[t][~mask[t]] = t
|
|
264
263
|
N[t][mask[t]] = N[t - 1][mask[t]]
|
|
265
|
-
return N
|
|
264
|
+
return np.array(N, dtype=np.int64)
|
doppy/rs.pyd
CHANGED
|
Binary file
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
doppy-0.5.
|
|
2
|
-
doppy-0.5.
|
|
3
|
-
doppy-0.5.
|
|
4
|
-
doppy-0.5.
|
|
1
|
+
doppy-0.5.2.dist-info/METADATA,sha256=mHDuliE31HGflXwmDeo0uCEscZHGj2e8iQ0r20nYKHI,4414
|
|
2
|
+
doppy-0.5.2.dist-info/WHEEL,sha256=md9qofgGs0CN4-5nDhVd0IzxxzM8cFGCnkeRThUNGbI,95
|
|
3
|
+
doppy-0.5.2.dist-info/entry_points.txt,sha256=9b_Ca7vJoh6AwL3W8qAPh_UmJ_1Pa6hi-TDfCTDjvSk,43
|
|
4
|
+
doppy-0.5.2.dist-info/licenses/LICENSE,sha256=RIAxFjJLTw0wQ3_SM73JoTeppoD99DJJ72cjvVuRrW4,1110
|
|
5
5
|
doppy/bench.py,sha256=X4yPXFPAM708ptzXKDYxVBOC0E3cMj_KxXzmD_Q9_RM,321
|
|
6
6
|
doppy/data/api.py,sha256=IoLRodfITNHs4Pb2IvVvOjSirSeK-xNoSO4tsQYjsKc,1933
|
|
7
7
|
doppy/data/cache.py,sha256=ERFzH-KjLLXV8fCePsewTepKZXmLwtXxeazmHiFdA80,1203
|
|
@@ -14,7 +14,7 @@ doppy/options.py,sha256=uyIKM_G2GtbmV6Gve8o13eIShQqUwsnYZ41mhX2ypGE,218
|
|
|
14
14
|
doppy/product/noise_utils.py,sha256=Bro3T8uMY9MmJcrXbOl_QKIU7OXVRUs_R6Norl5Tv3Q,2735
|
|
15
15
|
doppy/product/stare.py,sha256=A_Xy6nIScnCUlEoziZ164aIW1HVqE7WogCcL5Ljpc_o,28009
|
|
16
16
|
doppy/product/stare_depol.py,sha256=GkS-60Izk-rF9PnHPtOgAssr--K4ddzQHUlyLZ7JNkU,11026
|
|
17
|
-
doppy/product/turbulence.py,sha256=
|
|
17
|
+
doppy/product/turbulence.py,sha256=RHvQlNobnXiF2Vx8OuvTYe7BIibmTNNXpHa7X4BfGbQ,8870
|
|
18
18
|
doppy/product/wind.py,sha256=SbVM_AyLJtIggOb3PHLTak6majHaBMFJHNX36wRti1k,17298
|
|
19
19
|
doppy/product/__init__.py,sha256=xoBEXuhid-bvoof5Ogzpt1dKIhJgNMRyrAinCqUOUUI,241
|
|
20
20
|
doppy/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
@@ -28,5 +28,5 @@ doppy/raw/__init__.py,sha256=ycT-_mCiI19b2TH33L74-Eq_MYUTPe3B8NhwNodSx1E,267
|
|
|
28
28
|
doppy/utils.py,sha256=2PwDiO8GyMjsHC-EYcTGyN2mEfPaCi3hhEn2twETOl0,814
|
|
29
29
|
doppy/__init__.py,sha256=Af7_8p3oN1nTqS9fo0mVKVuiKf5CAEK69uQa32CSFBA,197
|
|
30
30
|
doppy/__main__.py,sha256=38hIWWfanILuBBGorQiAaleSC4qYJoIxuzVBkxf7Dng,371
|
|
31
|
-
doppy/rs.pyd,sha256=
|
|
32
|
-
doppy-0.5.
|
|
31
|
+
doppy/rs.pyd,sha256=DDQzPRR6UTBJqDpmZfP9FL-1TJcg-26nSktIeVnVVww,2164736
|
|
32
|
+
doppy-0.5.2.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|