File: examples-frompapers_Brette_Guigon_2003.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 (78 lines) | stat: -rw-r--r-- 1,968 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
72
73
74
75
76
77
78
.. currentmodule:: brian

.. index::
   pair: example usage; subplot
   pair: example usage; plot
   pair: example usage; run
   pair: example usage; show
   pair: example usage; raster_plot
   pair: example usage; linked_var
   pair: example usage; SpikeMonitor
   pair: example usage; linspace
   pair: example usage; NeuronGroup
   pair: example usage; StateMonitor

.. _example-frompapers_Brette_Guigon_2003:

Example: Brette_Guigon_2003 (frompapers)
========================================

Reliability of spike timing
---------------------------
Adapted from Fig. 10D,E of
Brette R and E Guigon (2003). Reliability of Spike Timing Is a General Property
of Spiking Model Neurons. Neural Computation 15, 279-308.

This shows that reliability of spike timing is a generic property of spiking
neurons, even those that are not leaky.
This is a non-physiological model which can be leaky or anti-leaky depending
on the sign of the input I.

All neurons receive the same fluctuating input, scaled by a parameter p that
varies across neurons. This shows:

1. reproducibility of spike timing
2. robustness with respect to deterministic changes (parameter)
3. increased reproducibility in the fluctuation-driven regime (input crosses
   the threshold)

::

    from brian import *
    
    N=500
    tau=33*ms
    taux=20*ms
    sigma=0.02
    
    eqs_input='''
    B=2./(1+exp(-2*x))-1 : 1
    dx/dt=-x/taux+(2/taux)**.5*xi : 1
    '''
    
    eqs='''
    dv/dt=(v*I+1)/tau + sigma*(2/tau)**.5*xi : 1
    I=0.5+3*p*B : 1
    B : 1
    p : 1
    '''
    
    input=NeuronGroup(1,eqs_input)
    neurons=NeuronGroup(N,eqs,threshold=1,reset=0)
    neurons.p=linspace(0,1,N)
    neurons.v=rand(N)
    neurons.B=linked_var(input,'B')
    
    M=StateMonitor(input,'B',record=0)
    S=SpikeMonitor(neurons)
    
    run(1000*ms)
    
    subplot(211) # The input
    plot(M.times/ms,M[0])
    subplot(212)
    raster_plot(S)
    plot([0,1000],[250,250],'r')
    show()