ocf-data-sampler 0.2.24__py3-none-any.whl → 0.2.28__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/select/select_spatial_slice.py +12 -1
- ocf_data_sampler/torch_datasets/datasets/site.py +3 -5
- {ocf_data_sampler-0.2.24.dist-info → ocf_data_sampler-0.2.28.dist-info}/METADATA +4 -3
- {ocf_data_sampler-0.2.24.dist-info → ocf_data_sampler-0.2.28.dist-info}/RECORD +6 -6
- {ocf_data_sampler-0.2.24.dist-info → ocf_data_sampler-0.2.28.dist-info}/WHEEL +0 -0
- {ocf_data_sampler-0.2.24.dist-info → ocf_data_sampler-0.2.28.dist-info}/top_level.txt +0 -0
|
@@ -239,8 +239,19 @@ def select_spatial_slice_pixels(
|
|
|
239
239
|
if allow_partial_slice:
|
|
240
240
|
da = _select_padded_slice(da, left_idx, right_idx, bottom_idx, top_idx, x_dim, y_dim)
|
|
241
241
|
else:
|
|
242
|
+
issues = []
|
|
243
|
+
if left_idx < 0:
|
|
244
|
+
issues.append(f"left_idx ({left_idx}) < 0")
|
|
245
|
+
if right_idx > data_width_pixels:
|
|
246
|
+
issues.append(f"right_idx ({right_idx}) > data_width_pixels ({data_width_pixels})")
|
|
247
|
+
if bottom_idx < 0:
|
|
248
|
+
issues.append(f"bottom_idx ({bottom_idx}) < 0")
|
|
249
|
+
if top_idx > data_height_pixels:
|
|
250
|
+
issues.append(f"top_idx ({top_idx}) > data_height_pixels ({data_height_pixels})")
|
|
251
|
+
issue_details = "\n".join(issues)
|
|
242
252
|
raise ValueError(
|
|
243
|
-
f"Window for location {location} not available. Padding required
|
|
253
|
+
f"Window for location {location} not available. Padding required due to: \n"
|
|
254
|
+
f"{issue_details}\n"
|
|
244
255
|
"You may wish to set `allow_partial_slice=True`",
|
|
245
256
|
)
|
|
246
257
|
else:
|
|
@@ -277,11 +277,9 @@ class SitesDataset(Dataset):
|
|
|
277
277
|
lat=combined_sample_dataset.site__latitude.values,
|
|
278
278
|
)
|
|
279
279
|
|
|
280
|
-
#
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
{solar_dim_name: solar_datetimes},
|
|
284
|
-
)
|
|
280
|
+
# Use existing dimension for solar positions
|
|
281
|
+
# TODO decouple this as a separate data varaible
|
|
282
|
+
solar_dim_name = "site__time_utc"
|
|
285
283
|
|
|
286
284
|
# Assign solar position values
|
|
287
285
|
for key, values in sun_position_features.items():
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: ocf-data-sampler
|
|
3
|
-
Version: 0.2.
|
|
3
|
+
Version: 0.2.28
|
|
4
4
|
Author: James Fulton, Peter Dudfield
|
|
5
5
|
Author-email: Open Climate Fix team <info@openclimatefix.org>
|
|
6
6
|
License: MIT License
|
|
@@ -48,7 +48,7 @@ Requires-Dist: h5netcdf
|
|
|
48
48
|
# ocf-data-sampler
|
|
49
49
|
|
|
50
50
|
<!-- ALL-CONTRIBUTORS-BADGE:START - Do not remove or modify this section -->
|
|
51
|
-
[](#contributors-)
|
|
52
52
|
<!-- ALL-CONTRIBUTORS-BADGE:END -->
|
|
53
53
|
|
|
54
54
|
[](https://github.com/openclimatefix/ocf-data-sampler/tags)
|
|
@@ -121,11 +121,12 @@ Thanks goes to these wonderful people ([emoji key](https://allcontributors.org/d
|
|
|
121
121
|
<td align="center" valign="top" width="14.28%"><a href="https://github.com/alirashidAR"><img src="https://avatars.githubusercontent.com/u/110668489?v=4?s=100" width="100px;" alt="Ali Rashid"/><br /><sub><b>Ali Rashid</b></sub></a><br /><a href="https://github.com/openclimatefix/ocf-data-sampler/commits?author=alirashidAR" title="Code">💻</a></td>
|
|
122
122
|
</tr>
|
|
123
123
|
<tr>
|
|
124
|
-
<td align="center" valign="top" width="14.28%"><a href="https://github.com/felix-e-h-p"><img src="https://avatars.githubusercontent.com/u/137530077?v=4?s=100" width="100px;" alt="Felix"/><br /><sub><b>Felix</b></sub></a><br /><a href="https://github.com/openclimatefix/ocf-data-sampler/commits?author=felix-e-h-p" title="Code">💻</a></td>
|
|
124
|
+
<td align="center" valign="top" width="14.28%"><a href="https://github.com/felix-e-h-p"><img src="https://avatars.githubusercontent.com/u/137530077?v=4?s=100" width="100px;" alt="Felix"/><br /><sub><b>Felix</b></sub></a><br /><a href="https://github.com/openclimatefix/ocf-data-sampler/commits?author=felix-e-h-p" title="Code">💻</a> <a href="https://github.com/openclimatefix/ocf-data-sampler/commits?author=felix-e-h-p" title="Tests">⚠️</a></td>
|
|
125
125
|
<td align="center" valign="top" width="14.28%"><a href="https://timothyajaniportfolio-b6v3zq29k-timthegreat.vercel.app/"><img src="https://avatars.githubusercontent.com/u/60073728?v=4?s=100" width="100px;" alt="Ajani Timothy"/><br /><sub><b>Ajani Timothy</b></sub></a><br /><a href="https://github.com/openclimatefix/ocf-data-sampler/commits?author=Tim1119" title="Code">💻</a></td>
|
|
126
126
|
<td align="center" valign="top" width="14.28%"><a href="https://rupeshmangalam.vercel.app/"><img src="https://avatars.githubusercontent.com/u/91172425?v=4?s=100" width="100px;" alt="Rupesh Mangalam"/><br /><sub><b>Rupesh Mangalam</b></sub></a><br /><a href="https://github.com/openclimatefix/ocf-data-sampler/commits?author=RupeshMangalam21" title="Code">💻</a></td>
|
|
127
127
|
<td align="center" valign="top" width="14.28%"><a href="http://siddharth7113.github.io"><img src="https://avatars.githubusercontent.com/u/114160268?v=4?s=100" width="100px;" alt="Siddharth"/><br /><sub><b>Siddharth</b></sub></a><br /><a href="https://github.com/openclimatefix/ocf-data-sampler/commits?author=siddharth7113" title="Code">💻</a></td>
|
|
128
128
|
<td align="center" valign="top" width="14.28%"><a href="https://github.com/Sachin-G13"><img src="https://avatars.githubusercontent.com/u/190184500?v=4?s=100" width="100px;" alt="Sachin-G13"/><br /><sub><b>Sachin-G13</b></sub></a><br /><a href="https://github.com/openclimatefix/ocf-data-sampler/commits?author=Sachin-G13" title="Code">💻</a></td>
|
|
129
|
+
<td align="center" valign="top" width="14.28%"><a href="https://drona-gyawali.github.io/"><img src="https://avatars.githubusercontent.com/u/170401554?v=4?s=100" width="100px;" alt="Dorna Raj Gyawali"/><br /><sub><b>Dorna Raj Gyawali</b></sub></a><br /><a href="https://github.com/openclimatefix/ocf-data-sampler/commits?author=drona-gyawali" title="Code">💻</a></td>
|
|
129
130
|
</tr>
|
|
130
131
|
</tbody>
|
|
131
132
|
</table>
|
|
@@ -36,11 +36,11 @@ ocf_data_sampler/select/fill_time_periods.py,sha256=TlGxp1xiAqnhdWfLy0pv3FuZc00d
|
|
|
36
36
|
ocf_data_sampler/select/find_contiguous_time_periods.py,sha256=8lkWsV5i7iLCVGqQ-PGZbvWxsz3wBvLO70GSf6WeR0k,11363
|
|
37
37
|
ocf_data_sampler/select/geospatial.py,sha256=CDExkl36eZOKmdJPzUr_K0Wn3axHqv5nYo-EkSiINcc,5032
|
|
38
38
|
ocf_data_sampler/select/location.py,sha256=AZvGR8y62opiW7zACGXjoOtBEWRfSLOZIA73O5Deu0c,1037
|
|
39
|
-
ocf_data_sampler/select/select_spatial_slice.py,sha256=
|
|
39
|
+
ocf_data_sampler/select/select_spatial_slice.py,sha256=Hd4jGRUfIZRoWCirOQZeoLpaUnStB6KyFSTPX69wZLw,8790
|
|
40
40
|
ocf_data_sampler/select/select_time_slice.py,sha256=HeHbwZ0CP03x0-LaJtpbSdtpLufwVTR73p6wH6O_PS8,5513
|
|
41
41
|
ocf_data_sampler/torch_datasets/datasets/__init__.py,sha256=jfJSFcR0eO1AqeH7S3KnGjsBqVZT5w3oyi784PUR6Q0,146
|
|
42
42
|
ocf_data_sampler/torch_datasets/datasets/pvnet_uk.py,sha256=cd4IyzYu8rMFgLHRXqYpnOIAZe4Yl21YdLmDQw45F7o,12545
|
|
43
|
-
ocf_data_sampler/torch_datasets/datasets/site.py,sha256=
|
|
43
|
+
ocf_data_sampler/torch_datasets/datasets/site.py,sha256=btzYgY0HtDT7bvPxLq6UuIGVqsq3icGDpB0O4WZH5gE,17563
|
|
44
44
|
ocf_data_sampler/torch_datasets/sample/__init__.py,sha256=GL84vdZl_SjHDGVyh9Uekx2XhPYuZ0dnO3l6f6KXnHI,100
|
|
45
45
|
ocf_data_sampler/torch_datasets/sample/base.py,sha256=cQ1oIyhdmlotejZK8B3Cw6MNvpdnBPD8G_o2h7Ye4Vc,2206
|
|
46
46
|
ocf_data_sampler/torch_datasets/sample/site.py,sha256=ZUEgn50g-GmqujOEtezNILF7wjokF80sDAA4OOldcRI,1268
|
|
@@ -55,7 +55,7 @@ ocf_data_sampler/torch_datasets/utils/validation_utils.py,sha256=YqmT-lExWlI8_ul
|
|
|
55
55
|
scripts/download_gsp_location_data.py,sha256=rRDXMoqX-RYY4jPdxhdlxJGhWdl6r245F5UARgKV6P4,3121
|
|
56
56
|
scripts/refactor_site.py,sha256=skzvsPP0Cn9yTKndzkilyNcGz4DZ88ctvCJ0XrBdc2A,3135
|
|
57
57
|
utils/compute_icon_mean_stddev.py,sha256=a1oWMRMnny39rV-dvu8rcx85sb4bXzPFrR1gkUr4Jpg,2296
|
|
58
|
-
ocf_data_sampler-0.2.
|
|
59
|
-
ocf_data_sampler-0.2.
|
|
60
|
-
ocf_data_sampler-0.2.
|
|
61
|
-
ocf_data_sampler-0.2.
|
|
58
|
+
ocf_data_sampler-0.2.28.dist-info/METADATA,sha256=AD-0CcsUo4yOV7PKK53uHl22RdFaP3uAht4c5sOJZFE,12069
|
|
59
|
+
ocf_data_sampler-0.2.28.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
|
60
|
+
ocf_data_sampler-0.2.28.dist-info/top_level.txt,sha256=LEFU4Uk-PEo72QGLAfnVZIUEm37Q8mKuMeg_Xk-p33g,31
|
|
61
|
+
ocf_data_sampler-0.2.28.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|