pysteps
pysteps copied to clipboard
Bug fix: ignore 0 in TDaTing cell match
This PR fixes a bug in the pysteps.tracking.tdating.match function. As far as I can tell, in this bug the label 0 was included in possible match IDs, even though 0 denotes pixels that are not part of any cell. So there could be cases, where the advected cell would have e.g. 55% of 0 and 45% of some cell and it would not be matched to that cell. So this fix will first check if the advected cell contains only 0-labeled pixels, it is initiated as a new track. If not, then 0 is removed from the possible ID labels and the matching is done as previously.
Codecov Report
All modified and coverable lines are covered by tests :white_check_mark:
Project coverage is 83.33%. Comparing base (
a471d49) to head (f84da89). Report is 1 commits behind head on master.
Additional details and impacted files
@@ Coverage Diff @@
## master #350 +/- ##
=======================================
Coverage 83.32% 83.33%
=======================================
Files 161 161
Lines 12363 12368 +5
=======================================
+ Hits 10302 10307 +5
Misses 2061 2061
| Flag | Coverage Δ | |
|---|---|---|
| unit_tests | 83.33% <100.00%> (+<0.01%) |
:arrow_up: |
Flags with carried forward coverage won't be shown. Click here to find out more.
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
sorry for taking so long, I think we can merge this bugfix if @feldmann-m has no objections to this?