Oscillating Rate for Poisson Inputs

The basics of how to develop, test, and use models.
Post Reply
blake

Oscillating Rate for Poisson Inputs

Post by blake »

Hi all,

I am creating a single cell model for looking at intracellular dynamics during network oscillations. I would like to mimic the network activity onto the cell with Poisson distributed inputs wherein the rates oscillate at a particular frequency. I have tried using NetStim inputs, and re-setting the interval at each time-step according to a sinewave function, e.g.:

Code: Select all

objref wave
wave = new Vector(numsteps)
wave.sin(freq,phase,dt)
wave.mul(amp)
wave.add(amp+baserate)
...
stm = new NetStim(0.5)
...
proc advance() {
  ...
  stm.interval = wave.x[t]
  ...
}
However, this did not work, my input was coming at consistent intervals. I suspect that this may be because the NetStim object is not picking new event times at each time-step, but chose all the times at the start... (yes/no?) I am probably going about this in a completely wrong manner, so any advice/suggestions would be greatly appreciated.

Thanks,

Blake
hines
Site Admin
Posts: 1711
Joined: Wed May 18, 2005 3:32 pm

Post by hines »

chose all the times at the start... (yes/no?)
No. NetStim uses the current value of interval and noise to calculate the next random interval. The problem is that if NetStim.interval changes the effect has to wait for the next interval so transient very large rates can be missed altogether.
When there are abrupt changes to the rates, it is easy to modify the distributed nrn/src/nrnoc/netstim.mod file to accept rate change events. i.e.:

Code: Select all

[hines@localhost tmp]$ diff ~/neuron/nrn/src/nrnoc/netstim.mod netstim1.mod
5c5
<   ARTIFICIAL_CELL NetStim
---
>   ARTIFICIAL_CELL NetStim1
30c30
<       on = -1 : tenatively off
---
>       on = -1 : tentatively off
127a128,132
>               }else if (w > 0 && on == 1) {
>                       : assume the interval has changed and recalculate
>                       : time of next event
>                       next_invl()
>                       net_move(t + event, 1)
[hines@localhost tmp]$
So the trick for continuous changes is to send the NetStim1 one of these events several times per cycle (every dt seems like overkill).
Post Reply