Random play()
Posted: Fri Feb 09, 2007 1:44 pm
First, a question about this example on the play-Random command:
I'm sorry but I can not see why it works, being the result of r.poisson always an integer!! In fact, I see the IClamp.amp value almost all the simulation as 0!!
Second: I changed the previous code using r.normal(0,0.01) instead, and it works fine. Then, I tried to make it as a density mechanism in order to forget about the size of the compartment where it is inserted. I did a .mod file simply consisting on
And then in the hoc file I wrote (after inserting the curr mechanism)
but it doesn't work! Even if there only this mechanism (or together with a passive leak) no noise is seen. Of course I incremented the gain value up to 1, and nothing. In the Distributed Mechanism Viewer, under Assigned, I can see the value of i_curr and it moves randomly according to the amp and gain values, but in the voltage trace there is no noise at all. What am I doing wrong?
Regards.
Code: Select all
// run the single script
// use the PointProcessManager to select IClamp
// set dur of IClamp[0] to 100
// open a new Voltage Graph
objref r
r = new Random()
r.poisson(.01)
r.play(&IClamp[0].amp)
//open a RunControl
// press Init&Run several times
Second: I changed the previous code using r.normal(0,0.01) instead, and it works fine. Then, I tried to make it as a density mechanism in order to forget about the size of the compartment where it is inserted. I did a .mod file simply consisting on
Code: Select all
NEURON {
SUFFIX curr
RANGE amp, i, gain}
PARAMETER {
amp = 0
gain = 1e-5 (mA/cm2)}
ASSIGNED { i (mA/cm2) }
BREAKPOINT {i = amp * gain}
Code: Select all
r = new Random()
r.normal(0,0.01)
r.play(&_curr(0.5))
Regards.