teili.models.builder.templates package

Submodules

teili.models.builder.templates.neuron_templates module

This file contains dictionaries of neuron equations or modules, combined by the neuron equation builder. Each template consists of a dictionary containing the relevant equations and a corresponding parameter dictionary.

For usage example plaese refer to teili/models/neuron_models.py

Contributing guide: * Dictionary describing the neuron model

  • Describing the model dynamics, including all used variables and their units.

  • Required keys in the dictionary: ‘model’, ‘threshold’, ‘reset’.

  • name: modelname_template

  • Corresponding dictionary containing default/init parameters.
    • name: modelname_template_params

TBA: How to add dictionaries to Model dictionaries (see bottom)

teili.models.builder.templates.neuron_templates.none_params = {}

LIF neuron model with stochastic decay taken from Wang et al. (2018). Please refer to this paper for more information. Note that this model was conceptualized in discrete time with backward euler scheme and an integer operation. An state updader with x_new = f(x,t) and defaultclock.dt = 1*ms in the code using this model.

teili.models.builder.templates.neuron_templates.v_noise = {'model': '\n        %Inoise = xi*Anoise*(second**0.5) : amp\n\n        Anoise : amp (constant)\n        ', 'reset': ' ', 'threshold': ''}

Adds spatial location to neuron locate at the soma. This additional information is not set by default.

teili.models.builder.templates.neuron_templates.v_quad_current = {'model': '\n        %Iexp = k*(Vm - VR)*(Vm - VT) : amp\n        %tauIadapt = 1.0/a            : second  # adaptation time constant\n        %gAdapt = b                   : siemens # adaptation decay parameter\n        %wIadapt = d                  : amp     # adaptation weight\n        %EL = VR                      : volt\n\n        VT      : volt                (constant)        # V integration threshold\n        Vpeak   : volt                (constant)        # V spike threshold\n        VR      : volt                (constant)        # V rest\n        k       : siemens * volt **-1 (constant)        # slope factor\n        a       : second **-1         (constant)        # recovery time constant\n        b       : siemens             (constant)        # 1/Rin\n        c       : volt                (constant)        # potential reset value\n        d       : amp                 (constant)        # outward minus inward currents\n                                                        # activated during the spike\n                                                        # and affecting the after-spike\n                                                        # behavior\n        %Vthr = Vpeak : volt\n        %Vres = VR : volt\n        ', 'reset': '\n        %Vm = c;\n        Iadapt += wIadapt;\n        ', 'threshold': ''}

Paramters for the quadratic model taken from Nicola & Clopath 2017. Please refer to this paper for more information. The parameter k represents k = 1/Rin in the original study.

teili.models.builder.templates.synapse_templates module

This file contains dictionaries of synapse equations or modules, combined by the synapse equation builder. Each template consists of a dictionary containing the relevant equations and a corresponding parameter dictionary.

For usage example plaese refer to teili/models/synapse_models.py

Contributing guide: * Dictionary describing the synapse model

  • Describing the model dynamics, including all used variables and their units.

  • Required keys in the dictionary: ‘model’, ‘on_pre’, ‘on_post’.

  • name: modelname_template

  • Corresponding dictionary containing default/init parameters.
    • name: modelname_template_params

If you want to override an equation add ‘%’ before the variable of your block’s explicit equation.

Example: Let’s say we have the simplest model (current one with template equation), and you’re implementing a new block with this explicit equation : d{synvar_e}/dt = (-{synvar_e})**2 / synvar_e. If you want to override the equation already declared in the template: d{synvar_e}/dt = (-{synvar_e}) / tausyne + kernel_e, your equation will be : %d{synvar_e}/dt = (-{synvar_e})**2 / synvar_e

teili.models.builder.templates.synapse_templates.conductance = {'model': '\n        dgI/dt = (-gI) / tausyn + kernel     : siemens (clock-driven)\n        I_syn = gI*(EI - Vm_post)            : amp\n        Iin{input_number}_post = I_syn *  sign(weight)  : amp (summed)\n\n        EI =  EIe                            : volt        # reversal potential\n        kernel                               : siemens * second **-1\n        tausyn                               : second   (constant) # synapse time constant\n        w_plast                              : 1\n        baseweight                           : siemens (constant)     # synaptic gain\n        weight                               : 1\n        EIe                                  : volt\n        EIi                                  : volt\n        ', 'on_post': ' ', 'on_pre': '\n        gI += baseweight * abs(weight) * w_plast\n        '}

Standard parameters for conductance based models TODO: For inhibitory synapse EIe is negative. Could this thus be a problem?

teili.models.builder.templates.synapse_templates.deterministic_counter_params = {'re_init_counter': 0}

Dictionary of keywords:

These dictionaries contains keyword and models and parameters names useful for the __init__ subroutine Every new block dictionaries must be added to these definitions. synaptic_equations is a dictionary that gathers all models and parameters.

teili.models.builder.templates.synapse_templates.dpi_shunt_params = {'Csyn': 1.5 * pfarad, 'I_syn': 0.5 * pamp, 'I_tau': 10. * pamp, 'I_th': 10. * pamp, 'Io_syn': 0.5 * pamp, 'Ut_syn': 25. * mvolt, 'baseweight': 50. * pamp, 'kn_syn': 0.75, 'kp_syn': 0.66, 'weight': 1}

Exponentially decaying synapse model using quantized stochastic decay taken from Wang et al. (2018). Please refer to this paper for more information. Note that this model was conceptualized in discrete time with backward euler scheme and an integer operation. An state updader with x_new = f(x,t) and defaultclock.dt = 1*ms in the code using this model is necessary.

teili.models.builder.templates.synapse_templates.quantized_stochastic_params = {'gain_syn': 1. * mamp, 'tausyn': 3. * msecond, 'w_plast': 1, 'weight': 1}

Plasticity blocks You need to declare two set of parameters for every block: * current based models * conductance based models

teili.models.builder.templates.synapse_templates.quantized_stochastic_stdp_params = {'A_gain': 4, 'A_max': 15, 'dApre': 15, 'rand_num_bits_Apost': 6, 'rand_num_bits_Apre': 6, 'stdp_thres': 2, 'taupost': 3. * msecond, 'taupre': 3. * msecond, 'w_max': 15, 'w_plast': 1}

Kernels Blocks: You need to declare two set of parameters for every block: * current based models * conductance based models

teili.models.builder.templates.synapse_templates.stdgm_params = {'Ipred_plast': '0.0', 'Q_diffAPrePost': '1.05', 'dApre': '0.01', 'gain_max': '1.0', 'scaling_factor': '0.1', 'taupost': '5 * msecond', 'taupre': '5 * msecond'}

The set of activation encapsulates StateVariables which are needed for Activity Dependent Plasticity (ADP) paradigm. ADP adjusts the inhibitory weight according to the ‘activity’ of the post-synaptic neuron. These equations are required by synapses projecting to _adp neuronal populations.

teili.models.builder.templates.synapse_templates.unit_less = {'model': '\n         ', 'on_post': '\n         ', 'on_pre': '\n         '}

Structural plasticity blocks: You need to declare two set of parameters for every block: * current based models * conductance based models

These blocks add a counter that keep track of weight updates so that we can measure how active a synapse is. Note that stochastic structural plasticity should only be used in conjunction with synaptic plasticity and Teili’s run_regularly functions.

Module contents