ocf-data-sampler 0.0.8__tar.gz → 0.0.9__tar.gz

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.

Files changed (29) hide show
  1. {ocf_data_sampler-0.0.8/ocf_data_sampler.egg-info → ocf_data_sampler-0.0.9}/PKG-INFO +1 -1
  2. {ocf_data_sampler-0.0.8 → ocf_data_sampler-0.0.9}/ocf_data_sampler/numpy_batch/nwp.py +1 -1
  3. {ocf_data_sampler-0.0.8 → ocf_data_sampler-0.0.9}/ocf_data_sampler/select/select_spatial_slice.py +4 -2
  4. {ocf_data_sampler-0.0.8 → ocf_data_sampler-0.0.9/ocf_data_sampler.egg-info}/PKG-INFO +1 -1
  5. {ocf_data_sampler-0.0.8 → ocf_data_sampler-0.0.9}/setup.py +1 -1
  6. {ocf_data_sampler-0.0.8 → ocf_data_sampler-0.0.9}/LICENSE +0 -0
  7. {ocf_data_sampler-0.0.8 → ocf_data_sampler-0.0.9}/MANIFEST.in +0 -0
  8. {ocf_data_sampler-0.0.8 → ocf_data_sampler-0.0.9}/README.md +0 -0
  9. {ocf_data_sampler-0.0.8 → ocf_data_sampler-0.0.9}/ocf_data_sampler/__init__.py +0 -0
  10. {ocf_data_sampler-0.0.8 → ocf_data_sampler-0.0.9}/ocf_data_sampler/data/uk_gsp_locations.csv +0 -0
  11. {ocf_data_sampler-0.0.8 → ocf_data_sampler-0.0.9}/ocf_data_sampler/numpy_batch/__init__.py +0 -0
  12. {ocf_data_sampler-0.0.8 → ocf_data_sampler-0.0.9}/ocf_data_sampler/numpy_batch/gsp.py +0 -0
  13. {ocf_data_sampler-0.0.8 → ocf_data_sampler-0.0.9}/ocf_data_sampler/numpy_batch/satellite.py +0 -0
  14. {ocf_data_sampler-0.0.8 → ocf_data_sampler-0.0.9}/ocf_data_sampler/numpy_batch/sun_position.py +0 -0
  15. {ocf_data_sampler-0.0.8 → ocf_data_sampler-0.0.9}/ocf_data_sampler/select/__init__.py +0 -0
  16. {ocf_data_sampler-0.0.8 → ocf_data_sampler-0.0.9}/ocf_data_sampler/select/dropout.py +0 -0
  17. {ocf_data_sampler-0.0.8 → ocf_data_sampler-0.0.9}/ocf_data_sampler/select/fill_time_periods.py +0 -0
  18. {ocf_data_sampler-0.0.8 → ocf_data_sampler-0.0.9}/ocf_data_sampler/select/find_contiguous_time_periods.py +0 -0
  19. {ocf_data_sampler-0.0.8 → ocf_data_sampler-0.0.9}/ocf_data_sampler/select/select_time_slice.py +0 -0
  20. {ocf_data_sampler-0.0.8 → ocf_data_sampler-0.0.9}/ocf_data_sampler/torch_datasets/__init__.py +0 -0
  21. {ocf_data_sampler-0.0.8 → ocf_data_sampler-0.0.9}/ocf_data_sampler/torch_datasets/pvnet_uk_regional.py +0 -0
  22. {ocf_data_sampler-0.0.8 → ocf_data_sampler-0.0.9}/ocf_data_sampler.egg-info/SOURCES.txt +0 -0
  23. {ocf_data_sampler-0.0.8 → ocf_data_sampler-0.0.9}/ocf_data_sampler.egg-info/dependency_links.txt +0 -0
  24. {ocf_data_sampler-0.0.8 → ocf_data_sampler-0.0.9}/ocf_data_sampler.egg-info/requires.txt +0 -0
  25. {ocf_data_sampler-0.0.8 → ocf_data_sampler-0.0.9}/ocf_data_sampler.egg-info/top_level.txt +0 -0
  26. {ocf_data_sampler-0.0.8 → ocf_data_sampler-0.0.9}/requirements.txt +0 -0
  27. {ocf_data_sampler-0.0.8 → ocf_data_sampler-0.0.9}/setup.cfg +0 -0
  28. {ocf_data_sampler-0.0.8 → ocf_data_sampler-0.0.9}/tests/__init__.py +0 -0
  29. {ocf_data_sampler-0.0.8 → ocf_data_sampler-0.0.9}/tests/conftest.py +0 -0
@@ -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
@@ -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
@@ -10,7 +10,7 @@ install_requires = (this_directory / "requirements.txt").read_text().splitlines(
10
10
 
11
11
  setup(
12
12
  name="ocf_data_sampler",
13
- version="0.0.8",
13
+ version="0.0.9",
14
14
  license="MIT",
15
15
  description="Sample from weather data for renewable energy prediction",
16
16
  author="James Fulton, Peter Dudfield, and the Open Climate Fix team",