ocf-data-sampler 0.0.18__tar.gz → 0.0.19__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 (39) hide show
  1. {ocf_data_sampler-0.0.18/ocf_data_sampler.egg-info → ocf_data_sampler-0.0.19}/PKG-INFO +1 -1
  2. {ocf_data_sampler-0.0.18 → ocf_data_sampler-0.0.19}/ocf_data_sampler/torch_datasets/pvnet_uk_regional.py +9 -3
  3. {ocf_data_sampler-0.0.18 → ocf_data_sampler-0.0.19/ocf_data_sampler.egg-info}/PKG-INFO +1 -1
  4. {ocf_data_sampler-0.0.18 → ocf_data_sampler-0.0.19}/setup.py +1 -1
  5. {ocf_data_sampler-0.0.18 → ocf_data_sampler-0.0.19}/LICENSE +0 -0
  6. {ocf_data_sampler-0.0.18 → ocf_data_sampler-0.0.19}/MANIFEST.in +0 -0
  7. {ocf_data_sampler-0.0.18 → ocf_data_sampler-0.0.19}/README.md +0 -0
  8. {ocf_data_sampler-0.0.18 → ocf_data_sampler-0.0.19}/ocf_data_sampler/__init__.py +0 -0
  9. {ocf_data_sampler-0.0.18 → ocf_data_sampler-0.0.19}/ocf_data_sampler/data/uk_gsp_locations.csv +0 -0
  10. {ocf_data_sampler-0.0.18 → ocf_data_sampler-0.0.19}/ocf_data_sampler/load/__init__.py +0 -0
  11. {ocf_data_sampler-0.0.18 → ocf_data_sampler-0.0.19}/ocf_data_sampler/load/gsp.py +0 -0
  12. {ocf_data_sampler-0.0.18 → ocf_data_sampler-0.0.19}/ocf_data_sampler/load/nwp/__init__.py +0 -0
  13. {ocf_data_sampler-0.0.18 → ocf_data_sampler-0.0.19}/ocf_data_sampler/load/nwp/nwp.py +0 -0
  14. {ocf_data_sampler-0.0.18 → ocf_data_sampler-0.0.19}/ocf_data_sampler/load/nwp/providers/__init__.py +0 -0
  15. {ocf_data_sampler-0.0.18 → ocf_data_sampler-0.0.19}/ocf_data_sampler/load/nwp/providers/ecmwf.py +0 -0
  16. {ocf_data_sampler-0.0.18 → ocf_data_sampler-0.0.19}/ocf_data_sampler/load/nwp/providers/ukv.py +0 -0
  17. {ocf_data_sampler-0.0.18 → ocf_data_sampler-0.0.19}/ocf_data_sampler/load/nwp/providers/utils.py +0 -0
  18. {ocf_data_sampler-0.0.18 → ocf_data_sampler-0.0.19}/ocf_data_sampler/load/satellite.py +0 -0
  19. {ocf_data_sampler-0.0.18 → ocf_data_sampler-0.0.19}/ocf_data_sampler/load/utils.py +0 -0
  20. {ocf_data_sampler-0.0.18 → ocf_data_sampler-0.0.19}/ocf_data_sampler/numpy_batch/__init__.py +0 -0
  21. {ocf_data_sampler-0.0.18 → ocf_data_sampler-0.0.19}/ocf_data_sampler/numpy_batch/gsp.py +0 -0
  22. {ocf_data_sampler-0.0.18 → ocf_data_sampler-0.0.19}/ocf_data_sampler/numpy_batch/nwp.py +0 -0
  23. {ocf_data_sampler-0.0.18 → ocf_data_sampler-0.0.19}/ocf_data_sampler/numpy_batch/satellite.py +0 -0
  24. {ocf_data_sampler-0.0.18 → ocf_data_sampler-0.0.19}/ocf_data_sampler/numpy_batch/sun_position.py +0 -0
  25. {ocf_data_sampler-0.0.18 → ocf_data_sampler-0.0.19}/ocf_data_sampler/select/__init__.py +0 -0
  26. {ocf_data_sampler-0.0.18 → ocf_data_sampler-0.0.19}/ocf_data_sampler/select/dropout.py +0 -0
  27. {ocf_data_sampler-0.0.18 → ocf_data_sampler-0.0.19}/ocf_data_sampler/select/fill_time_periods.py +0 -0
  28. {ocf_data_sampler-0.0.18 → ocf_data_sampler-0.0.19}/ocf_data_sampler/select/find_contiguous_time_periods.py +0 -0
  29. {ocf_data_sampler-0.0.18 → ocf_data_sampler-0.0.19}/ocf_data_sampler/select/select_spatial_slice.py +0 -0
  30. {ocf_data_sampler-0.0.18 → ocf_data_sampler-0.0.19}/ocf_data_sampler/select/select_time_slice.py +0 -0
  31. {ocf_data_sampler-0.0.18 → ocf_data_sampler-0.0.19}/ocf_data_sampler/torch_datasets/__init__.py +0 -0
  32. {ocf_data_sampler-0.0.18 → ocf_data_sampler-0.0.19}/ocf_data_sampler.egg-info/SOURCES.txt +0 -0
  33. {ocf_data_sampler-0.0.18 → ocf_data_sampler-0.0.19}/ocf_data_sampler.egg-info/dependency_links.txt +0 -0
  34. {ocf_data_sampler-0.0.18 → ocf_data_sampler-0.0.19}/ocf_data_sampler.egg-info/requires.txt +0 -0
  35. {ocf_data_sampler-0.0.18 → ocf_data_sampler-0.0.19}/ocf_data_sampler.egg-info/top_level.txt +0 -0
  36. {ocf_data_sampler-0.0.18 → ocf_data_sampler-0.0.19}/requirements.txt +0 -0
  37. {ocf_data_sampler-0.0.18 → ocf_data_sampler-0.0.19}/setup.cfg +0 -0
  38. {ocf_data_sampler-0.0.18 → ocf_data_sampler-0.0.19}/tests/__init__.py +0 -0
  39. {ocf_data_sampler-0.0.18 → ocf_data_sampler-0.0.19}/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.18
