help please, Step input of current
Posted: Tue Jun 12, 2007 2:14 pm
How do I change the current during a simulation at a specific time step. i've tried using a if (t>400) { app_stn.Iamp=100 } statement both within the stn declaration and outside the stn declaration but nothing is changing.
load_file("nrngui.hoc")
create stn
stn {
insert STN
el_STN = -60.0
ek = -80.0
ena = 55.0
eca = 140.0
ett = 140.0
eahp = -80.0
cm = 100
diam = 5.5
L = 11
app_stn=new ISine(0.5)
app_stn.Ibase = 5
app_stn.Iamp = 50
app_stn.Ifreq = 12
vstn = new Vector()
apstn = new APCount(0.5)
apstn.record(vstn)
}
forall nseg=1
access stn
I want to change the app_stn.Iamp at a certain time, and then change it back but I can't even figure out how to change it.
this is my Isine mod file
NEURON {
POINT_PROCESS ISine
RANGE Ibase, Iamp, Ifreq, i
ELECTRODE_CURRENT i
}
UNITS {
(nA) = (nanoamp)
}
PARAMETER {
Ibase (nA)
Iamp (nA)
Ifreq (1/ms)
}
ASSIGNED { i (nA) }
INITIAL {
i = 0
}
BREAKPOINT {
i = Ibase + (Iamp * sin((2*3.14/1000)*Ifreq * t))
if (i< Ibase) {
i = Ibase
} else {
i = i
}
}
load_file("nrngui.hoc")
create stn
stn {
insert STN
el_STN = -60.0
ek = -80.0
ena = 55.0
eca = 140.0
ett = 140.0
eahp = -80.0
cm = 100
diam = 5.5
L = 11
app_stn=new ISine(0.5)
app_stn.Ibase = 5
app_stn.Iamp = 50
app_stn.Ifreq = 12
vstn = new Vector()
apstn = new APCount(0.5)
apstn.record(vstn)
}
forall nseg=1
access stn
I want to change the app_stn.Iamp at a certain time, and then change it back but I can't even figure out how to change it.
this is my Isine mod file
NEURON {
POINT_PROCESS ISine
RANGE Ibase, Iamp, Ifreq, i
ELECTRODE_CURRENT i
}
UNITS {
(nA) = (nanoamp)
}
PARAMETER {
Ibase (nA)
Iamp (nA)
Ifreq (1/ms)
}
ASSIGNED { i (nA) }
INITIAL {
i = 0
}
BREAKPOINT {
i = Ibase + (Iamp * sin((2*3.14/1000)*Ifreq * t))
if (i< Ibase) {
i = Ibase
} else {
i = i
}
}