SpatialNeuron class¶
(Shortest import: from brian2 import SpatialNeuron)
-
class
brian2.spatialneuron.spatialneuron.
SpatialNeuron
(morphology=None, model=None, threshold=None, refractory=False, reset=None, events=None, threshold_location=None, dt=None, clock=None, order=0, Cm=0.009 * metre ** -4 * kilogram ** -1 * second ** 4 * amp ** 2, Ri=1.5 * metre ** 3 * kilogram * second ** -3 * amp ** -2, name='spatialneuron*', dtype=None, namespace=None, method=('linear', 'exponential_euler', 'rk2', 'heun'))[source]¶ Bases:
brian2.groups.neurongroup.NeuronGroup
A single neuron with a morphology and possibly many compartments.
Parameters: morphology :
Morphology
The morphology of the neuron.
model : (str,
Equations
)The equations defining the group.
method : (str, function), optional
The numerical integration method. Either a string with the name of a registered method (e.g. “euler”) or a function that receives an
Equations
object and returns the corresponding abstract code. If no method is specified, a suitable method will be chosen automatically.threshold : str, optional
The condition which produces spikes. Should be a single line boolean expression.
threshold_location : (int,
Morphology
), optionalCompartment where the threshold condition applies, specified as an integer (compartment index) or a
Morphology
object corresponding to the compartment (e.g.morpho.axon[10*um]
). If unspecified, the threshold condition applies at all compartments.Cm :
Quantity
, optionalSpecific capacitance in uF/cm**2 (default 0.9). It can be accessed and modified later as a state variable. In particular, its value can differ in different compartments.
Ri :
Quantity
, optionalIntracellular resistivity in ohm.cm (default 150). It can be accessed as a shared state variable, but modified only before the first run. It is uniform across the neuron.
reset : str, optional
The (possibly multi-line) string with the code to execute on reset.
events : dict, optional
User-defined events in addition to the “spike” event defined by the
threshold
. Has to be a mapping of strings (the event name) to strings (the condition) that will be checked.refractory : {str,
Quantity
}, optionalEither the length of the refractory period (e.g.
2*ms
), a string expression that evaluates to the length of the refractory period after each spike (e.g.'(1 + rand())*ms'
), or a string expression evaluating to a boolean value, given the condition under which the neuron stays refractory after a spike (e.g.'v > -20*mV'
)namespace : dict, optional
A dictionary mapping variable/function names to the respective objects. If no
namespace
is given, the “implicit” namespace, consisting of the local and global namespace surrounding the creation of the class, is used.dtype : (
dtype
,dict
), optionalThe
numpy.dtype
that will be used to store the values, or a dictionary specifying the type for variable names. If a value is not provided for a variable (or no value is provided at all), the preference setting core.default_float_dtype is used.dt :
Quantity
, optionalThe time step to be used for the simulation. Cannot be combined with the
clock
argument.clock :
Clock
, optionalThe update clock to be used. If neither a clock, nor the
dt
argument is specified, thedefaultclock
will be used.order : int, optional
The priority of of this group for operations occurring at the same time step and in the same scheduling slot. Defaults to 0.
name : str, optional
A unique name for the group, otherwise use
spatialneuron_0
, etc.Attributes
user_equations
The original equations as specified by the user (i.e. Methods
spatialneuron_attribute
(neuron, name)Selects a subtree from SpatialNeuron
neuron and returns aSpatialSubgroup
.spatialneuron_segment
(neuron, item)Selects a segment from SpatialNeuron
neuron, where item is a slice of either compartment indexes or distances.Details
-
user_equations
¶ The original equations as specified by the user (i.e. before inserting point-currents into the membrane equation, before adding all the internally used variables and constants, etc.).
-
static
spatialneuron_attribute
(neuron, name)[source]¶ Selects a subtree from
SpatialNeuron
neuron and returns aSpatialSubgroup
. If it does not exist, returns theGroup
attribute.
-
static
spatialneuron_segment
(neuron, item)[source]¶ Selects a segment from
SpatialNeuron
neuron, where item is a slice of either compartment indexes or distances. Note a: segment is not aSpatialNeuron
, only aGroup
.
-
Tutorials and examples using this¶
- Example frompapers/Brette_2012/Fig1
- Example frompapers/Brette_2012/Fig5A
- Example frompapers/Brette_2012/Fig4
- Example frompapers/Brette_2012/Fig3CF
- Example frompapers/Brette_2012/Fig3AB
- Example compartmental/hodgkin_huxley_1952
- Example compartmental/spike_initiation
- Example compartmental/bipolar_with_inputs
- Example compartmental/rall
- Example compartmental/cylinder
- Example compartmental/infinite_cable
- Example compartmental/bipolar_cell
- Example compartmental/morphotest
- Example compartmental/bipolar_with_inputs2
- Example compartmental/lfp
- Example compartmental/hh_with_spikes