bluepysnap.morph

Morphology access.

Classes

MorphHelper(morph_dir, population[, ...])

Collection of morphology-related methods.

class bluepysnap.morph.MorphHelper(morph_dir, population, alternate_morphologies=None)

Collection of morphology-related methods.

Initializes a MorphHelper object from a directory path and a NodePopulation object.

Parameters:
  • morph_dir (str) – Path to the directory containing the node morphologies.

  • population (NodePopulation) – NodePopulation object used to query the nodes.

  • alternate_morphologies (dict) – Dictionary containing paths to alternate morphologies.

Returns:

A MorphHelper object.

Return type:

MorphHelper

get(node_id, transform=False, extension='swc')

Return MorphIO morphology object corresponding to node_id.

Parameters:
  • node_id (int/CircuitNodeId) – could be a single int or a CircuitNodeId.

  • transform (bool) – If transform is True, rotate and translate morphology points according to node_id position in the circuit.

  • extension (str) – expected filetype extension of the morph file.

get_filepath(node_id, extension='swc')

Return path to SWC morphology file corresponding to node_id.

Parameters:
  • node_id (int/CircuitNodeId) – could be a int or CircuitNodeId.

  • extension (str) – expected filetype extension of the morph file.

get_morphology_dir(extension)

Return morphology directory based on a given extension.