-
Notifications
You must be signed in to change notification settings - Fork 169
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
Add option to smooth radar mask #379
Conversation
…o remove hard edge from blending with NWP
…n of another parameter called 'create_smooth_radar_mask'. The actual implimentation of the code can be found in the blending utils
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #379 +/- ##
==========================================
+ Coverage 83.52% 83.67% +0.15%
==========================================
Files 159 159
Lines 12575 12649 +74
==========================================
+ Hits 10503 10584 +81
+ Misses 2072 2065 -7
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
@RubenImhoff suggested to add some figures of the effect of the smooth mask on the final product. Below I attach a figure with 3 version: one without a smooth edge (current product), one with a smooth edge with a maximum range of 50 px (=50km) and one with a max range of 80km. |
…an blended mask. Fixed by aplying the smooth mask to the lagrangian blended reference nowcast (R_pm_blended)
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! I have few more minor comments. Some simple testing and then I think this I will be ready to go!
I think we're almost there - I'm working on adding some extra tests. :) |
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.
I think all issues have been solved now and we have sufficient test coverage. We can merge this PR now. Nice contribution! :)
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.
Well done!
Solution for #377
Addition done by adding a cv2 based method in blending.utils.py called compute_smooth_dilated_mask(...).
This function can be used in the blending.steps.forecast by changing the create_smooth_radar_mask parameter to True, standard this is put to False to not create conflicts with existing code.