File: examples-frompapers_Touboul_Brette_2008.txt

package info (click to toggle)
brian 1.4.3-1
  • links: PTS, VCS
  • area: main
  • in suites: sid, stretch
  • size: 23,436 kB
  • sloc: python: 68,707; cpp: 29,040; ansic: 5,182; sh: 111; makefile: 61
file content (71 lines) | stat: -rw-r--r-- 1,738 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
.. currentmodule:: brian

.. index::
   pair: example usage; plot
   pair: example usage; run
   pair: example usage; figure
   pair: example usage; show
   pair: example usage; StateSpikeMonitor
   pair: example usage; xlabel
   pair: example usage; linspace
   pair: example usage; ylabel
   pair: example usage; NeuronGroup

.. _example-frompapers_Touboul_Brette_2008:

Example: Touboul_Brette_2008 (frompapers)
=========================================

Chaos in the AdEx model
-----------------------
Fig. 8B from:
Touboul, J. and Brette, R. (2008). Dynamics and bifurcations of the adaptive
exponential integrate-and-fire model. Biological Cybernetics 99(4-5):319-34.

This shows the bifurcation structure when the reset value is varied
(vertical axis shows the values of w at spike times for a given a reset value
Vr).

::

    from brian import *
    
    defaultclock.dt=0.01*ms
    
    C=281*pF
    gL=30*nS
    EL=-70.6*mV
    VT=-50.4*mV
    DeltaT=2*mV
    tauw=40*ms
    a=4*nS
    b=0.08*nA
    I=.8*nA
    Vcut=VT+5*DeltaT # practical threshold condition
    N=500
    
    eqs="""
    dvm/dt=(gL*(EL-vm)+gL*DeltaT*exp((vm-VT)/DeltaT)+I-w)/C : volt
    dw/dt=(a*(vm-EL)-w)/tauw : amp
    Vr:volt
    """
    
    neuron=NeuronGroup(N,model=eqs,threshold=Vcut,reset="vm=Vr;w+=b")
    neuron.vm=EL
    neuron.w=a*(neuron.vm-EL)
    neuron.Vr=linspace(-48.3*mV,-47.7*mV,N) # bifurcation parameter
    
    run(3*second,report='text') # we discard the first spikes
    
    M=StateSpikeMonitor(neuron,("Vr","w")) # record Vr and w at spike times
    run(2*second,report='text')
    
    Vr,w=M.values("Vr"),M.values("w")
    
    figure()
    plot(Vr/mV,w/nA,'.k')
    xlabel('Vr (mV)')
    ylabel('w (nA)')
    show()