ocf-data-sampler 0.0.49__py3-none-any.whl → 0.0.50__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.

@@ -9,11 +9,14 @@ class SiteSampleKey:
9
9
  capacity_kwp = "site_capacity_kwp"
10
10
  time_utc = "site_time_utc"
11
11
  t0_idx = "site_t0_idx"
12
+ id = "site_id"
12
13
  solar_azimuth = "site_solar_azimuth"
13
14
  solar_elevation = "site_solar_elevation"
14
- id = "site_id"
15
+ date_sin = "site_date_sin"
16
+ date_cos = "site_date_cos"
17
+ time_sin = "site_time_sin"
18
+ time_cos = "site_time_cos"
15
19
 
16
- # TODO update to include trig datetime + solar coords
17
20
  def convert_site_to_numpy_sample(da: xr.DataArray, t0_idx: int | None = None) -> dict:
18
21
  """Convert from Xarray to NumpySample"""
19
22
 
@@ -23,6 +26,12 @@ def convert_site_to_numpy_sample(da: xr.DataArray, t0_idx: int | None = None) ->
23
26
  SiteSampleKey.capacity_kwp: da.isel(time_utc=0)["capacity_kwp"].values,
24
27
  SiteSampleKey.time_utc: da["time_utc"].values.astype(float),
25
28
  SiteSampleKey.id: da["site_id"].values,
29
+ SiteSampleKey.solar_azimuth: da["solar_azimuth"].values,
30
+ SiteSampleKey.solar_elevation: da["solar_elevation"].values,
31
+ SiteSampleKey.date_sin: da["date_sin"].values,
32
+ SiteSampleKey.date_cos: da["date_cos"].values,
33
+ SiteSampleKey.time_sin: da["time_sin"].values,
34
+ SiteSampleKey.time_cos: da["time_cos"].values,
26
35
  }
27
36
 
28
37
  if t0_idx is not None:
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.2
2
2
  Name: ocf_data_sampler
3
- Version: 0.0.49
3
+ Version: 0.0.50
4
4
  Summary: Sample from weather data for renewable energy prediction
5
5
  Author: James Fulton, Peter Dudfield, and the Open Climate Fix team
6
6
  Author-email: info@openclimatefix.org
@@ -24,7 +24,7 @@ ocf_data_sampler/numpy_sample/datetime_features.py,sha256=U-9uRplfZ7VYFA4qBduI8O
24
24
  ocf_data_sampler/numpy_sample/gsp.py,sha256=5UaWO_aGRRVQo82wnDaT4zBKHihOnIsXiwgPjM8vGFM,1005
25
25
  ocf_data_sampler/numpy_sample/nwp.py,sha256=_seQNWsut3IzPsrpipqImjnaM3XNHZCy5_5be6syivk,1297
26
26
  ocf_data_sampler/numpy_sample/satellite.py,sha256=8OaTvkPjzSjotcdKsa6BKmmlBKDBunbhDN4Pjo0Grxs,910
27
- ocf_data_sampler/numpy_sample/site.py,sha256=cOVpFN_EVRD0d4TJtmPdNYcWjiWuWr8eswktC97KR8Q,890
27
+ ocf_data_sampler/numpy_sample/site.py,sha256=I-cAXCOF0SDdm5Hx43lFqYZ3jh61kltLQK-fc4_nNu0,1314
28
28
  ocf_data_sampler/numpy_sample/sun_position.py,sha256=UklhucCxCT6GMlAhCWL6c4cfWrdc1cWgegrYaqUoHOY,1611
29
29
  ocf_data_sampler/select/__init__.py,sha256=E4AJulEbO2K-o0UlG1fgaEteuf_1ZFjHTvrotXSb4YU,332
30
30
  ocf_data_sampler/select/dropout.py,sha256=HCx5Wzk8Oh2Z9vV94Jy-ALJsHtGduwvMaQOleQXp5z0,1142
@@ -66,8 +66,8 @@ tests/torch_datasets/conftest.py,sha256=eRCzHE7cxS4AoskExkCGFDBeqItktAYNAdkfpMoF
66
66
  tests/torch_datasets/test_merge_and_fill_utils.py,sha256=ueA0A7gZaWEgNdsU8p3CnKuvSnlleTUjEhSw2HUUROM,1229
67
67
  tests/torch_datasets/test_pvnet_uk_regional.py,sha256=FCiFueeFqrsXe7gWguSjBz5ZeUrvyhGbGw81gaVvkHM,5087
68
68
  tests/torch_datasets/test_site.py,sha256=0gT_7k086BBnxqbvOayiUeI-vzJsYXlx3KvACC0c6lk,6114
69
- ocf_data_sampler-0.0.49.dist-info/LICENSE,sha256=F-Q3UFCR-BECSocV55BFDpn4YKxve9PKrm-lTt6o_Tg,1073
70
- ocf_data_sampler-0.0.49.dist-info/METADATA,sha256=GuLd3IDZ7qU9W9wwV84AQ5tN8rlouhF4ZpDThHsVUKo,11788
71
- ocf_data_sampler-0.0.49.dist-info/WHEEL,sha256=In9FTNxeP60KnTkGw7wk6mJPYd_dQSjEZmXdBdMCI-8,91
72
- ocf_data_sampler-0.0.49.dist-info/top_level.txt,sha256=Faob6N6cFdPc5eUpCTYcXgCaNhi4XLLteUL5W5ayYmg,31
73
- ocf_data_sampler-0.0.49.dist-info/RECORD,,
69
+ ocf_data_sampler-0.0.50.dist-info/LICENSE,sha256=F-Q3UFCR-BECSocV55BFDpn4YKxve9PKrm-lTt6o_Tg,1073
70
+ ocf_data_sampler-0.0.50.dist-info/METADATA,sha256=-0wBnckdNj7eCVCM_VlU1Te7NDUBTZj2UtetHwVQcms,11788
71
+ ocf_data_sampler-0.0.50.dist-info/WHEEL,sha256=In9FTNxeP60KnTkGw7wk6mJPYd_dQSjEZmXdBdMCI-8,91
72
+ ocf_data_sampler-0.0.50.dist-info/top_level.txt,sha256=Faob6N6cFdPc5eUpCTYcXgCaNhi4XLLteUL5W5ayYmg,31
73
+ ocf_data_sampler-0.0.50.dist-info/RECORD,,