v0.1.3 — Dead code cleanup, smarter .mat matrix selection
Highlights
Two follow-ups from the v0.1.2 reviewer feedback. No behavioral changes for the documented happy path.
Dead-code removal
TissueSectionno longer carries an unused_rnginstance variable nor the_select_cell_type_and_radiusmethod.SpherePackerowns all random draws; the dead copies only confused readers.- The
seedkwargs onTissueSection.__init__andgenerate_cellsare preserved (still threaded intoSpherePacker); only the unused members were removed.
Smarter PhysiCell .mat cells-matrix selection
_select_cells_matrixstill 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]. AUserWarningis emitted whenever the heuristic fires, and aValueErroris 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
.matfiles; the new heuristic disambiguates them.
Validation
120/120 tests pass.