Neuron models

PyNN provides a library of neuron models that have been standardized so as to give the same results (within certain limits of numerical accuracy) on different backends. Each model is represented by a “cell type” class.

It is also possible to use simulator-specific neuron models, which we call “native” cell types. Of course, such models will only work with one specific backend simulator.

Note

the development version has some support for specifying cell types using the NineML and NeuroML formats, but this is not yet available in the current release.

Standard cell types

Base class

All standard cell types inherit from the following base class, and have the same methods, as listed below.

class StandardCellType(**parameters)[source]

Bases: pyNN.standardmodels.StandardModelType, pyNN.models.BaseCellType

Base class for standardized cell model classes.

get_schema()

Returns the model schema: i.e. a mapping of parameter names to allowed parameter types.

classmethod get_parameter_names()

Return the names of the parameters of this model.

get_native_names(*names)

Return a list of native parameter names for a given model.

classmethod has_parameter(name)

Does this model have a parameter with the given name?

translate(parameters, copy=True)

Translate standardized model parameters to simulator-specific parameters.

reverse_translate(native_parameters)

Translate simulator-specific model parameters to standardized parameters.

simple_parameters()

Return a list of parameters for which there is a one-to-one correspondance between standard and native parameter values.

scaled_parameters()

Return a list of parameters for which there is a unit change between standard and native parameter values.

computed_parameters()

Return a list of parameters whose values must be computed from more than one other parameter.

describe(template='modeltype_default.txt', engine='default')

Returns a human-readable description of the cell or synapse type.

The output may be customized by specifying a different template togther with an associated template engine (see pyNN.descriptions).

If template is None, then a dictionary containing the template context will be returned.

Simple integrate-and-fire neurons

class IF_cond_exp(**parameters)[source]

Bases: pyNN.standardmodels.StandardCellType

Leaky integrate and fire model with fixed threshold and exponentially-decaying post-synaptic conductance.

injectable = True
conductance_based = True
default_parameters = {'cm': 1.0, 'e_rev_E': 0.0, 'e_rev_I': -70.0, 'i_offset': 0.0, 'tau_m': 20.0, 'tau_refrac': 0.1, 'tau_syn_E': 5.0, 'tau_syn_I': 5.0, 'v_reset': -65.0, 'v_rest': -65.0, 'v_thresh': -50.0}
recordable = ['spikes', 'v', 'gsyn_exc', 'gsyn_inh']
default_initial_values = {'gsyn_exc': 0.0, 'gsyn_inh': 0.0, 'v': -65.0}
units = {'cm': 'nF', 'e_rev_E': 'mV', 'e_rev_I': 'mV', 'gsyn_exc': 'uS', 'gsyn_inh': 'uS', 'i_offset': 'nA', 'tau_m': 'ms', 'tau_refrac': 'ms', 'tau_syn_E': 'ms', 'tau_syn_I': 'ms', 'v': 'mV', 'v_reset': 'mV', 'v_rest': 'mV', 'v_thresh': 'mV'}
class IF_cond_alpha(**parameters)[source]

Bases: pyNN.standardmodels.StandardCellType

Leaky integrate and fire model with fixed threshold and alpha-function- shaped post-synaptic conductance.

injectable = True
conductance_based = True
default_parameters = {'cm': 1.0, 'e_rev_E': 0.0, 'e_rev_I': -70.0, 'i_offset': 0.0, 'tau_m': 20.0, 'tau_refrac': 0.1, 'tau_syn_E': 0.3, 'tau_syn_I': 0.5, 'v_reset': -65.0, 'v_rest': -65.0, 'v_thresh': -50.0}
recordable = ['spikes', 'v', 'gsyn_exc', 'gsyn_inh']
default_initial_values = {'gsyn_exc': 0.0, 'gsyn_inh': 0.0, 'v': -65.0}
units = {'cm': 'nF', 'e_rev_E': 'mV', 'e_rev_I': 'mV', 'gsyn_exc': 'uS', 'gsyn_inh': 'uS', 'i_offset': 'nA', 'tau_m': 'ms', 'tau_refrac': 'ms', 'tau_syn_E': 'ms', 'tau_syn_I': 'ms', 'v': 'mV', 'v_reset': 'mV', 'v_rest': 'mV', 'v_thresh': 'mV'}
class IF_curr_exp(**parameters)[source]

Bases: pyNN.standardmodels.StandardCellType

