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

    navis.NeuronList¶

    class navis.NeuronList(x, make_copy=False, make_using=None, parallel=False, n_cores=1, **kwargs)[source]¶

    Collection of neurons.

    Gives quick access to neurons’ attributes and functions.

    Parameters:
    • x (list | array | TreeNeuron | MeshNeuron | Dotprops | NeuronList) –

      Data to construct neuronlist from. Can be either:

      1. Tree/MeshNeuron(s) or Dotprops

      2. NeuronList(s)

      3. Anything that constructs a Tree/MeshNeuron

      4. List of the above

    • make_copy (bool, optional) – If True, Neurons are deepcopied before being assigned to the NeuronList.

    • make_using (function | class, optional) – Function or class used to construct neurons from elements in x if they aren’t already neurons. By default, will use navis.Neuron to try to infer what kind of neuron can be constructed.

    • parallel (bool) – If True, will use parallel threads when initialising the NeuronList. Should be slightly up to a lot faster depending on the numbers of cores and the input data.

    • n_cores (int) – Number of cores to use for when parallel=True. Defaults to half the available cores.

    • **kwargs – Will be passed to constructor of Tree/MeshNeuron (see make_using).

    __init__(x, make_copy=False, make_using=None, parallel=False, n_cores=1, **kwargs)[source]¶

    Methods

    __init__(x[, make_copy, make_using, ...])

    append(v)

    Add neuron(s) to this list.

    apply(func, *[, parallel, n_cores, ...])

    Apply function across all neurons in this NeuronList.

    copy(**kwargs)

    Return copy of this NeuronList.

    head([N])

    Return summary for top N neurons.

    itertuples()

    Helper to mimic pandas.DataFrame.itertuples().

    mean()

    Return mean numeric and boolean values over all neurons.

    memory_usage([deep, estimate, sample])

    Return estimated size in memory of this NeuronList.

    plot2d(**kwargs)

    Plot neuron in 2D using plot2d().

    plot3d(**kwargs)

    Plot neuron in 3D using plot3d().

    remove_duplicates([key, keep, inplace])

    Remove duplicate neurons from list.

    sample([N])

    Return random subset of neurons.

    set_neuron_attributes(x, name[, na])

    Set attributes of neurons contained in the NeuronList.

    sort_values(key[, ascending])

    Sort neurons by given key.

    sum()

    Return sum numeric and boolean values over all neurons.

    summary([N, add_props, progress])

    Get summary over all neurons in this NeuronList.

    tail([N])

    Return summary for bottom N neurons.

    unmix()

    Split into NeuronLists of the same neuron type.

    Attributes

    bbox

    Bounding box across all neurons in the list.

    empty

    Return True if NeuronList is empty.

    is_degenerated

    Return True if contains neurons with non-unique IDs.

    is_mixed

    Return True if contains more than one type of neuron.

    neurons

    Neurons contained in this NeuronList.

    shape

    Shape of NeuronList (N, ).

    types

    Return neuron types present in this list.

    cable_length

    soma

    root

    graph

    igraph

    Back to top

    Source

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