PointNeuronModel¶
- class dendrify.neuronmodel.PointNeuronModel(model='leakyIF', length=None, diameter=None, cm=None, gl=None, cm_abs=None, gl_abs=None, v_rest=None)[source]¶
Bases:
object
Like a
NeuronModel
but for point-neuron (single-compartment) models.- Parameters:
model (str, optional) – A keyword for accessing Dendrify’s library models. Custom models can also be provided but they should be in the same formattable structure as the library models. Available options:
'leakyIF'
(default),'adaptiveIF'
,'adex'
.length (Quantity, optional) – The point neuron’s length.
diameter (Quantity, optional) – The point neuron’s diameter.
cm (Quantity, optional) – Specific capacitance (usually μF / cm^2).
gl (Quantity, optional) – Specific leakage conductance (usually μS / cm^2).
cm_abs (Quantity, optional) – Absolute capacitance (usually pF).
gl_abs (Quantity, optional) – Absolute leakage conductance (usually nS).
v_rest (Quantity, optional) – Resting membrane voltage.
Methods:
Allows adding custom equations.
Allows specifying extra/custom parameters.
Create a NeuronGroup object with the specified number of neurons.
Adds a stochastic noise current.
Adds synaptic currents equations and parameters.
Attributes:
Returns a compartment's surface area (open cylinder) based on its length and diameter.
Returns a compartment's absolute capacitance.
Checks if a compartment has been flagged as dimensionless.
Returns all differential equations that describe a single compartment and the mechanisms that have been added to it.
A compartment's absolute leakage conductance.
Returns all the parameters that have been generated for a single compartment.
- add_equations(eqs)[source]¶
Allows adding custom equations.
- Parameters:
eqs (str) – A string of Brian-compatible equations.
- add_params(params_dict)[source]¶
Allows specifying extra/custom parameters.
- Parameters:
params_dict (dict) – A dictionary of parameters.
- property area¶
Returns a compartment’s surface area (open cylinder) based on its length and diameter.
- Return type:
- property dimensionless¶
Checks if a compartment has been flagged as dimensionless.
- Return type:
bool
- property equations¶
Returns all differential equations that describe a single compartment and the mechanisms that have been added to it.
- Return type:
str
- make_neurongroup(N, **kwargs)[source]¶
Create a NeuronGroup object with the specified number of neurons.
- Parameters:
N (int) – The number of neurons in the group.
**kwargs – Additional keyword arguments to be passed to the NeuronGroup constructor.
- Returns:
The created NeuronGroup object.
- Return type:
NeuronGroup
- noise(tau=20. * msecond, sigma=1. * pamp, mean=0. * amp)[source]¶
Adds a stochastic noise current. For more information see the Noise section: of Models and neuron groups
- property parameters¶
Returns all the parameters that have been generated for a single compartment.
- Return type:
dict
- synapse(channel, tag, g=None, t_rise=None, t_decay=None, scale_g=False)[source]¶
Adds synaptic currents equations and parameters. When only the decay time constant
t_decay
is provided, the synaptic model assumes an instantaneous rise of the synaptic conductance followed by an exponential decay. When both the riset_rise
and decayt_decay
constants are provided, synapses are modelled as a sum of two exponentials. For more information see: Modeling Synapses by Arnd Roth & Mark C. W. van Rossum- Parameters:
channel (str) – Synaptic channel type. Available options:
'AMPA'
,'NMDA'
,'GABA'
.tag (str) – A unique name to distinguish synapses of the same type.
g (
Quantity
) – Maximum synaptic conductancet_rise (
Quantity
) – Rise time constantt_decay (
Quantity
) – Decay time constantscale_g (bool, optional) – Option to add a normalization factor to scale the maximum conductance at 1 when synapses are modelled as a difference of exponentials (have both rise and decay kinetics), by default
False
.
Examples
>>> neuron = PointNeuronModel(...) >>> # adding an AMPA synapse with instant rise & exponential decay: >>> neuron.synapse('AMPA', tag='X', g=1*nS, t_decay=5*ms) >>> # same channel, different conductance & source: >>> neuron.synapse('AMPA', tag='Y', g=2*nS, t_decay=5*ms) >>> # different channel with both rise & decay kinetics: >>> neuron.synapse('NMDA', tag='X' g=1*nS, t_rise=5*ms, t_decay=50*ms)