Skip to content

Synapse Flow

Calculate synapse flow centrality for this neuron.

Please note that this implementation currently produces slightly different results than the implementation in navis. I'm not sure why that is but the differences seem to be negligible.

PARAMETER DESCRIPTION
node_ids
     Array of int32 node IDs.

TYPE: (N, ) array

parent_ids
     Array of parent IDs for each node. Root nodes' parents
     must be -1.

TYPE: (N, ) array

presynapses
     Array of number of presynapses associated with each node.

TYPE: (N, ) uint32 array

postsynapses
     Array of number of postsynapses associated with each node.

TYPE: (N, ) uint32 array

mode
     The mode to calculate the flow centrality. "centrifugal" will
     calculate the flow from the root to the leaves, "centripetal"
     will calculate the flow from the leaves to the root, and "sum"
     will calculate the sum of both.

TYPE: "centrifugal" | "centripetal" | "sum" DEFAULT: 'sum'

RETURNS DESCRIPTION
cc

Synapse flow centrality for each node.

TYPE: (N, ) uint32 array