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

@@ -13,7 +13,7 @@ def convert_nwp_to_numpy_batch(da: xr.DataArray, t0_idx: int | None = None) -> N
13
13
  NWPBatchKey.nwp: da.values,
14
14
  NWPBatchKey.nwp_channel_names: da.channel.values,
15
15
  NWPBatchKey.nwp_init_time_utc: da.init_time_utc.values.astype(float),
16
- NWPBatchKey.nwp_step: (da.step.values / pd.Timedelta("1H")).astype(int),
16
+ NWPBatchKey.nwp_step: (da.step.values / pd.Timedelta("1h")).astype(int),
17
17
  }
18
18
 
19
19
  if "target_time_utc" in da.coords:
@@ -124,8 +124,10 @@ def _get_idx_of_pixel_closest_to_poi_geostationary(
124
124
  center_geostationary = Location(x=x, y=y, coordinate_system="geostationary")
125
125
 
126
126
  # Check that the requested point lies within the data
127
- assert da[x_dim].min() < x < da[x_dim].max()
128
- assert da[y_dim].min() < y < da[y_dim].max()
127
+ assert da[x_dim].min() < x < da[x_dim].max(), \
128
+ f"{x} is not in the interval {da[x_dim].min().values}: {da[x_dim].max().values}"
129
+ assert da[y_dim].min() < y < da[y_dim].max(), \
130
+ f"{y} is not in the interval {da[y_dim].min().values}: {da[y_dim].max().values}"
129
131
 
130
132
  # Get the index into x and y nearest to x_center_geostationary and y_center_geostationary:
131
133
  x_index_at_center = searchsorted(
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: ocf_data_sampler
3
- Version: 0.0.8
3
+ Version: 0.0.9
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
@@ -2,21 +2,21 @@ ocf_data_sampler/__init__.py,sha256=AbpHGcgLb-kRsJGnwFEktk7uzpZOCcBY74-YBdrKVGs,
2
2
  ocf_data_sampler/data/uk_gsp_locations.csv,sha256=RSh7DRh55E3n8lVAaWXGTaXXHevZZtI58td4d4DhGos,10415772
3
3
  ocf_data_sampler/numpy_batch/__init__.py,sha256=mrtqwbGik5Zc9MYP5byfCTBm08wMtS2XnTsypC4fPMo,245
4
4
  ocf_data_sampler/numpy_batch/gsp.py,sha256=EL0_cJJNyvkQQcOat9vFA61pF4lema3BP_vB4ZS788U,805
5
- ocf_data_sampler/numpy_batch/nwp.py,sha256=AdEBPOjvEnyWJ8UAVqrBfSXPGMSl3sC1_Rfxxr0A1xM,1105
5
+ ocf_data_sampler/numpy_batch/nwp.py,sha256=Rv0yfDj902Z2oCwdlRjOs3Kh-F5Fgxjjylh99-lQ9ws,1105
6
6
  ocf_data_sampler/numpy_batch/satellite.py,sha256=e6eoNmiiHtzZbDVtBolFzDuE3qwhHN6bL9H86emAUsk,732
7
7
  ocf_data_sampler/numpy_batch/sun_position.py,sha256=UW6-WtjrKdCkcguolHUDSLhYFfarknQzzjlCX8YdEOM,1700
8
8
  ocf_data_sampler/select/__init__.py,sha256=AbpHGcgLb-kRsJGnwFEktk7uzpZOCcBY74-YBdrKVGs,1
9
9
  ocf_data_sampler/select/dropout.py,sha256=JYbjG5e8d48te7xj4I9pTWk43d6ksjGeyKFLSTuAOlY,1062
10
10
  ocf_data_sampler/select/fill_time_periods.py,sha256=iTtMjIPFYG5xtUYYedAFBLjTWWUa7t7WQ0-yksWf0-E,440
11
11
  ocf_data_sampler/select/find_contiguous_time_periods.py,sha256=6ioB8LeFpFNBMgKDxrgG3zqzNjkBF_jlV9yye2ZYT2E,11925
12
- ocf_data_sampler/select/select_spatial_slice.py,sha256=ZKYrEVyUB83Amayc_cYkEw4g93Veone8d3DWrYJCZb8,11286
12
+ ocf_data_sampler/select/select_spatial_slice.py,sha256=7BSzOFPMSBWpBWXSajWTfI8luUVsSgh4zN-rkr-AuUs,11470
13
13
  ocf_data_sampler/select/select_time_slice.py,sha256=XuksC9N03c5rV9OeWtxjGuoGyeJJGy4JMJe3w7m6oaw,6654
14
14
  ocf_data_sampler/torch_datasets/__init__.py,sha256=AbpHGcgLb-kRsJGnwFEktk7uzpZOCcBY74-YBdrKVGs,1
15
15
  ocf_data_sampler/torch_datasets/pvnet_uk_regional.py,sha256=rVKFfoHqSfm4C-eOXiqi5GwBJdMewRMIikvpjEJXi1s,17477
16
16
  tests/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
17
17
  tests/conftest.py,sha256=OcArgF60paroZQqoP7xExRBF34nEyMuXd7dS7hD6p3w,5393
18
- ocf_data_sampler-0.0.8.dist-info/LICENSE,sha256=F-Q3UFCR-BECSocV55BFDpn4YKxve9PKrm-lTt6o_Tg,1073
19
- ocf_data_sampler-0.0.8.dist-info/METADATA,sha256=kMfeb2SacYux-bEozcQPMpFRYNH9YEGu2luYR-Hx9JE,587
20
- ocf_data_sampler-0.0.8.dist-info/WHEEL,sha256=HiCZjzuy6Dw0hdX5R3LCFPDmFS4BWl8H-8W39XfmgX4,91
21
- ocf_data_sampler-0.0.8.dist-info/top_level.txt,sha256=KaQn5qzkJGJP6hKWqsVAc9t0cMLjVvSTk8-kTrW79SA,23
22
- ocf_data_sampler-0.0.8.dist-info/RECORD,,
18
+ ocf_data_sampler-0.0.9.dist-info/LICENSE,sha256=F-Q3UFCR-BECSocV55BFDpn4YKxve9PKrm-lTt6o_Tg,1073
19
+ ocf_data_sampler-0.0.9.dist-info/METADATA,sha256=ubu-StG7JD9xjbT5TuwkRjanPG0F7Vuf56Bo1AX2u2c,587
20
+ ocf_data_sampler-0.0.9.dist-info/WHEEL,sha256=HiCZjzuy6Dw0hdX5R3LCFPDmFS4BWl8H-8W39XfmgX4,91
21
+ ocf_data_sampler-0.0.9.dist-info/top_level.txt,sha256=KaQn5qzkJGJP6hKWqsVAc9t0cMLjVvSTk8-kTrW79SA,23
22
+ ocf_data_sampler-0.0.9.dist-info/RECORD,,