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

@@ -6,12 +6,12 @@ import xarray as xr
6
6
  class SiteBatchKey:
7
7
 
8
8
  generation = "site"
9
- site_capacity_kwp = "site_capacity_kwp"
10
- site_time_utc = "site_time_utc"
11
- site_t0_idx = "site_t0_idx"
12
- site_solar_azimuth = "site_solar_azimuth"
13
- site_solar_elevation = "site_solar_elevation"
14
- site_id = "site_id"
9
+ capacity_kwp = "site_capacity_kwp"
10
+ time_utc = "site_time_utc"
11
+ t0_idx = "site_t0_idx"
12
+ solar_azimuth = "site_solar_azimuth"
13
+ solar_elevation = "site_solar_elevation"
14
+ id = "site_id"
15
15
 
16
16
 
17
17
  def convert_site_to_numpy_batch(da: xr.DataArray, t0_idx: int | None = None) -> dict:
@@ -19,11 +19,11 @@ def convert_site_to_numpy_batch(da: xr.DataArray, t0_idx: int | None = None) ->
19
19
 
20
20
  example = {
21
21
  SiteBatchKey.generation: da.values,
22
- SiteBatchKey.site_capacity_kwp: da.isel(time_utc=0)["capacity_kwp"].values,
23
- SiteBatchKey.site_time_utc: da["time_utc"].values.astype(float),
22
+ SiteBatchKey.capacity_kwp: da.isel(time_utc=0)["capacity_kwp"].values,
23
+ SiteBatchKey.time_utc: da["time_utc"].values.astype(float),
24
24
  }
25
25
 
26
26
  if t0_idx is not None:
27
- example[SiteBatchKey.site_t0_idx] = t0_idx
27
+ example[SiteBatchKey.t0_idx] = t0_idx
28
28
 
29
29
  return example
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: ocf_data_sampler
3
- Version: 0.0.34
3
+ Version: 0.0.36
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
@@ -22,7 +22,7 @@ ocf_data_sampler/numpy_batch/__init__.py,sha256=8MgRF29rK9bKP4b4iHakaoGwBKUcjWZ-
22
22
  ocf_data_sampler/numpy_batch/gsp.py,sha256=QjQ25JmtufvdiSsxUkBTPhxouYGWPnnWze8pXr_aBno,960
23
23
  ocf_data_sampler/numpy_batch/nwp.py,sha256=dAehfRo5DL2Yb20ifHHl5cU1QOrm3ZOpQmN39fSUOw8,1255
24
24
  ocf_data_sampler/numpy_batch/satellite.py,sha256=3NoE_ElzMHwO60apqJeFAwI6J7eIxD0OWTyAVl-uJi8,903
25
- ocf_data_sampler/numpy_batch/site.py,sha256=lJYMEot50UgSBnSOgADQMjUhky1YyWKYqwNsisyYV6w,789
25
+ ocf_data_sampler/numpy_batch/site.py,sha256=CWI0efUl8SrnGm0VNGdGwAqrmlT1XaVbJIUE2hSOz9E,744
26
26
  ocf_data_sampler/numpy_batch/sun_position.py,sha256=zw2bjtcjsm_tvKk0r_MZmgfYUJLHuLjLly2sMjwP3XI,1606
27
27
  ocf_data_sampler/select/__init__.py,sha256=E4AJulEbO2K-o0UlG1fgaEteuf_1ZFjHTvrotXSb4YU,332
28
28
  ocf_data_sampler/select/dropout.py,sha256=HCx5Wzk8Oh2Z9vV94Jy-ALJsHtGduwvMaQOleQXp5z0,1142
@@ -59,8 +59,8 @@ tests/select/test_select_spatial_slice.py,sha256=7EX9b6g-pMdACQx3yefjs5do2s-Rho2
59
59
  tests/select/test_select_time_slice.py,sha256=K1EJR5TwZa9dJf_YTEHxGtvs398iy1xS2lr1BgJZkoo,9603
60
60
  tests/torch_datasets/test_pvnet_uk_regional.py,sha256=ZNyrisyhM1vw4q2qcHDuvX2uRi-v3U8Y8lOYx7cd8yM,2635
61
61
  tests/torch_datasets/test_site.py,sha256=YuVjWTI14_kmEOx23XE5J_RZ8UalCKD2xRv6mqYizB8,2872
62
- ocf_data_sampler-0.0.34.dist-info/LICENSE,sha256=F-Q3UFCR-BECSocV55BFDpn4YKxve9PKrm-lTt6o_Tg,1073
63
- ocf_data_sampler-0.0.34.dist-info/METADATA,sha256=xjymg-AkGpCWKcG5FoAP3ITmaWQhdOGBnVzLqK9lr7k,9933
64
- ocf_data_sampler-0.0.34.dist-info/WHEEL,sha256=PZUExdf71Ui_so67QXpySuHtCi3-J3wvF4ORK6k_S8U,91
65
- ocf_data_sampler-0.0.34.dist-info/top_level.txt,sha256=Faob6N6cFdPc5eUpCTYcXgCaNhi4XLLteUL5W5ayYmg,31
66
- ocf_data_sampler-0.0.34.dist-info/RECORD,,
62
+ ocf_data_sampler-0.0.36.dist-info/LICENSE,sha256=F-Q3UFCR-BECSocV55BFDpn4YKxve9PKrm-lTt6o_Tg,1073
63
+ ocf_data_sampler-0.0.36.dist-info/METADATA,sha256=t2N8IyEMdDI8Zf9YXModYFV6zmYPddy1y2wg9nEw_Cc,9933
64
+ ocf_data_sampler-0.0.36.dist-info/WHEEL,sha256=PZUExdf71Ui_so67QXpySuHtCi3-J3wvF4ORK6k_S8U,91
65
+ ocf_data_sampler-0.0.36.dist-info/top_level.txt,sha256=Faob6N6cFdPc5eUpCTYcXgCaNhi4XLLteUL5W5ayYmg,31
66
+ ocf_data_sampler-0.0.36.dist-info/RECORD,,