openclimatefix / ocf_datapipes

OCF's DataPipe based dataloader for training and inference
MIT License
13 stars 11 forks source link

Allow partial windows #263

Closed dfulu closed 9 months ago

dfulu commented 9 months ago

Pull Request

Description

When spatial points we want to predict for lie towards the edge of our training dataset it can limit the size of the window we can use. This then means we can't benefit from bigger windows for the points which are far from the edges. This pull request adds functionality to select_spatial_slice_pixels to optionally infill NaNs where a bigger window size crosses the edge of the input data.

Also adds tests

Also improve logging in NaN fill function

Checklist:

codecov[bot] commented 9 months ago

Codecov Report

Attention: 11 lines in your changes are missing coverage. Please review.

Comparison is base (e86aabf) 77.51% compared to head (80f6e01) 77.48%. Report is 24 commits behind head on main.

Files Patch % Lines
ocf_datapipes/select/select_spatial_slice.py 80.00% 11 Missing :warning:
Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #263 +/- ## ========================================== - Coverage 77.51% 77.48% -0.03% ========================================== Files 118 118 Lines 5364 5406 +42 ========================================== + Hits 4158 4189 +31 - Misses 1206 1217 +11 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.