bsb.morphologies.parsers package#

Module contents#

bsb.morphologies.parsers.parse_morphology_content(content: str | bytes, parser='bsb', **kwargs)[source]#
bsb.morphologies.parsers.parse_morphology_file(file: str | PathLike, parser='bsb', **kwargs)[source]#
class bsb.morphologies.parsers.parser.BsbParser(*args, _parent=None, _key=None, **kwargs)[source]#

Bases: MorphologyParser

get_node_name()#
parse(file: FileDependency | str)[source]#

Parse the morphology

parse_content(content: str)[source]#
skip_boundary_labels: list[str]#

A set of labels that is used to create gaps in a morphology at certain boundaries. No point will be inferred between a child branch of a branch labelled with the given labels; usually used to skip points between the soma and its child branches.

tags: dict[str | list[str]]#

Dictionary mapping SWC tags to sets of morphology labels.

class bsb.morphologies.parsers.parser.MorphIOParser(*args, _parent=None, _key=None, **kwargs)[source]#

Bases: MorphologyParser

flags#
get_node_name()#
parse(file: FileDependency | str) Morphology[source]#

Parse the morphology

class bsb.morphologies.parsers.parser.MorphologyParser(*args, _parent=None, _key=None, **kwargs)[source]#

Bases: object

branch_cls: type#

Base implementation of all the different configuration attributes. Call the factory function attr() instead.

cls: type#

Base implementation of all the different configuration attributes. Call the factory function attr() instead.

get_node_name()#
abstract parse(file: FileDependency | str) Morphology[source]#

Parse the morphology

parser#

Base implementation of all the different configuration attributes. Call the factory function attr() instead.