-
Notifications
You must be signed in to change notification settings - Fork 166
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Consider splits and merges in tdating (#349)
* Ignore 0 in cell match Since 0 in labels means that no cell was identified in that pixel, we need to ignore 0 when matching. Otherwise we could have a situation where e.g the cell overlaps 0.55 with 0 and 0.45 with some cell and it would end up unmatched (`ID_coverage` would be 0 and a new track would be initialized) * Get required match overlap frac as parameter * Store information about splits If the advected cell overlaps > 10% with more than one cell at next timestep, consider the advected cell as a split cell. Store information of which IDs the cell split to. Also for cells at current timestep, mark cells that resulted from splits * Store information about merges If the cell at current timestep is overlapped > 10% by more than one advected cell, consider it merged and store IDs of previous cells. Also mark cells from previous timestep is they will merge at next timestep. * Add columns to cell dataframes * Make splits/merges output optional * Add options to specify fractions required for matching/splitting/merging * Update tests to account for split/merge output in tdating * Fix unused variables code check * Fix match_frac argument in tracking * Refactor to avoid chained assignment warnings in pandas * Add short example --------- Co-authored-by: Daniele Nerini <daniele.nerini@gmail.com>
- Loading branch information
Showing
5 changed files
with
321 additions
and
59 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.