Taken from Simple Networks for Spike-Timing-Based Computation, with Application to Olfactory Processing, Brody, Hopfield (2003)
http://dx.doi.org/10.1016/S0896-6273(03)00120-X
This network produces spike synchronization behavior in integrate-and-fire neurons in response to subthreshold oscillatory input and stochastic noise, exhibiting stochastic resonance. Synchronization is achieved through phase locking with an underlying subthreshold sinusoidal input in the absence of synaptic interactions between neurons in the network. This exhibits behavior similar to the "Mitral cells" described in the paper.
In [1]:
import sys
sys.path.append('/opt/lib/python2.7/site-packages/')
import numpy as np
import pylab
import nest
import nest.raster_plot
nest.ResetKernel()
Set up parallelization, for e.g. for an 8-core processor,
In [2]:
nest.SetKernelStatus({'local_num_threads': 8})
Population size we are going to simulate
In [3]:
total_population = 1000
In [4]:
simulation_time = 600.0
In [5]:
tau_m = 20.0
V_th = 20.0
E_L = 10.0
t_ref = 2.0
V_reset = 0.0
C_m = 200.0
V_m = 0.0
Set default values for the neuron type
In [6]:
nest.SetDefaults('iaf_psc_alpha', {
'tau_m': tau_m,
'V_th': V_th,
'E_L': E_L,
't_ref': t_ref,
'V_reset': V_reset,
'C_m': C_m,
'V_m': V_m
})
Bias current range
In [7]:
bias_low = 140.0
bias_high = 160.0
In [8]:
sine = nest.Create('ac_generator', 1, {'amplitude': 50.0, 'frequency': 35.0})
noise = nest.Create('noise_generator', 1, {'mean': 0.0, 'std': 200.0})
spike = nest.Create('spike_detector', 1, {'label': 'spikes'})
In [9]:
neurons = ()
for i in xrange(total_population):
neurons = neurons + nest.Create('iaf_psc_alpha', 1, {'I_e': bias_low + (i/total_population)*(bias_high-bias_low)})
In [10]:
nest.Connect(sine, neurons)
nest.Connect(noise, neurons)
nest.Connect(neurons, spike)
In [11]:
nest.Simulate(simulation_time)
In [12]:
nest.raster_plot.from_device(spike, hist=True)
pylab.show()
In [12]: