-
Notifications
You must be signed in to change notification settings - Fork 171
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Geogrid fix #340
Geogrid fix #340
Conversation
Codecov ReportAttention:
Additional details and impacted files@@ Coverage Diff @@
## master #340 +/- ##
==========================================
- Coverage 83.33% 83.32% -0.01%
==========================================
Files 161 161
Lines 12358 12356 -2
==========================================
- Hits 10298 10296 -2
Misses 2060 2060
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
hi @dbkhout thanks for the PR! Tests are failing for macos and windows, but it's probably unrelated from your changes. I'll have a closer look asap and will let you know |
@dbkhout could you please merge the latest version of pysteps/master in your branch? This should fix the errors in the CI pipelines |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looking good and all tests are green now (we can ignore the coverage in this case)! Thanks again for the nice fix :-)
You're welcome, thanks for the quick reaction! |
While only used for visualization, the
get_geogrid
andreproject_geodata
functions seem to be slightly off.The functions use
np.linspace
to retrieve the lower boundary for each pixel based on the number of pixels and the extent of the image (e.g.x1
,x2
). In doing so,x2
should be excluded from the interval as it represents the upper boundary of the image.Illustration:
np.linspace(3, 10, 7)
returns3., 4.16666667, 5.33333333, 6.5, 7.66666667, 8.83333333, 10.
while3., 4., 5., 6., 7., 8., 9.
is expected.np.linspace(3, 10, 7, endpoint=False)
does return the expected result.Note that this has been accounted for correctly (yet with different approaches) in other pysteps functions:
pysteps/pysteps/utils/dimension.py
Line 410 in 8dca14a
pysteps/pysteps/io/exporters.py
Line 336 in 8dca14a