MaxCVLen#

class braincell.MaxCVLen(max_cv_len, keep_odd=True)[source]#

Split branches so each CV stays below a target physical length.

The policy computes the number of CVs independently for each branch from its real path length and then splits the branch uniformly in normalized branch coordinates.

resolve_cv_bounds(morpho, *, paint_rules=None)[source]#

Return branch-wise CV bounds constrained by physical length.

Parameters:
  • morpho (Morphology) – Morphology being discretized.

  • paint_rules (tuple[PaintRule, ...] | None) – Unused for this policy.

Returns:

Branch-wise normalized intervals whose physical lengths do not exceed max_cv_len up to tolerance.

Return type:

tuple[tuple[tuple[float, float], ...], ...]