pygrenade_vx.network.abstract.Neuron

class pygrenade_vx.network.abstract.Neuron

Bases: pygrenade_common.Population.Cell

__init__(*args, **kwargs)

Overloaded function.

  1. __init__(self: _pygrenade_vx_network_abstract.Neuron) -> None

  2. __init__(self: _pygrenade_vx_network_abstract.Neuron, arg0: _pygrenade_vx_network_abstract.Neuron) -> None

Methods

__init__(*args, **kwargs)

Overloaded function.

add_compartment(self, compartment)

Adds a compartment to the neuron.

add_compartment_connection(self, source, …)

Add a compartment connection to the neuron.

adjacent_compartments(self, arg0)

branch_compartments(self, compartment, …)

Return ordered list of compartments inside a branch or chain.

branch_size(self, compartment, …)

Return the number of compartments on a branch starting from the given compartment.

classify_neighbours(self, compartment, …)

Classify neighbours into parts of branches, chains or as a leaf.

clear(self)

Clear the neuron.

compartment_connections(self)

compartments(self)

compartments_connected(self)

Check if all compartments are connected.

contains(self, descriptor)

Check if neuron contains a compartment.

copy(self)

get(*args, **kwargs)

Overloaded function.

get_compartment_degree(self, descriptor)

Return number of connections on a compartment.

get_compartment_index_map(self)

Return a map of each compartment-descriptor to an index.

get_input_ports(self)

Get input ports of neuron.

get_max_degree_compartment(self)

Return compartment with largest degree.

get_output_ports(self)

Get output ports of neuron.

has_equal_morphology(self, other)

Check whether compartment assignment and connectivity is the same for the given neuron.

is_chain(self, compartment, marked_compartments)

Distinguishes chains from branches.

is_connected(self)

Check if neuron is fully connected

is_partitionable(self)

isomorphism(self, other)

Return mapping of compartments between this and other neuron.

move(self)

neighbour(self, source, target)

Check if two compartments are neighbours.

num_compartment_connections(self)

Return number of connections on the neuron.

num_compartments(self)

Return number of compartments on the neuron.

remove_compartment(self, descriptor)

Removes a compartment from the neuron.

remove_compartment_connection(self, descriptor)

Remove a connection from the neuron.

requires_time_domain(self)

set(*args, **kwargs)

Overloaded function.

source(self, descriptor)

Return source of the given connection.

target(self, descriptor)

Return target of the given connection.

valid(*args, **kwargs)

Overloaded function.

write_graphviz(self, filename, name)

Writes neuron topology in graphviz format.

class ParameterSpace

Bases: pygrenade_common.Population.Cell.ParameterSpace

CompartmentConnections

alias of _pygrenade_vx_network_abstract.Map_grenade_vx_network_abstract_CompartmentConnectionOnNeuron_grenade_vx_network_abstract_CompartmentConnection_ParameterSpace_

class Parameterization

Bases: pygrenade_common.Population.Cell.ParameterSpace.Parameterization

CompartmentConnections

alias of _pygrenade_vx_network_abstract.Map_grenade_vx_network_abstract_CompartmentConnectionOnNeuron_grenade_vx_network_abstract_CompartmentConnection_ParameterSpace_Parameterization_

property compartment_connections
property compartments
copy(self: _pygrenade_vx_network_abstract.Neuron.ParameterSpace.Parameterization)pygrenade_common.PortData
get_section(self: _pygrenade_vx_network_abstract.Neuron.ParameterSpace.Parameterization, sequence: pygrenade_common.MultiIndexSequence)pygrenade_common.Population.Cell.ParameterSpace.Parameterization
move(self: _pygrenade_vx_network_abstract.Neuron.ParameterSpace.Parameterization)pygrenade_common.PortData
size(self: _pygrenade_vx_network_abstract.Neuron.ParameterSpace.Parameterization)int
property compartment_connections
property compartments
copy(self: _pygrenade_vx_network_abstract.Neuron.ParameterSpace)pygrenade_common.Population.Cell.ParameterSpace
get_section(self: _pygrenade_vx_network_abstract.Neuron.ParameterSpace, sequence: pygrenade_common.MultiIndexSequence)pygrenade_common.Population.Cell.ParameterSpace
move(self: _pygrenade_vx_network_abstract.Neuron.ParameterSpace)pygrenade_common.Population.Cell.ParameterSpace
size(self: _pygrenade_vx_network_abstract.Neuron.ParameterSpace)int
valid(self: _pygrenade_vx_network_abstract.Neuron.ParameterSpace, input_port_on_cell: int, parameterization: pygrenade_common.Population.Cell.ParameterSpace.Parameterization)bool
class ParameterizationPortType

Bases: pygrenade_common.VertexPortType

