wsphillips / Conductor.jl

Choo-choo
MIT License
61 stars 12 forks source link

populations + getindex/iteration support #37

Closed wsphillips closed 2 years ago

wsphillips commented 2 years ago

Population allows creating arbitrary numbers of neurons from a prototype/template using the Base.Iterators interface.

This PR will also implement iteration and indexing on MultiCompartmentSystems (to index subcompartments versus calling by name with getproperty) and the same for NetworkTopology and NeuronalNetworkSystem.

wsphillips commented 2 years ago

Enables convenient syntax like:

for neuron in network, compartment in neuron
    # process each compartment of each neuron in a NeuronalNetworkSystem
end

# make a synapse between two neurons
topology[pre, post] = Glut(30nS)
# alternatively...
topology[pre => post] = Glut(30nS)

# mixed syntax...
network[2].soma # soma of the 2nd neuron in the network