Skip to content

v0.1.3 — Dead code cleanup, smarter .mat matrix selection

Choose a tag to compare

@emcramer emcramer released this 13 May 22:33
· 38 commits to main since this release

Highlights

Two follow-ups from the v0.1.2 reviewer feedback. No behavioral changes for the documented happy path.

Dead-code removal

  • TissueSection no longer carries an unused _rng instance variable nor the _select_cell_type_and_radius method. SpherePacker owns all random draws; the dead copies only confused readers.
  • The seed kwargs on TissueSection.__init__ and generate_cells are preserved (still threaded into SpherePacker); only the unused members were removed.

Smarter PhysiCell .mat cells-matrix selection

  • _select_cells_matrix still prefers a standard variable name (cells, cell, Cells) as the fast path with no warning.
  • The fallback heuristic for custom-named exports is now shape-aware: candidates are scored by their elongation ratio (max(shape) / min(shape)) with a plausibility boost when the smaller axis lies in the documented PhysiCell signal-count range [6, 250]. A UserWarning is emitted whenever the heuristic fires, and a ValueError is raised when the top two candidates score within 10% of each other.
  • The old size-based ambiguity check could reject perfectly good cells matrices in mixed-content .mat files; the new heuristic disambiguates them.

Validation

120/120 tests pass.