ocf-data-sampler 0.0.18__py3-none-any.whl → 0.0.19__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.
- ocf_data_sampler/torch_datasets/pvnet_uk_regional.py +9 -3
- {ocf_data_sampler-0.0.18.dist-info → ocf_data_sampler-0.0.19.dist-info}/METADATA +1 -1
- {ocf_data_sampler-0.0.18.dist-info → ocf_data_sampler-0.0.19.dist-info}/RECORD +6 -6
- {ocf_data_sampler-0.0.18.dist-info → ocf_data_sampler-0.0.19.dist-info}/WHEEL +1 -1
- {ocf_data_sampler-0.0.18.dist-info → ocf_data_sampler-0.0.19.dist-info}/LICENSE +0 -0
- {ocf_data_sampler-0.0.18.dist-info → ocf_data_sampler-0.0.19.dist-info}/top_level.txt +0 -0
|
@@ -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
|
|
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}
|
|
@@ -22,11 +22,11 @@ ocf_data_sampler/select/find_contiguous_time_periods.py,sha256=6ioB8LeFpFNBMgKDx
|
|
|
22
22
|
ocf_data_sampler/select/select_spatial_slice.py,sha256=7BSzOFPMSBWpBWXSajWTfI8luUVsSgh4zN-rkr-AuUs,11470
|
|
23
23
|
ocf_data_sampler/select/select_time_slice.py,sha256=41cch1fQr59fZgv7UHsNGc3OvoynrixT3bmr3_1d7cU,6628
|
|
24
24
|
ocf_data_sampler/torch_datasets/__init__.py,sha256=AbpHGcgLb-kRsJGnwFEktk7uzpZOCcBY74-YBdrKVGs,1
|
|
25
|
-
ocf_data_sampler/torch_datasets/pvnet_uk_regional.py,sha256=
|
|
25
|
+
ocf_data_sampler/torch_datasets/pvnet_uk_regional.py,sha256=NGrq5e6NOX8npz_45io7gVlx6eYfI-AW0rxcQjSOBQE,19167
|
|
26
26
|
tests/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
27
27
|
tests/conftest.py,sha256=OcArgF60paroZQqoP7xExRBF34nEyMuXd7dS7hD6p3w,5393
|
|
28
|
-
ocf_data_sampler-0.0.
|
|
29
|
-
ocf_data_sampler-0.0.
|
|
30
|
-
ocf_data_sampler-0.0.
|
|
31
|
-
ocf_data_sampler-0.0.
|
|
32
|
-
ocf_data_sampler-0.0.
|
|
28
|
+
ocf_data_sampler-0.0.19.dist-info/LICENSE,sha256=F-Q3UFCR-BECSocV55BFDpn4YKxve9PKrm-lTt6o_Tg,1073
|
|
29
|
+
ocf_data_sampler-0.0.19.dist-info/METADATA,sha256=rmnF4WJbPaLoeBFmJ-ZWgwY4FpoxcND8ZvQHMrnv8b8,801
|
|
30
|
+
ocf_data_sampler-0.0.19.dist-info/WHEEL,sha256=GV9aMThwP_4oNCtvEC2ec3qUYutgWeAzklro_0m4WJQ,91
|
|
31
|
+
ocf_data_sampler-0.0.19.dist-info/top_level.txt,sha256=KaQn5qzkJGJP6hKWqsVAc9t0cMLjVvSTk8-kTrW79SA,23
|
|
32
|
+
ocf_data_sampler-0.0.19.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|