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.
- {ocf_data_sampler-0.0.8/ocf_data_sampler.egg-info → ocf_data_sampler-0.0.9}/PKG-INFO +1 -1
- {ocf_data_sampler-0.0.8 → ocf_data_sampler-0.0.9}/ocf_data_sampler/numpy_batch/nwp.py +1 -1
- {ocf_data_sampler-0.0.8 → ocf_data_sampler-0.0.9}/ocf_data_sampler/select/select_spatial_slice.py +4 -2
- {ocf_data_sampler-0.0.8 → ocf_data_sampler-0.0.9/ocf_data_sampler.egg-info}/PKG-INFO +1 -1
- {ocf_data_sampler-0.0.8 → ocf_data_sampler-0.0.9}/setup.py +1 -1
- {ocf_data_sampler-0.0.8 → ocf_data_sampler-0.0.9}/LICENSE +0 -0
- {ocf_data_sampler-0.0.8 → ocf_data_sampler-0.0.9}/MANIFEST.in +0 -0
- {ocf_data_sampler-0.0.8 → ocf_data_sampler-0.0.9}/README.md +0 -0
- {ocf_data_sampler-0.0.8 → ocf_data_sampler-0.0.9}/ocf_data_sampler/__init__.py +0 -0
- {ocf_data_sampler-0.0.8 → ocf_data_sampler-0.0.9}/ocf_data_sampler/data/uk_gsp_locations.csv +0 -0
- {ocf_data_sampler-0.0.8 → ocf_data_sampler-0.0.9}/ocf_data_sampler/numpy_batch/__init__.py +0 -0
- {ocf_data_sampler-0.0.8 → ocf_data_sampler-0.0.9}/ocf_data_sampler/numpy_batch/gsp.py +0 -0
- {ocf_data_sampler-0.0.8 → ocf_data_sampler-0.0.9}/ocf_data_sampler/numpy_batch/satellite.py +0 -0
- {ocf_data_sampler-0.0.8 → ocf_data_sampler-0.0.9}/ocf_data_sampler/numpy_batch/sun_position.py +0 -0
- {ocf_data_sampler-0.0.8 → ocf_data_sampler-0.0.9}/ocf_data_sampler/select/__init__.py +0 -0
- {ocf_data_sampler-0.0.8 → ocf_data_sampler-0.0.9}/ocf_data_sampler/select/dropout.py +0 -0
- {ocf_data_sampler-0.0.8 → ocf_data_sampler-0.0.9}/ocf_data_sampler/select/fill_time_periods.py +0 -0
- {ocf_data_sampler-0.0.8 → ocf_data_sampler-0.0.9}/ocf_data_sampler/select/find_contiguous_time_periods.py +0 -0
- {ocf_data_sampler-0.0.8 → ocf_data_sampler-0.0.9}/ocf_data_sampler/select/select_time_slice.py +0 -0
- {ocf_data_sampler-0.0.8 → ocf_data_sampler-0.0.9}/ocf_data_sampler/torch_datasets/__init__.py +0 -0
- {ocf_data_sampler-0.0.8 → ocf_data_sampler-0.0.9}/ocf_data_sampler/torch_datasets/pvnet_uk_regional.py +0 -0
- {ocf_data_sampler-0.0.8 → ocf_data_sampler-0.0.9}/ocf_data_sampler.egg-info/SOURCES.txt +0 -0
- {ocf_data_sampler-0.0.8 → ocf_data_sampler-0.0.9}/ocf_data_sampler.egg-info/dependency_links.txt +0 -0
- {ocf_data_sampler-0.0.8 → ocf_data_sampler-0.0.9}/ocf_data_sampler.egg-info/requires.txt +0 -0
- {ocf_data_sampler-0.0.8 → ocf_data_sampler-0.0.9}/ocf_data_sampler.egg-info/top_level.txt +0 -0
- {ocf_data_sampler-0.0.8 → ocf_data_sampler-0.0.9}/requirements.txt +0 -0
- {ocf_data_sampler-0.0.8 → ocf_data_sampler-0.0.9}/setup.cfg +0 -0
- {ocf_data_sampler-0.0.8 → ocf_data_sampler-0.0.9}/tests/__init__.py +0 -0
- {ocf_data_sampler-0.0.8 → ocf_data_sampler-0.0.9}/tests/conftest.py +0 -0
|
@@ -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("
|
|
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:
|
{ocf_data_sampler-0.0.8 → ocf_data_sampler-0.0.9}/ocf_data_sampler/select/select_spatial_slice.py
RENAMED
|
@@ -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
|
-
|
|
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(
|
|
@@ -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.
|
|
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",
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{ocf_data_sampler-0.0.8 → ocf_data_sampler-0.0.9}/ocf_data_sampler/data/uk_gsp_locations.csv
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{ocf_data_sampler-0.0.8 → ocf_data_sampler-0.0.9}/ocf_data_sampler/numpy_batch/sun_position.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{ocf_data_sampler-0.0.8 → ocf_data_sampler-0.0.9}/ocf_data_sampler/select/fill_time_periods.py
RENAMED
|
File without changes
|
|
File without changes
|
{ocf_data_sampler-0.0.8 → ocf_data_sampler-0.0.9}/ocf_data_sampler/select/select_time_slice.py
RENAMED
|
File without changes
|
{ocf_data_sampler-0.0.8 → ocf_data_sampler-0.0.9}/ocf_data_sampler/torch_datasets/__init__.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{ocf_data_sampler-0.0.8 → ocf_data_sampler-0.0.9}/ocf_data_sampler.egg-info/dependency_links.txt
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|