braincell.io.load_morpho

Contents

braincell.io.load_morpho#

braincell.io.load_morpho(path)[source]#

Load a Morpho from a braincell checkpoint file.

Parameters:

path (str | PathLike) – Path to a .bcm checkpoint produced by save_morpho().

Returns:

The reconstructed morphology, with the same branch names, parent_x/child_x attachments, and auto-naming counters as the saved tree.

Return type:

Morphology

Raises:
  • CheckpointError – If the file is missing, not a braincell checkpoint, corrupt, or is a branch checkpoint instead of a morphology checkpoint, or if the manifest references a non-existent or out-of-order parent.

  • CheckpointVersionError – If the checkpoint version is newer than this build supports.

See also

save_morpho

Inverse operation.

load_branch

Load a single branch.