navis 1.4.0
  • Install
  • Quickstart
  • Tutorials
  • API
  • Changelog
  • Github
  • Ecosystem
  • Site
    • Page
        • navis.flow_centrality
          • flow_centrality()

    navis.flow_centrality¶

    navis.flow_centrality(x)[source]¶

    Calculate flow between leaf nodes.

    Parameters:
    • x (TreeNeuron | MeshNeuron | NeuronList) – Neuron(s) to calculate flow centrality for.

    • parallel (bool) – If True and input is NeuronList, use parallel processing. Requires pathos.

    • n_cores (int, optional) – Numbers of cores to use if parallel=True. Defaults to half the available cores.

    • progress (bool) – Whether to show a progress bar. Overruled by navis.set_pbars.

    • omit_failures (bool) – If True will omit failures instead of raising an exception. Ignored if input is single neuron.

    Returns:

    Adds “flow_centrality” as column in the node table (for TreeNeurons) or as .flow_centrality property (for MeshNeurons).

    Return type:

    neuron

    Examples

    >>> import navis
    >>> n = navis.example_neurons(2)
    >>> n.reroot(n.soma, inplace=True)
    >>> _ = navis.flow_centrality(n)
    >>> n[0].nodes.flow_centrality.max()
    91234
    

    See also

    synapse_flow_centrality()

    Synapse-based flow centrality.

    Back to top

    Source

    © Copyright 2018, Philipp Schlegel.
    Created using Sphinx 5.3.0.