1010__all__ = [
1111 'FHN' ,
1212 'FeedbackFHN' ,
13- 'MeanFieldQIF' ,
1413]
1514
1615
@@ -197,7 +196,6 @@ def __init__(self,
197196 tau : Parameter = 12.5 ,
198197 mu : Parameter = 1.6886 ,
199198 v0 : Parameter = - 1 ,
200- Vth : Parameter = 1.8 ,
201199 method : str = 'rk4' ,
202200 name : str = None ):
203201 super (FeedbackFHN , self ).__init__ (size = size , name = name )
@@ -209,23 +207,21 @@ def __init__(self,
209207 self .tau = tau
210208 self .mu = mu # feedback strength
211209 self .v0 = v0 # resting potential
212- self .Vth = Vth
213210
214211 # variables
215212 self .w = bm .Variable (bm .zeros (self .num ))
216213 self .V = bm .Variable (bm .zeros (self .num ))
217- self .Vdelay = bm .FixedLenDelay (self .num , self .delay )
214+ self .Vdelay = bm .TimeDelay (self .num , self .delay , interp_method = 'round' )
218215 self .input = bm .Variable (bm .zeros (self .num ))
219- self .spike = bm .Variable (bm .zeros (self .num , dtype = bool ))
220- self .t_last_spike = bm .Variable (bm .ones (self .num ) * - 1e7 )
221216
222217 # integral
223- self .integral = ddeint (method = method , f = self .derivative ,
218+ self .integral = ddeint (method = method ,
219+ f = self .derivative ,
224220 state_delays = {'V' : self .Vdelay })
225221
226- def dV (self , V , t , w , Vdelay ):
222+ def dV (self , V , t , w ):
227223 return (V - V * V * V / 3 - w + self .input +
228- self .mu * (Vdelay (t - self .delay ) - self .v0 ))
224+ self .mu * (self . Vdelay (t - self .delay ) - self .v0 ))
229225
230226 def dw (self , w , t , V ):
231227 return (V + self .a - self .b * w ) / self .tau
@@ -235,129 +231,7 @@ def derivative(self):
235231 return JointEq ([self .dV , self .dw ])
236232
237233 def update (self , _t , _dt ):
238- V , w = self .integral (self .V , self .w , _t , Vdelay = self .Vdelay , dt = _dt )
239- self .spike .value = bm .logical_and (V >= self .Vth , self .V < self .Vth )
240- self .t_last_spike .value = bm .where (self .spike , _t , self .t_last_spike )
234+ V , w = self .integral (self .V , self .w , _t , dt = _dt )
241235 self .V .value = V
242236 self .w .value = w
243237 self .input [:] = 0.
244-
245-
246- class MeanFieldQIF (NeuGroup ):
247- r"""A mean-field model of a quadratic integrate-and-fire neuron population.
248-
249- **Model Descriptions**
250-
251- The QIF population mean-field model, which has been derived from a
252- population of all-to-all coupled QIF neurons in [5]_.
253- The model equations are given by:
254-
255- .. math::
256-
257- \begin{aligned}
258- \tau \dot{r} &=\frac{\Delta}{\pi \tau}+2 r v \\
259- \tau \dot{v} &=v^{2}+\bar{\eta}+I(t)+J r \tau-(\pi r \tau)^{2}
260- \end{aligned}
261-
262- where :math:`r` is the average firing rate and :math:`v` is the
263- average membrane potential of the QIF population [5]_.
264-
265- This mean-field model is an exact representation of the macroscopic
266- firing rate and membrane potential dynamics of a spiking neural network
267- consisting of QIF neurons with Lorentzian distributed background
268- excitabilities. While the mean-field derivation is mathematically
269- only valid for all-to-all coupled populations of infinite size, it
270- has been shown that there is a close correspondence between the
271- mean-field model and neural populations with sparse coupling and
272- population sizes of a few thousand neurons [6]_.
273-
274- **Model Parameters**
275-
276- ============= ============== ======== ========================
277- **Parameter** **Init Value** **Unit** **Explanation**
278- ------------- -------------- -------- ------------------------
279- tau 1 ms the population time constant
280- eta -5. \ the mean of a Lorenzian distribution over the neural excitability in the population
281- delta 1.0 \ the half-width at half maximum of the Lorenzian distribution over the neural excitability
282- J 15 \ the strength of the recurrent coupling inside the population
283- ============= ============== ======== ========================
284-
285-
286- References
287- ----------
288- .. [5] E. Montbrió, D. Pazó, A. Roxin (2015) Macroscopic description for
289- networks of spiking neurons. Physical Review X, 5:021028,
290- https://doi.org/10.1103/PhysRevX.5.021028.
291- .. [6] R. Gast, H. Schmidt, T.R. Knösche (2020) A Mean-Field Description
292- of Bursting Dynamics in Spiking Neural Networks with Short-Term
293- Adaptation. Neural Computation 32.9 (2020): 1615-1634.
294-
295- """
296-
297- def __init__ (self ,
298- size : Shape ,
299- tau : Parameter = 1. ,
300- eta : Parameter = - 5.0 ,
301- delta : Parameter = 1.0 ,
302- J : Parameter = 15. ,
303- method : str = 'exp_auto' ,
304- name : str = None ):
305- super (MeanFieldQIF , self ).__init__ (size = size , name = name )
306-
307- # parameters
308- self .tau = tau #
309- self .eta = eta # the mean of a Lorenzian distribution over the neural excitability in the population
310- self .delta = delta # the half-width at half maximum of the Lorenzian distribution over the neural excitability
311- self .J = J # the strength of the recurrent coupling inside the population
312-
313- # variables
314- self .r = bm .Variable (bm .ones (1 ))
315- self .V = bm .Variable (bm .ones (1 ))
316- self .input = bm .Variable (bm .zeros (1 ))
317-
318- # functions
319- self .integral = odeint (self .derivative , method = method )
320-
321- def dr (self , r , t , v ):
322- return (self .delta / (bm .pi * self .tau ) + 2. * r * v ) / self .tau
323-
324- def dV (self , v , t , r ):
325- return (v ** 2 + self .eta + self .input + self .J * r * self .tau -
326- (bm .pi * r * self .tau ) ** 2 ) / self .tau
327-
328- @property
329- def derivative (self ):
330- return JointEq ([self .dV , self .dr ])
331-
332- def update (self , _t , _dt ):
333- self .V .value , self .r .value = self .integral (self .V , self .r , _t , _dt )
334- self .integral [:] = 0.
335-
336-
337-
338- class VanDerPolOscillator (NeuGroup ):
339- pass
340-
341-
342- class ThetaNeuron (NeuGroup ):
343- pass
344-
345-
346- class MeanFieldQIFWithSFA (NeuGroup ):
347- pass
348-
349-
350- class JansenRitModel (NeuGroup ):
351- pass
352-
353-
354- class WilsonCowanModel (NeuGroup ):
355- pass
356-
357- class StuartLandauOscillator (NeuGroup ):
358- pass
359-
360-
361- class KuramotoOscillator (NeuGroup ):
362- pass
363-
0 commit comments