Why my instantaneous frequency always falls into [0,50] Hz?
Posted: Fri Apr 08, 2011 6:30 pm
Hi Ted, remember I asked you how to put a poisson-like stimulation into an axon. Here is the link,
http://www.neuron.yale.edu/phpBB/viewto ... f=8&t=2209
Now the program runs smoothly, but the output of instantaneous frequency that defined by
While for the experimental data, they are between 0 to 80 Hz, and they(frequency events) satisfy the poisson distribution.
Here is my code,
You can replace all my currents that I do not post the corresponding .hoc files by "hh".
Thanks a lot.
http://www.neuron.yale.edu/phpBB/viewto ... f=8&t=2209
Now the program runs smoothly, but the output of instantaneous frequency that defined by
always falls into [0,50]Hz.1000/(tvec1.x - tvec1.x[i-1])
While for the experimental data, they are between 0 to 80 Hz, and they(frequency events) satisfy the poisson distribution.
Here is my code,
Code: Select all
load_file("nrngui.hoc")
create axon
access axon
axon {
nseg = 51
diam = 10
L = 10200
Ra = 100
insert i_l
//insert i_h
insert i_a
insert i_kd
//insert i_kd2
insert i_na
insert i_na2
}
WEIGHT = 10
FREQ = 19
START = 10
DURATION = 5000
objref syn
axon syn = new ExpSyn(0.0098)
objref ns
ns = new NetStim()
ns.noise = 1
ns.start = 0
ns.number = 1e9
ns.interval = 1000/FREQ
objref nc
nc = new NetCon(ns, syn)
nc.delay = 0
nc.weight = WEIGHT
objref fih
fih = new FInitializeHandler("initstim()")
proc initstim() {
nc.active(0)
cvode.event(START, "setstim()")
}
proc setstim() {
if (nc.active==0) {
nc.active(1)
cvode.event(t + DURATION, "setstim()")
} else {
nc.active(0)
}
if (cvode.active()) {
cvode.re_init()
} else {
fcurrent()
}
}
objref nc1, tvec1, nil
axon nc1 = new NetCon(&v(0.3), nil)
nc1.threshold = -30
tvec1 = new Vector()
nc1.record(tvec1)
objref nc2, tvec2, nil
axon nc2 = new NetCon(&v(0.7), nil)
nc2.threshold = -30
tvec2 = new Vector()
nc2.record(tvec2)
cvode.active(1)
cvode.condition_order(2)
proc w() { local i
run()
if (tvec2.size > 0) {
wopen("temp.txt")
for i=1, tvec2.size-1 {
fprint("%g %f %f\n", i+1, 1000/(tvec1.x[i] - tvec1.x[i-1]), tvec2.x[i] - tvec1.x[i])
printf("%g %f %f\n", i+1, 1000/(tvec1.x[i] - tvec1.x[i-1]), tvec2.x[i] - tvec1.x[i])
}
wopen()
} else {
print "sorry, no conduction latencies this time!"
}
print "DONE!"
}
tstop = DURATION
w()Thanks a lot.