eo-tides 0.6.3.dev6__py3-none-any.whl → 0.6.3.dev8__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.
- eo_tides/model.py +8 -1
- {eo_tides-0.6.3.dev6.dist-info → eo_tides-0.6.3.dev8.dist-info}/METADATA +1 -1
- {eo_tides-0.6.3.dev6.dist-info → eo_tides-0.6.3.dev8.dist-info}/RECORD +5 -5
- {eo_tides-0.6.3.dev6.dist-info → eo_tides-0.6.3.dev8.dist-info}/WHEEL +0 -0
- {eo_tides-0.6.3.dev6.dist-info → eo_tides-0.6.3.dev8.dist-info}/licenses/LICENSE +0 -0
eo_tides/model.py
CHANGED
@@ -330,6 +330,9 @@ def ensemble_tides(
|
|
330
330
|
x = tide_df.index.get_level_values(level="x")
|
331
331
|
y = tide_df.index.get_level_values(level="y")
|
332
332
|
|
333
|
+
# Identify input datatype
|
334
|
+
input_dtype = tide_df.tide_height.dtype
|
335
|
+
|
333
336
|
# Load model ranks points and reproject to same CRS as x and y
|
334
337
|
model_ranking_cols = [f"rank_{m}" for m in ensemble_models]
|
335
338
|
try:
|
@@ -373,6 +376,7 @@ def ensemble_tides(
|
|
373
376
|
.set_index(["tide_model", "x", "y"])
|
374
377
|
.groupby(["x", "y"])
|
375
378
|
.rank()
|
379
|
+
.astype("float32") # use smaller dtype for rankings to save memory
|
376
380
|
)
|
377
381
|
|
378
382
|
# If no custom ensemble funcs are provided, use a default ensemble
|
@@ -404,9 +408,12 @@ def ensemble_tides(
|
|
404
408
|
|
405
409
|
# Use weightings to combine multiple models into single ensemble
|
406
410
|
ensemble_df = (
|
407
|
-
# Calculate weighted mean
|
411
|
+
# Calculate weighted mean
|
408
412
|
grouped.weighted.sum()
|
409
413
|
.div(grouped.weights.sum())
|
414
|
+
# Make sure datatype is the same as the input
|
415
|
+
.astype(input_dtype)
|
416
|
+
# Convert to dataframe
|
410
417
|
.to_frame("tide_height")
|
411
418
|
# Label ensemble model and ensure indexes are in expected order
|
412
419
|
.assign(tide_model=ensemble_n)
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.4
|
2
2
|
Name: eo-tides
|
3
|
-
Version: 0.6.3.
|
3
|
+
Version: 0.6.3.dev8
|
4
4
|
Summary: Tide modelling tools for large-scale satellite earth observation analysis
|
5
5
|
Project-URL: Homepage, https://GeoscienceAustralia.github.io/eo-tides/
|
6
6
|
Project-URL: Repository, https://github.com/GeoscienceAustralia/eo-tides
|
@@ -1,10 +1,10 @@
|
|
1
1
|
eo_tides/__init__.py,sha256=pGvVlxMKiYjm_273G-oYcOgVuPra7uEdNZv0oN1i69c,1693
|
2
2
|
eo_tides/eo.py,sha256=TuFt9SSiO9Z2o8Kr1g-wFPzofp0HTcgkfhT83zu03kc,23983
|
3
|
-
eo_tides/model.py,sha256=
|
3
|
+
eo_tides/model.py,sha256=jRx6HNgTbK0inNqOkVivr52jPMJPWZ85gJeLjY2Vfk8,37697
|
4
4
|
eo_tides/stats.py,sha256=ELQpqIH86442IYgjrGrIK3mi0-pu2ZijFw53arA2FYg,23072
|
5
5
|
eo_tides/utils.py,sha256=T19OuPLHzaUKcovCVGANvmOiRu-L8VuDXSTzmNlA6Bo,26647
|
6
6
|
eo_tides/validation.py,sha256=KP8WLT5z7KLFjQ9oDla7VJOyLQAK4SVbcz2ySAbsbwI,11882
|
7
|
-
eo_tides-0.6.3.
|
8
|
-
eo_tides-0.6.3.
|
9
|
-
eo_tides-0.6.3.
|
10
|
-
eo_tides-0.6.3.
|
7
|
+
eo_tides-0.6.3.dev8.dist-info/METADATA,sha256=Lo5ToMZ18SJlVpLx98g3HZycO8AgOhLaDbiLeTwnF4g,8229
|
8
|
+
eo_tides-0.6.3.dev8.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
|
9
|
+
eo_tides-0.6.3.dev8.dist-info/licenses/LICENSE,sha256=owxWsXViCL2J6Ks3XYhot7t4Y93nstmXAT95Zf030Cc,11350
|
10
|
+
eo_tides-0.6.3.dev8.dist-info/RECORD,,
|
File without changes
|
File without changes
|