ncells
gets same value for all features in one timestep
#246
Labels
bug
Code that is failing or producing the wrong result
High Priority
This issue needs immediate fixing, and may warrant a hotfix release
Milestone
Thanks to @laurapaccini who posted in #245 that
ncells
in the feature output from the segmentation do not always correspond to the number of grid cells associated with the feature in the segmentation mask.Eventually, I found the problem in the segmentation code, where we iterate over the different features in one time step, but assign only the value of
ncells
of the last feature to all features :tobac/tobac/segmentation.py
Lines 267 to 275 in 09b176b
I double-checked this behavior in our example notebooks, which all show only one unique value of
ncells
per timestep, although there are multiple features detected in each timestep.This bug will be relatively easy to fix but should be done asap and preferably with a test making sure that this does not happen again.
Since we are about to release
v1.5
maybe it suffices to include this inv1.5
? But I leave it to @w-k-jones and @freemansw1 to judge if another hotfix is needed.The text was updated successfully, but these errors were encountered: