Page 1 of 1

Rate modulated netstim

Posted: Wed May 27, 2009 8:08 am
by Raj
I want to create a netstim like mechanism but with a time modulated rate.

The easiest ways coming to my mind to implement this are
  • to play a vector into a parameter of the mechanism
  • or alternatively to play the vector into an auxilary variable and then making this variable available to the mechanism via a pointer.
I want to do this in a setting in which many netstims operate independently but using the same (shared) modulated rate.

Are there a priori reasons to expect one of these alternatives to be faster then the other especially in the case we use variable timestep?

Re: Rate modulated netstim

Posted: Fri May 29, 2009 11:33 am
by hines
many netstims operate independently but using the same (shared) modulated rate
If the rate is a function of time, each netstim NET_RECEIVE block can compute the rate when needed but if the
aggregate number of netstim events is greater than 1 per timestep then it makes sense to compute the function on
a per time step basis. Again, if the rate is an explicit function of time then I'd use a POINT_PROCESS which
evaluates the function in an INITIAL and AFTER SOLVE block and then connect to the netstim with a POINTER
in the netstim.

The whole thing is threadsafe if you have one instance of the POINT_PROCESS per thread and
are careful to connect each netstim POINTER in a thread to the POINT_PROCESS function value in that thread.
Oops. I see I have no provision for assigning an ARTIFICIAL_CELL to a thread or determining which thread it is in.
So the work around would be to use POINT_PROCESS for the netstim and create acell_home[] section for each thread
and put the netstim and function evaluator on those. See:
http://www.neuron.yale.edu/neuron/stati ... #partition
http://www.neuron.yale.edu/neuron/stati ... _in_thread