ocf-data-sampler 0.0.11__tar.gz → 0.0.12__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.11/ocf_data_sampler.egg-info → ocf_data_sampler-0.0.12}/PKG-INFO +1 -1
- {ocf_data_sampler-0.0.11 → ocf_data_sampler-0.0.12}/ocf_data_sampler/torch_datasets/pvnet_uk_regional.py +14 -7
- {ocf_data_sampler-0.0.11 → ocf_data_sampler-0.0.12/ocf_data_sampler.egg-info}/PKG-INFO +1 -1
- {ocf_data_sampler-0.0.11 → ocf_data_sampler-0.0.12}/setup.py +1 -1
- {ocf_data_sampler-0.0.11 → ocf_data_sampler-0.0.12}/LICENSE +0 -0
- {ocf_data_sampler-0.0.11 → ocf_data_sampler-0.0.12}/MANIFEST.in +0 -0
- {ocf_data_sampler-0.0.11 → ocf_data_sampler-0.0.12}/README.md +0 -0
- {ocf_data_sampler-0.0.11 → ocf_data_sampler-0.0.12}/ocf_data_sampler/__init__.py +0 -0
- {ocf_data_sampler-0.0.11 → ocf_data_sampler-0.0.12}/ocf_data_sampler/data/uk_gsp_locations.csv +0 -0
- {ocf_data_sampler-0.0.11 → ocf_data_sampler-0.0.12}/ocf_data_sampler/load/__init__.py +0 -0
- {ocf_data_sampler-0.0.11 → ocf_data_sampler-0.0.12}/ocf_data_sampler/load/gsp.py +0 -0
- {ocf_data_sampler-0.0.11 → ocf_data_sampler-0.0.12}/ocf_data_sampler/load/nwp/__init__.py +0 -0
- {ocf_data_sampler-0.0.11 → ocf_data_sampler-0.0.12}/ocf_data_sampler/load/nwp/nwp.py +0 -0
- {ocf_data_sampler-0.0.11 → ocf_data_sampler-0.0.12}/ocf_data_sampler/load/nwp/providers/__init__.py +0 -0
- {ocf_data_sampler-0.0.11 → ocf_data_sampler-0.0.12}/ocf_data_sampler/load/nwp/providers/ecmwf.py +0 -0
- {ocf_data_sampler-0.0.11 → ocf_data_sampler-0.0.12}/ocf_data_sampler/load/nwp/providers/ukv.py +0 -0
- {ocf_data_sampler-0.0.11 → ocf_data_sampler-0.0.12}/ocf_data_sampler/load/nwp/providers/utils.py +0 -0
- {ocf_data_sampler-0.0.11 → ocf_data_sampler-0.0.12}/ocf_data_sampler/load/satellite.py +0 -0
- {ocf_data_sampler-0.0.11 → ocf_data_sampler-0.0.12}/ocf_data_sampler/load/utils.py +0 -0
- {ocf_data_sampler-0.0.11 → ocf_data_sampler-0.0.12}/ocf_data_sampler/numpy_batch/__init__.py +0 -0
- {ocf_data_sampler-0.0.11 → ocf_data_sampler-0.0.12}/ocf_data_sampler/numpy_batch/gsp.py +0 -0
- {ocf_data_sampler-0.0.11 → ocf_data_sampler-0.0.12}/ocf_data_sampler/numpy_batch/nwp.py +0 -0
- {ocf_data_sampler-0.0.11 → ocf_data_sampler-0.0.12}/ocf_data_sampler/numpy_batch/satellite.py +0 -0
- {ocf_data_sampler-0.0.11 → ocf_data_sampler-0.0.12}/ocf_data_sampler/numpy_batch/sun_position.py +0 -0
- {ocf_data_sampler-0.0.11 → ocf_data_sampler-0.0.12}/ocf_data_sampler/select/__init__.py +0 -0
- {ocf_data_sampler-0.0.11 → ocf_data_sampler-0.0.12}/ocf_data_sampler/select/dropout.py +0 -0
- {ocf_data_sampler-0.0.11 → ocf_data_sampler-0.0.12}/ocf_data_sampler/select/fill_time_periods.py +0 -0
- {ocf_data_sampler-0.0.11 → ocf_data_sampler-0.0.12}/ocf_data_sampler/select/find_contiguous_time_periods.py +0 -0
- {ocf_data_sampler-0.0.11 → ocf_data_sampler-0.0.12}/ocf_data_sampler/select/select_spatial_slice.py +0 -0
- {ocf_data_sampler-0.0.11 → ocf_data_sampler-0.0.12}/ocf_data_sampler/select/select_time_slice.py +0 -0
- {ocf_data_sampler-0.0.11 → ocf_data_sampler-0.0.12}/ocf_data_sampler/torch_datasets/__init__.py +0 -0
- {ocf_data_sampler-0.0.11 → ocf_data_sampler-0.0.12}/ocf_data_sampler.egg-info/SOURCES.txt +0 -0
- {ocf_data_sampler-0.0.11 → ocf_data_sampler-0.0.12}/ocf_data_sampler.egg-info/dependency_links.txt +0 -0
- {ocf_data_sampler-0.0.11 → ocf_data_sampler-0.0.12}/ocf_data_sampler.egg-info/requires.txt +0 -0
- {ocf_data_sampler-0.0.11 → ocf_data_sampler-0.0.12}/ocf_data_sampler.egg-info/top_level.txt +0 -0
- {ocf_data_sampler-0.0.11 → ocf_data_sampler-0.0.12}/requirements.txt +0 -0
- {ocf_data_sampler-0.0.11 → ocf_data_sampler-0.0.12}/setup.cfg +0 -0
- {ocf_data_sampler-0.0.11 → ocf_data_sampler-0.0.12}/tests/__init__.py +0 -0
- {ocf_data_sampler-0.0.11 → ocf_data_sampler-0.0.12}/tests/conftest.py +0 -0
|
@@ -114,7 +114,7 @@ def find_valid_t0_times(
|
|
|
114
114
|
|
|
115
115
|
assert set(datasets_dict.keys()).issubset({"nwp", "sat", "gsp"})
|
|
116
116
|
|
|
117
|
-
contiguous_time_periods =
|
|
117
|
+
contiguous_time_periods: dict[str: pd.DataFrame] = {} # Used to store contiguous time periods from each data source
|
|
118
118
|
|
|
119
119
|
if "nwp" in datasets_dict:
|
|
120
120
|
for nwp_key, nwp_config in config.input_data.nwp.items():
|
|
@@ -158,7 +158,7 @@ def find_valid_t0_times(
|
|
|
158
158
|
max_dropout=max_dropout,
|
|
159
159
|
)
|
|
160
160
|
|
|
161
|
-
contiguous_time_periods
|
|
161
|
+
contiguous_time_periods[f'nwp_{nwp_key}'] = time_periods
|
|
162
162
|
|
|
163
163
|
if "sat" in datasets_dict:
|
|
164
164
|
sat_config = config.input_data.satellite
|
|
@@ -170,7 +170,7 @@ def find_valid_t0_times(
|
|
|
170
170
|
forecast_duration=minutes(sat_config.forecast_minutes),
|
|
171
171
|
)
|
|
172
172
|
|
|
173
|
-
contiguous_time_periods
|
|
173
|
+
contiguous_time_periods['sat'] = time_periods
|
|
174
174
|
|
|
175
175
|
# GSP always assumed to be in data
|
|
176
176
|
gsp_config = config.input_data.gsp
|
|
@@ -182,15 +182,22 @@ def find_valid_t0_times(
|
|
|
182
182
|
forecast_duration=minutes(gsp_config.forecast_minutes),
|
|
183
183
|
)
|
|
184
184
|
|
|
185
|
-
contiguous_time_periods
|
|
185
|
+
contiguous_time_periods['gsp'] = time_periods
|
|
186
|
+
|
|
187
|
+
# just get the values (no the keys)
|
|
188
|
+
contiguous_time_periods_values = list(contiguous_time_periods.values())
|
|
186
189
|
|
|
187
190
|
# Find joint overlapping contiguous time periods
|
|
188
|
-
if len(
|
|
191
|
+
if len(contiguous_time_periods_values) > 1:
|
|
189
192
|
valid_time_periods = intersection_of_multiple_dataframes_of_periods(
|
|
190
|
-
|
|
193
|
+
contiguous_time_periods_values
|
|
191
194
|
)
|
|
192
195
|
else:
|
|
193
|
-
valid_time_periods =
|
|
196
|
+
valid_time_periods = contiguous_time_periods_values[0]
|
|
197
|
+
|
|
198
|
+
# check there are some valid time periods
|
|
199
|
+
if len(valid_time_periods.keys()) == 0:
|
|
200
|
+
raise ValueError(f"No valid time periods found, {contiguous_time_periods=}")
|
|
194
201
|
|
|
195
202
|
# Fill out the contiguous time periods to get the t0 times
|
|
196
203
|
valid_t0_times = fill_time_periods(
|
|
@@ -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.12",
|
|
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.11 → ocf_data_sampler-0.0.12}/ocf_data_sampler/data/uk_gsp_locations.csv
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{ocf_data_sampler-0.0.11 → ocf_data_sampler-0.0.12}/ocf_data_sampler/load/nwp/providers/__init__.py
RENAMED
|
File without changes
|
{ocf_data_sampler-0.0.11 → ocf_data_sampler-0.0.12}/ocf_data_sampler/load/nwp/providers/ecmwf.py
RENAMED
|
File without changes
|
{ocf_data_sampler-0.0.11 → ocf_data_sampler-0.0.12}/ocf_data_sampler/load/nwp/providers/ukv.py
RENAMED
|
File without changes
|
{ocf_data_sampler-0.0.11 → ocf_data_sampler-0.0.12}/ocf_data_sampler/load/nwp/providers/utils.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{ocf_data_sampler-0.0.11 → ocf_data_sampler-0.0.12}/ocf_data_sampler/numpy_batch/__init__.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{ocf_data_sampler-0.0.11 → ocf_data_sampler-0.0.12}/ocf_data_sampler/numpy_batch/satellite.py
RENAMED
|
File without changes
|
{ocf_data_sampler-0.0.11 → ocf_data_sampler-0.0.12}/ocf_data_sampler/numpy_batch/sun_position.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{ocf_data_sampler-0.0.11 → ocf_data_sampler-0.0.12}/ocf_data_sampler/select/fill_time_periods.py
RENAMED
|
File without changes
|
|
File without changes
|
{ocf_data_sampler-0.0.11 → ocf_data_sampler-0.0.12}/ocf_data_sampler/select/select_spatial_slice.py
RENAMED
|
File without changes
|
{ocf_data_sampler-0.0.11 → ocf_data_sampler-0.0.12}/ocf_data_sampler/select/select_time_slice.py
RENAMED
|
File without changes
|
{ocf_data_sampler-0.0.11 → ocf_data_sampler-0.0.12}/ocf_data_sampler/torch_datasets/__init__.py
RENAMED
|
File without changes
|
|
File without changes
|
{ocf_data_sampler-0.0.11 → ocf_data_sampler-0.0.12}/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
|