copy(self: _pygrenade_vx_network_abstract.Neuron.ParameterizationPortType)pygrenade_common.VertexPortType
move(self: _pygrenade_vx_network_abstract.Neuron.ParameterizationPortType)pygrenade_common.VertexPortType
add_compartment(self: _pygrenade_vx_network_abstract.Neuron, compartment: _pygrenade_vx_network_abstract.Compartment)_pygrenade_vx_network_abstract.CompartmentOnNeuron

Adds a compartment to the neuron.

add_compartment_connection(self: _pygrenade_vx_network_abstract.Neuron, source: _pygrenade_vx_network_abstract.CompartmentOnNeuron, target: _pygrenade_vx_network_abstract.CompartmentOnNeuron, edge: _pygrenade_vx_network_abstract.CompartmentConnection)_pygrenade_vx_network_abstract.CompartmentConnectionOnNeuron

Add a compartment connection to the neuron.

adjacent_compartments(self: _pygrenade_vx_network_abstract.Neuron, arg0: _pygrenade_vx_network_abstract.CompartmentOnNeuron)list[_pygrenade_vx_network_abstract.CompartmentOnNeuron]
branch_compartments(self: _pygrenade_vx_network_abstract.Neuron, compartment: _pygrenade_vx_network_abstract.CompartmentOnNeuron, blacklist_compartment: _pygrenade_vx_network_abstract.CompartmentOnNeuron = CompartmentOnNeuron(0))list[_pygrenade_vx_network_abstract.CompartmentOnNeuron]

Return ordered list of compartments inside a branch or chain.

branch_size(self: _pygrenade_vx_network_abstract.Neuron, compartment: _pygrenade_vx_network_abstract.CompartmentOnNeuron, marked_compartments: set[_pygrenade_vx_network_abstract.CompartmentOnNeuron])int

Return the number of compartments on a branch starting from the given compartment.

classify_neighbours(self: _pygrenade_vx_network_abstract.Neuron, compartment: _pygrenade_vx_network_abstract.CompartmentOnNeuron, neighbours_whitelist: set[_pygrenade_vx_network_abstract.CompartmentOnNeuron] = set())grenade::vx::network::abstract::CompartmentNeighbours

Classify neighbours into parts of branches, chains or as a leaf.

clear(self: _pygrenade_vx_network_abstract.Neuron)None

Clear the neuron. Remove all compartments and connections.

compartment_connections(self: _pygrenade_vx_network_abstract.Neuron)boost::iterator_range<boost::iterators::transform_iterator<grenade::common::detail::DescriptorTransform<grenade::vx::network::abstract::CompartmentConnectionOnNeuron, boost::detail::edge_desc_impl<boost::undirected_tag, void*> >, boost::detail::undirected_edge_iter<std::_List_iterator<boost::list_edge<void*, boost::no_property> >, boost::detail::edge_desc_impl<boost::undirected_tag, void*>, long>, boost::use_default, boost::use_default> >
compartments(self: _pygrenade_vx_network_abstract.Neuron)list[pygrenade_common.CompartmentOnNeuron]
compartments_connected(self: _pygrenade_vx_network_abstract.Neuron)bool

Check if all compartments are connected.

contains(self: _pygrenade_vx_network_abstract.Neuron, descriptor: _pygrenade_vx_network_abstract.CompartmentOnNeuron)bool

Check if neuron contains a compartment.

copy(self: _pygrenade_vx_network_abstract.Neuron)pygrenade_common.Population.Cell
get(*args, **kwargs)

Overloaded function.

  1. get(self: _pygrenade_vx_network_abstract.Neuron, descriptor: _pygrenade_vx_network_abstract.CompartmentOnNeuron) -> _pygrenade_vx_network_abstract.Compartment

Get a compartment via its descriptor.

  1. get(self: _pygrenade_vx_network_abstract.Neuron, descriptor: _pygrenade_vx_network_abstract.CompartmentConnectionOnNeuron) -> _pygrenade_vx_network_abstract.CompartmentConnection

Get a compartment connection via its descriptor.

get_compartment_degree(self: _pygrenade_vx_network_abstract.Neuron, descriptor: _pygrenade_vx_network_abstract.CompartmentOnNeuron)int

Return number of connections on a compartment. Since the neuron has a undirected graph representation the ingoing and outgoing degree is equal.

get_compartment_index_map(self: _pygrenade_vx_network_abstract.Neuron)dict[int, int]

Return a map of each compartment-descriptor to an index.

get_input_ports(self: _pygrenade_vx_network_abstract.Neuron)list[pygrenade_common.Vertex.Port]

Get input ports of neuron. Ports are aggregated over compartments and input ports of the mechanisms on the compartments. If a port with equal properties (except channels) already exists, its channels are extended instead of creating a new port. To distinglish the different channels, they can be accessed with a three dimensional index of the form: (compartment_on_neuron, mechanism_on_compartment, mechanism_port_channels). The last port is the parameterization.

