ocf-data-sampler 0.0.43__py3-none-any.whl → 0.0.44__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.
Potentially problematic release.
This version of ocf-data-sampler might be problematic. Click here for more details.
- ocf_data_sampler/numpy_sample/gsp.py +3 -3
- ocf_data_sampler/numpy_sample/nwp.py +5 -5
- ocf_data_sampler/numpy_sample/satellite.py +4 -4
- ocf_data_sampler/numpy_sample/site.py +3 -3
- {ocf_data_sampler-0.0.43.dist-info → ocf_data_sampler-0.0.44.dist-info}/METADATA +1 -1
- {ocf_data_sampler-0.0.43.dist-info → ocf_data_sampler-0.0.44.dist-info}/RECORD +9 -9
- {ocf_data_sampler-0.0.43.dist-info → ocf_data_sampler-0.0.44.dist-info}/LICENSE +0 -0
- {ocf_data_sampler-0.0.43.dist-info → ocf_data_sampler-0.0.44.dist-info}/WHEEL +0 -0
- {ocf_data_sampler-0.0.43.dist-info → ocf_data_sampler-0.0.44.dist-info}/top_level.txt +0 -0
|
@@ -21,7 +21,7 @@ def convert_gsp_to_numpy_sample(da: xr.DataArray, t0_idx: int | None = None) ->
|
|
|
21
21
|
"""Convert from Xarray to NumpySample"""
|
|
22
22
|
|
|
23
23
|
# Extract values from the DataArray
|
|
24
|
-
|
|
24
|
+
sample = {
|
|
25
25
|
GSPSampleKey.gsp: da.values,
|
|
26
26
|
GSPSampleKey.nominal_capacity_mwp: da.isel(time_utc=0)["nominal_capacity_mwp"].values,
|
|
27
27
|
GSPSampleKey.effective_capacity_mwp: da.isel(time_utc=0)["effective_capacity_mwp"].values,
|
|
@@ -29,6 +29,6 @@ def convert_gsp_to_numpy_sample(da: xr.DataArray, t0_idx: int | None = None) ->
|
|
|
29
29
|
}
|
|
30
30
|
|
|
31
31
|
if t0_idx is not None:
|
|
32
|
-
|
|
32
|
+
sample[GSPSampleKey.t0_idx] = t0_idx
|
|
33
33
|
|
|
34
|
-
return
|
|
34
|
+
return sample
|
|
@@ -21,7 +21,7 @@ def convert_nwp_to_numpy_sample(da: xr.DataArray, t0_idx: int | None = None) ->
|
|
|
21
21
|
"""Convert from Xarray to NWP NumpySample"""
|
|
22
22
|
|
|
23
23
|
# Create example and add t if available
|
|
24
|
-
|
|
24
|
+
sample = {
|
|
25
25
|
NWPSampleKey.nwp: da.values,
|
|
26
26
|
NWPSampleKey.channel_names: da.channel.values,
|
|
27
27
|
NWPSampleKey.init_time_utc: da.init_time_utc.values.astype(float),
|
|
@@ -29,14 +29,14 @@ def convert_nwp_to_numpy_sample(da: xr.DataArray, t0_idx: int | None = None) ->
|
|
|
29
29
|
}
|
|
30
30
|
|
|
31
31
|
if "target_time_utc" in da.coords:
|
|
32
|
-
|
|
32
|
+
sample[NWPSampleKey.target_time_utc] = da.target_time_utc.values.astype(float)
|
|
33
33
|
|
|
34
34
|
# TODO: Do we need this at all? Especially since it is only present in UKV data
|
|
35
35
|
for sample_key, dataset_key in ((NWPSampleKey.y_osgb, "y_osgb"),(NWPSampleKey.x_osgb, "x_osgb"),):
|
|
36
36
|
if dataset_key in da.coords:
|
|
37
|
-
|
|
37
|
+
sample[sample_key] = da[dataset_key].values
|
|
38
38
|
|
|
39
39
|
if t0_idx is not None:
|
|
40
|
-
|
|
40
|
+
sample[NWPSampleKey.t0_idx] = t0_idx
|
|
41
41
|
|
|
42
|
-
return
|
|
42
|
+
return sample
|
|
@@ -13,7 +13,7 @@ class SatelliteSampleKey:
|
|
|
13
13
|
|
|
14
14
|
def convert_satellite_to_numpy_sample(da: xr.DataArray, t0_idx: int | None = None) -> dict:
|
|
15
15
|
"""Convert from Xarray to NumpySample"""
|
|
16
|
-
|
|
16
|
+
sample = {
|
|
17
17
|
SatelliteSampleKey.satellite_actual: da.values,
|
|
18
18
|
SatelliteSampleKey.time_utc: da.time_utc.values.astype(float),
|
|
19
19
|
}
|
|
@@ -22,9 +22,9 @@ def convert_satellite_to_numpy_sample(da: xr.DataArray, t0_idx: int | None = Non
|
|
|
22
22
|
(SatelliteSampleKey.x_geostationary, "x_geostationary"),
|
|
23
23
|
(SatelliteSampleKey.y_geostationary, "y_geostationary"),
|
|
24
24
|
):
|
|
25
|
-
|
|
25
|
+
sample[sample_key] = da[dataset_key].values
|
|
26
26
|
|
|
27
27
|
if t0_idx is not None:
|
|
28
|
-
|
|
28
|
+
sample[SatelliteSampleKey.t0_idx] = t0_idx
|
|
29
29
|
|
|
30
|
-
return
|
|
30
|
+
return sample
|
|
@@ -18,13 +18,13 @@ def convert_site_to_numpy_sample(da: xr.DataArray, t0_idx: int | None = None) ->
|
|
|
18
18
|
"""Convert from Xarray to NumpySample"""
|
|
19
19
|
|
|
20
20
|
# Extract values from the DataArray
|
|
21
|
-
|
|
21
|
+
sample = {
|
|
22
22
|
SiteSampleKey.generation: da.values,
|
|
23
23
|
SiteSampleKey.capacity_kwp: da.isel(time_utc=0)["capacity_kwp"].values,
|
|
24
24
|
SiteSampleKey.time_utc: da["time_utc"].values.astype(float),
|
|
25
25
|
}
|
|
26
26
|
|
|
27
27
|
if t0_idx is not None:
|
|
28
|
-
|
|
28
|
+
sample[SiteSampleKey.t0_idx] = t0_idx
|
|
29
29
|
|
|
30
|
-
return
|
|
30
|
+
return sample
|
|
@@ -20,10 +20,10 @@ ocf_data_sampler/load/nwp/providers/ukv.py,sha256=79Bm7q-K_GJPYMy62SUIZbRWRF4-tI
|
|
|
20
20
|
ocf_data_sampler/load/nwp/providers/utils.py,sha256=Sy2exG1wpXLLhMXYdsfR-DZMR3txG1_bBmBdchlc-yA,848
|
|
21
21
|
ocf_data_sampler/numpy_sample/__init__.py,sha256=jWvN4BDYAgoFkdGBxjNrYioZdZNVbIcP4RsNGJCEGm0,345
|
|
22
22
|
ocf_data_sampler/numpy_sample/collate.py,sha256=y8QFUhskaAfOMP22aVkexwyGAwLHbNE-q1pOZ6txWKA,2227
|
|
23
|
-
ocf_data_sampler/numpy_sample/gsp.py,sha256=
|
|
24
|
-
ocf_data_sampler/numpy_sample/nwp.py,sha256=
|
|
25
|
-
ocf_data_sampler/numpy_sample/satellite.py,sha256=
|
|
26
|
-
ocf_data_sampler/numpy_sample/site.py,sha256=
|
|
23
|
+
ocf_data_sampler/numpy_sample/gsp.py,sha256=5UaWO_aGRRVQo82wnDaT4zBKHihOnIsXiwgPjM8vGFM,1005
|
|
24
|
+
ocf_data_sampler/numpy_sample/nwp.py,sha256=_seQNWsut3IzPsrpipqImjnaM3XNHZCy5_5be6syivk,1297
|
|
25
|
+
ocf_data_sampler/numpy_sample/satellite.py,sha256=8OaTvkPjzSjotcdKsa6BKmmlBKDBunbhDN4Pjo0Grxs,910
|
|
26
|
+
ocf_data_sampler/numpy_sample/site.py,sha256=PIfmCtPA37dqpC8GArkryVqFrNAwqacj0iW2ikBOdSk,789
|
|
27
27
|
ocf_data_sampler/numpy_sample/sun_position.py,sha256=UklhucCxCT6GMlAhCWL6c4cfWrdc1cWgegrYaqUoHOY,1611
|
|
28
28
|
ocf_data_sampler/select/__init__.py,sha256=E4AJulEbO2K-o0UlG1fgaEteuf_1ZFjHTvrotXSb4YU,332
|
|
29
29
|
ocf_data_sampler/select/dropout.py,sha256=HCx5Wzk8Oh2Z9vV94Jy-ALJsHtGduwvMaQOleQXp5z0,1142
|
|
@@ -64,8 +64,8 @@ tests/torch_datasets/conftest.py,sha256=eRCzHE7cxS4AoskExkCGFDBeqItktAYNAdkfpMoF
|
|
|
64
64
|
tests/torch_datasets/test_process_and_combine.py,sha256=mbjQdqzLhox-U2sc1Ec68xLz95b3XOyPa7WchgxUM88,4256
|
|
65
65
|
tests/torch_datasets/test_pvnet_uk_regional.py,sha256=dLY861PMyQ_buTksP8d0UXzfKsZ_CFNgceSYVGXRIRs,2134
|
|
66
66
|
tests/torch_datasets/test_site.py,sha256=TSmdpD0OFid6e8eRgeB5FGxglUN1L2t4cIuMTfjA7jE,4539
|
|
67
|
-
ocf_data_sampler-0.0.
|
|
68
|
-
ocf_data_sampler-0.0.
|
|
69
|
-
ocf_data_sampler-0.0.
|
|
70
|
-
ocf_data_sampler-0.0.
|
|
71
|
-
ocf_data_sampler-0.0.
|
|
67
|
+
ocf_data_sampler-0.0.44.dist-info/LICENSE,sha256=F-Q3UFCR-BECSocV55BFDpn4YKxve9PKrm-lTt6o_Tg,1073
|
|
68
|
+
ocf_data_sampler-0.0.44.dist-info/METADATA,sha256=DXdwieKe_o3sJ5BSZ8-zN8xawG3_1YDLQRHqgWV89xM,11431
|
|
69
|
+
ocf_data_sampler-0.0.44.dist-info/WHEEL,sha256=In9FTNxeP60KnTkGw7wk6mJPYd_dQSjEZmXdBdMCI-8,91
|
|
70
|
+
ocf_data_sampler-0.0.44.dist-info/top_level.txt,sha256=Faob6N6cFdPc5eUpCTYcXgCaNhi4XLLteUL5W5ayYmg,31
|
|
71
|
+
ocf_data_sampler-0.0.44.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|