===============
Standard models
===============

Standard models are neuron models that are available in at least two of the simulation engines supported by PyNN.
PyNN performs automatic translation of parameter names, types and units.
Only a handful of models are currently available, but the list will be expanded in future releases.
To obtain a list of all the standard models available in a given simulator, use the ``list_standard_models()`` function, e.g.:

.. code-block:: python

    >>> from pyNN import neuron
    >>> neuron.list_standard_models()
    ['IF_cond_alpha', 'IF_curr_exp', 'IF_cond_exp', 'EIF_cond_exp_isfa_ista',
     'SpikeSourceArray', 'HH_cond_exp', 'IF_cond_exp_gsfa_grr',
     'IF_facets_hardware1', 'SpikeSourcePoisson', 'EIF_cond_alpha_isfa_ista',
     'IF_curr_alpha']

Neurons
=======

IF_curr_alpha
-------------

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

Availability: NEST, NEURON, Brian

==============  =============  =====  ========================================
Name            Default value  Units  Description
==============  =============  =====  ========================================
``v_rest``      -65.0          mV     Resting membrane potential 
``cm``            1.0          nF     Capacity of the membrane
``tau_m``        20.0          ms     Membrane time constant
``tau_refrac``    0.1          ms     Duration of refractory period
``tau_syn_E``     0.5          ms     Rise time of the excitatory synaptic alpha function
``tau_syn_I``     0.5          ms     Rise time of the inhibitory synaptic alpha function
``i_offset``      0.0          nA     Offset current
``v_reset``     -65.0          mV     Reset potential after a spike
``v_thresh``    -50.0          mV     Spike threshold
==============  =============  =====  ========================================


IF_curr_exp
-----------

Leaky integrate and fire model with fixed threshold and decaying-exponential post-synaptic current.
(Separate synaptic currents for excitatory and inhibitory synapses.
    
Availability: NEST, NEURON, Brian
    
==============  =============  =====  =========================================
Name            Default value  Units  Description
==============  =============  =====  =========================================
``v_rest``      -65.0          mV     Resting membrane potential
``cm``            1.0          nF     Capacity of the membrane
``tau_m``        20.0          ms     Membrane time constant
``tau_refrac``    0.1          ms     Duration of refractory period
``tau_syn_E``     5.0          ms     Decay time of excitatory synaptic current
``tau_syn_I``     5.0          ms     Decay time of inhibitory synaptic current
``i_offset``      0.0          nA     Offset current
``v_reset``     -65.0          mV     Reset potential after a spike
``v_thresh``    -50.0          mV     Spike threshold
==============  =============  =====  =========================================


IF_cond_alpha
_____________

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

Availability: NEST, NEURON, Brian

==============  =============  =====  ===================================================
Name            Default value  Units  Description
==============  =============  =====  ===================================================
``v_rest``      -65.0          mV     Resting membrane potential 
``cm``            1.0          nF     Capacity of the membrane
``tau_m``        20.0          ms     Membrane time constant
``tau_refrac``    0.1          ms     Duration of refractory period
``tau_syn_E``     0.3          ms     Rise time of the excitatory synaptic alpha function
``tau_syn_I``     0.5          ms     Rise time of the inhibitory synaptic alpha function
``e_rev_E``       0.0          mV     Reversal potential for excitatory input
``e_rev_I``     -70.0          mV     Reversal potential for inhibitory input
``v_thresh``    -50.0          mV     Spike threshold
``v_reset``     -65.0          mV     Reset potential after a spike
``i_offset``      0.0          nA     Offset current
==============  =============  =====  ===================================================


IF_cond_exp
-----------

Leaky integrate and fire model with fixed threshold and decaying-exponential post-synaptic conductance.
    
Availability: NEST, NEURON, Brian
    
==============  =============  =====  ===================================================
Name            Default value  Units  Description
==============  =============  =====  =================================================== 
``v_rest``      -65.0          mV     Resting membrane potential
``cm``            1.0          nF     Capacity of the membrane
``tau_m``        20.0          ms     Membrane time constant
``tau_refrac``    0.1          ms     Duration of refractory period
``tau_syn_E``     5.0          ms     Decay time of the excitatory synaptic conductance
``tau_syn_I``     5.0          ms     Decay time of the inhibitory synaptic conductance
``e_rev_E``       0.0          mV     Reversal potential for excitatory input
``e_rev_I``     -70.0          mV     Reversal potential for inhibitory input
``v_thresh``    -50.0          mV     Spike threshold
``v_reset``     -65.0          mV     Reset potential after a spike
``i_offset``      0.0          nA     Offset current
==============  =============  =====  =================================================== 


HH_cond_exp
-----------

Single-compartment Hodgkin-Huxley-type neuron with transient sodium and delayed-rectifier potassium currents using the ion channel models from Traub.
    
Availability: NEST, NEURON, Brian

==============  =============  =====  ===================================================
Name            Default value  Units  Description
==============  =============  =====  =================================================== 
``gbar_Na``        20.0        uS
``gbar_K``          6.0        uS
``g_leak``         0.01        uS
``cm``              0.2        nF
``v_offset``      -63.0        mV
``e_rev_Na``       50.0        mV
``e_rev_K``       -90.0        mV
``e_rev_leak``    -65.0        mV
``e_rev_E``         0.0        mV
``e_rev_I``       -80.0        mV
``tau_syn_E``       0.2        ms
``tau_syn_I``       2.0        ms
``i_offset``        0.0        nA
==============  =============  =====  =================================================== 


EIF_cond_alpha_isfa_ista
------------------------

Adaptive exponential integrate and fire neuron 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

Availability: NEST, NEURON, Brian

==============  =============  =====  ===================================================
Name            Default value  Units  Description
==============  =============  =====  =================================================== 
``cm``            0.281        nF     Capacity of the membrane
``tau_refrac``    0.1          ms     Duration of refractory period
``v_spike``     -40.0          mV     Spike detection threshold
``v_reset``     -70.6          mV     Reset value for membrane potential after a spike
``v_rest``      -70.6          mV     Resting membrane potential (Leak reversal potential)
``tau_m``         9.3667       ms     Membrane time constant
``i_offset``      0.0          nA     Offset current
``a``             4.0          nS     Subthreshold adaptation conductance
``b``             0.0805       nA     Spike-triggered adaptation
``delta_T``       2.0          mV     Slope factor
``tau_w``       144.0          ms     Adaptation time constant
``v_thresh``    -50.4          mV     Spike initiation threshold 
``e_rev_E``       0.0          mV     Excitatory reversal potential
``tau_syn_E``     5.0          ms     Rise time of excitatory synaptic conductance (alpha function)
``e_rev_I``     -80.0          mV     Inhibitory reversal potential
``tau_syn_I``     5.0          ms     Rise time of the inhibitory synaptic conductance (alpha function)
==============  =============  =====  =================================================== 


Spike sources
=============

SpikeSourcePoisson
------------------

Spike source, generating spikes according to a Poisson process.

Availability: NEST, NEURON, Brian

============  =============  ======  ==========================
Name          Default value  Units   Description
============  =============  ======  ==========================
``rate``      0.0            s^`-1`  Mean spike frequency
``start``     0.0            ms      Start time
``duration``  10^9           ms      Duration of spike sequence
============  =============  ======  ==========================


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

Availability: NEST, NEURON, Brian

===============  =============  ======  ==========================
Name             Default value  Units   Description
===============  =============  ======  ==========================
``spike_times``  ``[]``         ms      list or numpy array containing spike times
===============  =============  ======  ==========================