get_max_degree_compartment(self: _pygrenade_vx_network_abstract.Neuron)_pygrenade_vx_network_abstract.CompartmentOnNeuron

Return compartment with largest degree. Since the neuron has a undirected graph representation the ingoing and outgoing degree is equal.

get_output_ports(self: _pygrenade_vx_network_abstract.Neuron)list[pygrenade_common.Vertex.Port]

Get output ports of neuron. Ports are aggregated over compartments and output ports of the mechanisms on the compartments. If a port with equal properties (except channels) already exists, its channels are extended instead of creating a new port. To distinglish the different channels, they can be accessed with a three dimensional index of the form: (compartment_on_neuron, mechanism_on_compartment, mechanism_port_channels).

has_equal_morphology(self: _pygrenade_vx_network_abstract.Neuron, other: _pygrenade_vx_network_abstract.Neuron)bool

Check whether compartment assignment and connectivity is the same for the given neuron.

is_chain(self: _pygrenade_vx_network_abstract.Neuron, compartment: _pygrenade_vx_network_abstract.CompartmentOnNeuron, marked_compartments: set[_pygrenade_vx_network_abstract.CompartmentOnNeuron])bool

Distinguishes chains from branches.

is_connected(self: _pygrenade_vx_network_abstract.Neuron)bool

Check if neuron is fully connected

is_partitionable(self: _pygrenade_vx_network_abstract.Neuron)bool
isomorphism(self: _pygrenade_vx_network_abstract.Neuron, other: _pygrenade_vx_network_abstract.Neuron)dict[_pygrenade_vx_network_abstract.CompartmentOnNeuron, _pygrenade_vx_network_abstract.CompartmentOnNeuron]

Return mapping of compartments between this and other neuron. If no mapping between all the neurons compartments is possible an map with the possible compartment mappings is returned.

move(self: _pygrenade_vx_network_abstract.Neuron)pygrenade_common.Population.Cell
neighbour(self: _pygrenade_vx_network_abstract.Neuron, source: _pygrenade_vx_network_abstract.CompartmentOnNeuron, target: _pygrenade_vx_network_abstract.CompartmentOnNeuron)bool

Check if two compartments are neighbours.

num_compartment_connections(self: _pygrenade_vx_network_abstract.Neuron)int

Return number of connections on the neuron.

num_compartments(self: _pygrenade_vx_network_abstract.Neuron)int

Return number of compartments on the neuron.

remove_compartment(self: _pygrenade_vx_network_abstract.Neuron, descriptor: _pygrenade_vx_network_abstract.CompartmentOnNeuron)None

Removes a compartment from the neuron.

remove_compartment_connection(self: _pygrenade_vx_network_abstract.Neuron, descriptor: _pygrenade_vx_network_abstract.CompartmentConnectionOnNeuron)None

Remove a connection from the neuron.

requires_time_domain(self: _pygrenade_vx_network_abstract.Neuron)bool
set(*args, **kwargs)

Overloaded function.

  1. set(self: _pygrenade_vx_network_abstract.Neuron, descriptor: _pygrenade_vx_network_abstract.CompartmentOnNeuron, compartment: _pygrenade_vx_network_abstract.Compartment) -> None

Set a compartment via a descriptor.

  1. set(self: _pygrenade_vx_network_abstract.Neuron, descriptor: _pygrenade_vx_network_abstract.CompartmentConnectionOnNeuron, connection: _pygrenade_vx_network_abstract.CompartmentConnection) -> None

Set a compartment connection via a descriptor.

source(self: _pygrenade_vx_network_abstract.Neuron, descriptor: _pygrenade_vx_network_abstract.CompartmentConnectionOnNeuron)_pygrenade_vx_network_abstract.CompartmentOnNeuron

Return source of the given connection.

target(self: _pygrenade_vx_network_abstract.Neuron, descriptor: _pygrenade_vx_network_abstract.CompartmentConnectionOnNeuron)_pygrenade_vx_network_abstract.CompartmentOnNeuron

Return target of the given connection.

valid(*args, **kwargs)

Overloaded function.

  1. valid(self: _pygrenade_vx_network_abstract.Neuron, parameter_space: pygrenade_common.Population.Cell.ParameterSpace) -> bool

Check if the given paramter space is valid for the neuron. This checks if the parameter space for each compartment of the neuron is valid.

  1. valid(self: _pygrenade_vx_network_abstract.Neuron, input_port_on_cell: int, dynamics: pygrenade_common.Population.Cell.Dynamics) -> bool

  2. valid(self: _pygrenade_vx_network_abstract.Neuron, time_domain_runtimes: pygrenade_common.TimeDomainRuntimes) -> bool

write_graphviz(self: _pygrenade_vx_network_abstract.Neuron, filename: str, name: str)None

Writes neuron topology in graphviz format.