~ubuntu-branches/ubuntu/wily/brian/wily

« back to all changes in this revision

Viewing changes to examples/misc/leaky_if.py

  • Committer: Package Import Robot
  • Author(s): Yaroslav Halchenko
  • Date: 2014-07-30 11:29:44 UTC
  • mfrom: (6.1.2 experimental)
  • Revision ID: package-import@ubuntu.com-20140730112944-ln0ogbq0kpyyuz47
Tags: 1.4.1-2
* Forgotten upload to unstable
* debian/control
  - policy boost to 3.9.5
  - updated Vcs- fields given migration to anonscm.d.o and provided -b
    debian

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#!/usr/bin/env python
1
2
'''
2
3
A very simple example Brian script to show how to implement
3
4
a leaky integrate and fire model. In this example, we also
12
13
 
13
14
G = NeuronGroup(1, model='dV/dt = -(V-Vr)/tau : volt', threshold=Vt, reset=Vr)
14
15
 
15
 
spikes = linspace(10 * ms, 100 * ms, 25)
16
 
input = MultipleSpikeGeneratorGroup([spikes])
 
16
spikes = [(0, t*second) for t in linspace(10 * ms, 100 * ms, 25)]
 
17
input = SpikeGeneratorGroup(1, spikes)
17
18
 
18
19
C = Connection(input, G)
19
20
C[0, 0] = 5 * mV