why this netstim does not work ?

The basics of how to develop, test, and use models.
Post Reply
stil
Posts: 28
Joined: Thu Jul 01, 2010 8:47 am
Location: Mulhouse - France

why this netstim does not work ?

Post by stil »

Hello,

I might have missed something about netstim / netcon. I am just trying to use netstim to control a series of events, as an input of a diffusion mechanism.
I started with this, but the events do not seem to occur :

Code: Select all

load_file("nrngui.hoc")
objref cvode // is CVODE required to be able to use NetStim ?
cvode = new CVode(1)
cvode_active(0)
//cvode.atol(1e-6)
//cvode.rtol(1e-6)
//cvode.condition_order(2) 

create ACHINPUT
objref ach_stim
ACHINPUT ach_stim = new NetStim(0.5)
ach_stim.interval = 10 //ms (mean) time between spikes
ach_stim.number = 10 //(average) number of spikes
ach_stim.start  = 10 // ms (most likely) start time of first spike
ach_stim.noise = 0 //---- range 0 to 1. Fractional randomness. 0 deterministic, 1 intervals have negexp distribution.

objref syn
syn = new ExpSyn(0.5)
//syn.tau --- ms decay time constant
//syn.e -- mV reversal potential
//syn.i -- nA synaptic current

objref nc
nc = new NetCon(ach_stim, syn)
//nc.threshold = 0.0
//nc.delay = 0
//nc.weight = 3000
So, either I actually misunderstood something, or I have forgotten a little detail, or it's a bug...

Also, I read the netstim.mod file, but could not find THE variable to plot to check if the events occured, within the netstim object itself: is there a way to track and record the events ?

thanks,
ted
Site Admin
Posts: 5786
Joined: Wed May 18, 2005 4:50 pm
Location: Yale University School of Medicine
Contact:

Re: why this netstim does not work ?

Post by ted »

Good questions.
stil wrote:is CVODE required to be able to use NetStim ?
No.

Code: Select all

ACHINPUT ach_stim = new NetStim(0.5)
This isn't an error, but I should mention that in recent versions of NEURON (6 and 7), NetStim does not need a "host section".

The events won't have any effect unless the NetCon's weight is nonzero.
I read the netstim.mod file, but could not find THE variable to plot to check if the events occured, within the netstim object itself: is there a way to track and record the events
You can record the event times to a Vector. Suppose you had a NetStim called ns. Then

Code: Select all

objref vec, netcon, nil
vec = new Vector()
netcon = new NetCon(ns, nil)
netcon.record(vec)
objref netcon
will set up recording of the event times to the vector "vec". After every run,
vec.printf
will print out the times at which ns generated an event.
Post Reply