Leaky integrate and fire model with fixed threshold and decaying-exponential post-synaptic current. (Separate synaptic currents for excitatory and inhibitory synapses.

injectable = True
conductance_based = False
default_parameters = {'cm': 1.0, 'i_offset': 0.0, 'tau_m': 20.0, 'tau_refrac': 0.1, 'tau_syn_E': 5.0, 'tau_syn_I': 5.0, 'v_reset': -65.0, 'v_rest': -65.0, 'v_thresh': -50.0}
recordable = ['spikes', 'v']
conductance_based = False
default_initial_values = {'isyn_exc': 0.0, 'isyn_inh': 0.0, 'v': -65.0}
units = {'cm': 'nF', 'i_offset': 'nA', 'isyn_exc': 'nA', 'isyn_inh': 'nA', 'tau_m': 'ms', 'tau_refrac': 'ms', 'tau_syn_E': 'ms', 'tau_syn_I': 'ms', 'v': 'mV', 'v_reset': 'mV', 'v_rest': 'mV', 'v_thresh': 'mV'}
class IF_curr_alpha(**parameters)[source]

Bases: pyNN.standardmodels.StandardCellType

Leaky integrate and fire model with fixed threshold and alpha-function- shaped post-synaptic current.

injectable = True
conductance_based = False
default_parameters = {'cm': 1.0, 'i_offset': 0.0, 'tau_m': 20.0, 'tau_refrac': 0.1, 'tau_syn_E': 0.5, 'tau_syn_I': 0.5, 'v_reset': -65.0, 'v_rest': -65.0, 'v_thresh': -50.0}
recordable = ['spikes', 'v']
conductance_based = False
default_initial_values = {'isyn_exc': 0.0, 'isyn_inh': 0.0, 'v': -65.0}
units = {'cm': 'nF', 'i_offset': 'nA', 'isyn_exc': 'nA', 'isyn_inh': 'nA', 'tau_m': 'ms', 'tau_refrac': 'ms', 'tau_syn_E': 'ms', 'tau_syn_I': 'ms', 'v': 'mV', 'v_reset': 'mV', 'v_rest': 'mV', 'v_thresh': 'mV'}

Integrate-and-fire neurons with adaptation

class Izhikevich(**parameters)[source]

Bases: pyNN.standardmodels.StandardCellType

Izhikevich spiking model with a quadratic non-linearity according to:

  1. Izhikevich (2003), IEEE transactions on neural networks, 14(6)

    dv/dt = 0.04*v^2 + 5*v + 140 - u + I du/dt = a*(b*v - u)

Synapses are modeled as Dirac delta currents (voltage step), as in the original model

NOTE: name should probably be changed to match standard nomenclature, e.g. QIF_cond_delta_etc_etc, although keeping “Izhikevich” as an alias would be good

injectable = True
conductance_based = False
default_parameters = {'a': 0.02, 'b': 0.2, 'c': -65.0, 'd': 2.0, 'i_offset': 0.0}
recordable = ['spikes', 'v', 'u']
conductance_based = False
voltage_based_synapses = True
default_initial_values = {'u': -14.0, 'v': -70.0}
units = {'a': '/ms', 'b': '/ms', 'c': 'mV', 'd': 'mV/ms', 'i_offset': 'nA', 'u': 'mV/ms', 'v': 'mV'}
class EIF_cond_exp_isfa_ista(**parameters)[source]

Bases: pyNN.standardmodels.StandardCellType

Exponential integrate and fire neuron with spike triggered and sub-threshold adaptation currents (isfa, ista reps.) according to:

Brette R and Gerstner W (2005) Adaptive Exponential Integrate-and-Fire Model as an Effective Description of Neuronal Activity. J Neurophysiol 94:3637-3642

See also: IF_cond_exp_gsfa_grr, EIF_cond_alpha_isfa_ista

injectable = True
conductance_based = True
default_parameters = {'a': 4.0, 'b': 0.0805, 'cm': 0.281, 'delta_T': 2.0, 'e_rev_E': 0.0, 'e_rev_I': -80.0, 'i_offset': 0.0, 'tau_m': 9.3667, 'tau_refrac': 0.1, 'tau_syn_E': 5.0, 'tau_syn_I': 5.0, 'tau_w': 144.0, 'v_reset': -70.6, 'v_rest': -70.6, 'v_spike': -40.0, 'v_thresh': -50.4}
recordable = ['spikes', 'v', 'w', 'gsyn_exc', 'gsyn_inh']
default_initial_values = {'gsyn_exc': 0.0, 'gsyn_inh': 0.0, 'v': -70.6, 'w': 0.0}
units = {'a': 'nS', 'b': 'nA', 'cm': 'nF', 'delta_T': 'mV', 'e_rev_E': 'mV', 'e_rev_I': 'mV', 'gsyn_exc': 'uS', 'gsyn_inh': 'uS', 'i_offset': 'nA', 'tau_m': 'ms', 'tau_refrac': 'ms', 'tau_syn_E': 'ms', 'tau_syn_I': 'ms', 'tau_w': 'ms', 'v': 'mV', 'v_reset': 'mV', 'v_rest': 'mV', 'v_spike': 'mV', 'v_thresh': 'mV', 'w': 'nA'}
class EIF_cond_alpha_isfa_ista(**parameters)[source]

Bases: pyNN.standardmodels.StandardCellType

Exponential integrate and fire neuron with spike triggered and sub-threshold adaptation currents (isfa, ista reps.) according to:

Brette R and Gerstner W (2005) Adaptive Exponential Integrate-and-Fire Model as an Effective Description of Neuronal Activity. J Neurophysiol 94:3637-3642

See also: IF_cond_exp_gsfa_grr, EIF_cond_exp_isfa_ista

injectable = True
conductance_based = True
default_parameters = {'a': 4.0, 'b': 0.0805, 'cm': 0.281, 'delta_T': 2.0, 'e_rev_E': 0.0, 'e_rev_I': -80.0, 'i_offset': 0.0, 'tau_m': 9.3667, 'tau_refrac': 0.1, 'tau_syn_E': 5.0, 'tau_syn_I': 5.0, 'tau_w': 144.0, 'v_reset': -70.6, 'v_rest': -70.6, 'v_spike': -40.0, 'v_thresh': -50.4}
recordable = ['spikes', 'v', 'w', 'gsyn_exc', 'gsyn_inh']
default_initial_values = {'gsyn_exc': 0.0, 'gsyn_inh': 0.0, 'v': -70.6, 'w': 0.0}
units = {'a': 'nS', 'b': 'nA', 'cm': 'nF', 'delta_T': 'mV', 'e_rev_E': 'mV', 'e_rev_I': 'mV', 'gsyn_exc': 'uS', 'gsyn_inh': 'uS', 'i_offset': 'nA', 'tau_m': 'ms', 'tau_refrac': 'ms', 'tau_syn_E': 'ms', 'tau_syn_I': 'ms', 'tau_w': 'ms', 'v': 'mV', 'v_reset': 'mV', 'v_rest': 'mV', 'v_spike': 'mV', 'v_thresh': 'mV', 'w': 'nA'}
class IF_cond_exp_gsfa_grr(**parameters)[source]

Bases: pyNN.standardmodels.StandardCellType

Linear leaky integrate and fire model with fixed threshold, decaying-exponential post-synaptic conductance, conductance based spike-frequency adaptation, and a conductance-based relative refractory mechanism.

See: Muller et al (2007) Spike-frequency adapting neural ensembles: Beyond mean-adaptation and renewal theories. Neural Computation 19: 2958-3010.

See also: EIF_cond_alpha_isfa_ista

injectable = True
conductance_based = True
default_parameters = {'cm': 1.0, 'e_rev_E': 0.0, 'e_rev_I': -70.0, 'e_rev_rr': -75.0, 'e_rev_sfa': -75.0, 'i_offset': 0.0, 'q_rr': 3000.0, 'q_sfa': 15.0, 'tau_m': 20.0, 'tau_refrac': 0.1, 'tau_rr': 2.0, 'tau_sfa': 100.0, 'tau_syn_E': 5.0, 'tau_syn_I': 5.0, 'v_reset': -65.0, 'v_rest': -65.0, 'v_thresh': -50.0}
recordable = ['spikes', 'v', 'g_r', 'g_s', 'gsyn_exc', 'gsyn_inh']
default_initial_values = {'g_r': 0.0, 'g_s': 0.0, 'gsyn_exc': 0.0, 'gsyn_inh': 0.0, 'v': -65.0}
units = {'cm': 'nF', 'e_rev_E': 'mV', 'e_rev_I': 'mV', 'e_rev_rr': 'mV', 'e_rev_sfa': 'mV', 'g_r': 'nS', 'g_s': 'nS', 'gsyn_exc': 'uS', 'gsyn_inh': 'uS', 'i_offset': 'nA', 'q_rr': 'nS', 'q_sfa': 'nS', 'tau_m': 'ms', 'tau_refrac': 'ms', 'tau_rr': 'ms', 'tau_sfa': 'ms', 'tau_syn_E': 'ms', 'tau_syn_I': 'ms', 'v': 'mV', 'v_reset': 'mV', 'v_rest': 'mV', 'v_thresh': 'mV'}

Spike sources

class SpikeSourcePoisson(**parameters)[source]

Bases: pyNN.standardmodels.StandardCellType

Spike source, generating spikes according to a Poisson process.

injectable = False
conductance_based = True
default_parameters = {'duration': 10000000000.0, 'rate': 1.0, 'start': 0.0}
recordable = ['spikes']
injectable = False
receptor_types = ()
units = {'duration': 'ms', 'rate': 'Hz', 'start': 'ms'}
class SpikeSourceArray(**parameters)[source]

Bases: pyNN.standardmodels.StandardCellType

Spike source generating spikes at the times given in the spike_times array.

injectable = False
conductance_based = True
default_parameters = {'spike_times': Sequence([])}
recordable = ['spikes']
injectable = False
receptor_types = ()
units = {'spike_times': 'ms'}
class SpikeSourceInhGamma(**parameters)[source]

Bases: pyNN.standardmodels.StandardCellType

Spike source, generating realizations of an inhomogeneous gamma process, employing the thinning method.

See: Muller et al (2007) Spike-frequency adapting neural ensembles: Beyond mean-adaptation and renewal theories. Neural Computation 19: 2958-3010.

injectable = False
conductance_based = True
default_parameters = {'a': Sequence([1.]), 'b': Sequence([1.]), 'duration': 10000000000.0, 'start': 0.0, 'tbins': Sequence([0.])}
recordable = ['spikes']
injectable = False
receptor_types = ()
units = {'a': 'dimensionless', 'b': 's', 'duration': 'ms', 'start': 'ms', 'tbins': 'ms'}

Native cell types

Todo

WRITE THIS PART

Utility functions

list_standard_models()[source]

Return a list of all the StandardCellType classes available for this simulator.