3
+ Version: 0.0.19
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
@@ -451,8 +451,12 @@ def compute(xarray_dict: dict) -> dict:
451
451
  return xarray_dict
452
452
 
453
453
 
454
- def get_gsp_locations() -> list[Location]:
454
+ def get_gsp_locations(gsp_ids: list[int] | None = None) -> list[Location]:
455
455
  """Get list of locations of all GSPs"""
456
+
457
+ if gsp_ids is None:
458
+ gsp_ids = [i for i in range(1, 318)]
459
+
456
460
  locations = []
457
461
 
458
462
  # Load UK GSP locations
@@ -461,7 +465,7 @@ def get_gsp_locations() -> list[Location]:
461
465
  index_col="gsp_id",
462
466
  )
463
467
 
464
- for gsp_id in np.arange(1, 318):
468
+ for gsp_id in gsp_ids:
465
469
  locations.append(
466
470
  Location(
467
471
  coordinate_system = "osgb",
@@ -480,6 +484,7 @@ class PVNetUKRegionalDataset(Dataset):
480
484
  config_filename: str,
481
485
  start_time: str | None = None,
482
486
  end_time: str| None = None,
487
+ gsp_ids: list[int] | None = None,
483
488
  ):
484
489
  """A torch Dataset for creating PVNet UK GSP samples
485
490
 
@@ -487,6 +492,7 @@ class PVNetUKRegionalDataset(Dataset):
487
492
  config_filename: Path to the configuration file
488
493
  start_time: Limit the init-times to be after this
489
494
  end_time: Limit the init-times to be before this
495
+ gsp_ids: List of GSP IDs to create samples for. Defaults to all
490
496
  """
491
497
 
492
498
  config = load_yaml_configuration(config_filename)
@@ -504,7 +510,7 @@ class PVNetUKRegionalDataset(Dataset):
504
510
  valid_t0_times = valid_t0_times[valid_t0_times<=pd.Timestamp(end_time)]
505
511
 
506
512
  # Construct list of locations to sample from
507
- locations = get_gsp_locations()
513
+ locations = get_gsp_locations(gsp_ids)
508
514
 
509
515
  # Construct a lookup for locations - useful for users to construct sample by GSP ID
510
516
  location_lookup = {loc.id: loc for loc in locations}
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: ocf_data_sampler
3
- Version: 0.0.18
3
+ Version: 0.0.19
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.18",
13
+ version="0.0.19",
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",