classes active postloc record valid delay pre setpost wcnt event precell srcgid weight get_recordvec precelllist syn x postcell prelist synlist postcelllist preloc threshold
section netcon = new NetCon(&v(x), target)
netcon = new NetCon(source, target)
section netcon = new NetCon(&v(x), target, threshold, delay, weight)
netcon = new NetCon(source, target, threshold, delay, weight)
If the optional threshold, delay, and weight arguments are not specified, their default values are 10, 1, and 0 respectively. In any case, their values can be specified after the netcon has been constructed, see threshold weight and delay .
Note that prior to 12-Jul-2006, when the first form of the constructor was used, (i.e. a NetCon having a pointer to a source variable was created, but having no threshold argument) the threshold was reset to the default 10 (mV) even if the threshold for that source location had been explicitly set earlier. That behavior caused confusion and has been changed so that if there is no threshold argument and the threshold location already exists, the previous threshold is retained.
The target must be a POINT_PROCESS or ARTIFICIAL_CELL that defines a NET_RECEIVE procedure. The number of NET_RECEIVE procedure arguments define a weight vector whose elements can be accessed with through the NetCon.weight ( weight )variable but the weight argument in the above constructors specify the value of the first argument, with the normal interpretation of weight or maximum conductance. On initialization, all weight elements with index > 0 are set to 0 unless the NET_RECEIVE block contains an INITIAL block. In the latter case, that block is executed on a call to finitialize and allows non-zero initialization of netcon "states" --- args not initialized in the INITIAL block would be analogous to a Parameter except that it can have a different value for different NetCon instances and can be set to a desired value with weight .
The target is allowed to be nil (NULLObject) in which case the NetCon is always inactive. However this can be useful for recording (see record ) the spike train from an output cell.
The source is normally a reference to a membrane potential which is watched during simulation for passage past threshold. The currently accessed section is required by the local variable time step method in order to determine the source "cell". Any range variable may be a source variable but I suspect that membrane potential is the only practical one.
N.B. For the local variable time step method use_local_dt , the
proper currently accessed section for the source must be correct during
the creation of the NetCon so that the proper cell may be associated
with the source. i.e,
netcon = new NetCon(&obj.sec.v(.5), ...)
will not work with the local step method because, although the pointer
is correct, the proper section was popped from the section stack prior
to the constructor call. Instead, the proper syntax is
obj.sec netcon = new NetCon(&v(.5),...)
The source may also be a PointProcess with a NET_RECEIVE block which contains a call to net_event. PointProcesses like this serve as entire artificial cells.
The source may also be a PointProcess which contains a "x" variable which is watched for threshold crossing, but this is obsolete since NET_RECEIVE blocks which explicitly call net_event are much more efficient since they avoid the overhead of threshold detection at every time step.
The source may be a NULLObject. In this case events can only occur by calling event from hoc. (It is also used by NEOSIM to implement its own delivery system.)
A source used by multiple NetCon instances is shared by those instances to allow faster threshold detection (ie on a per source basis instead of a per NetCon basis) Therefore, there is really only one threshold for all NetCon objects that share a source. However, delay and weight are distinct for each NetCon object.
The only way one can have multiple threshold values at the same location is to create a threshold detector point process with a NET_RECEIVE block implemented with a WATCH statement and calling net_event .
And I'll say it again: Note that prior to 12-Jul-2006, when the first form of the constructor was used, (i.e. a NetCon having a pointer to a source variable was created, but having no threshold argument) the threshold was reset to the default 10 (mV) even if the threshold for that source location had been explicitly set earlier. That behavior caused confusion and has been changed so that if there is no threshold argument and the threshold location already exists, the previous threshold is retained.
From a NetCon instance, various lists of NetCon's can be created with the same target, precell, or postcell. See netconlist for creation of NetCon lists from a target, precell, or postcell pattern or object.
The local variable step method does not work when the source is specified
with the syntax netcon = new NetCon(&soma.v(.5),...)
. The
currently accessed section must be correct during the construction of
the object and the above example is correct only during calculation of
the pointer argument.
NetCon
boolean = netcon.valid()
NetCon
boolean = netcon.active(boolean)
boolean = netcon.active()
NetCon
netcon.event(tdeliver)
netcon.event(tdeliver, flag)
A flag value can only be sent to an ARTIFICIAL_CELL.
NetCon
target_object = netcon.syn()
NetCon
source_object = netcon.pre()
NetCon
{x = netcon.preloc() ... pop_section()}
NetCon
{x = netcon.postloc() ... pop_section()}
NetCon
cellobj = netcon.precell()
NetCon
cellobj = netcon.postcell()
NetCon
netcon.setpost(newtarget)
NetCon
List = netcon.prelist()
List = netcon.prelist(List)
NetCon
List = netcon.synlist()
List = netcon.synlist(List)
NetCon
List = netcon.postcelllist()
List = netcon.postcelllist(List)
NetCon
List = netcon.precelllist()
List = netcon.precelllist(List)
NetCon
del = netcon.delay
netcon.delay = del
NetCon
n = netcon.wcnt()
NetCon
w = netcon.weight
netcon.weight = w
x = netcon.weight[i]
netcon.weight[i] = x
NetCon
th = netcon.threshold
netcon.threshold = th
Note that prior to 12-Jul-2006, when a NecCon was constructed with no threshold argument, the threshold was reset to the default 10 (mV) even if the threshold for that source location had been explicitly set earlier. That behavior caused confusion and has been changed so that if the constructor has no threshold argument and the threshold location already exists, the previous threshold is retained.
NetCon
x = netcon.x
netcon.x = x
NetCon
netcon.record(Vector)
netcon.record()
netcon.record("stmt")
netcon.record(tvec, idvec)
netcon.record(tvec, idvec, id)
With no argument, no vector recording at the source takes place.
The vector is resized to 0 when finitialize is called.
NB: Recording takes place on a per source, not a per netcon basis, and the source only records into one vector at a time.
When the argument is a "stmt", then the statement is called on a source event. Like the Vector case, the source only manages one statement at a time. The stmt is removed when the arg is "".
If a source is recording a vector, that source is not destroyed when the last netcon connecting to it is destroyed and it continues to record. The source is notified when the vector it is recording ceases to exist---at that time it will be destroyed if no netcons currently connect to it. To do a recording of a source, the following idiom works:
The source will continue to record events until record is called with another netcon connecting to the source or until the vec is destroyed. Notice that this idiom allows recording from output cells (which normally have no connecting netcons) as well as simplifying the management of recording from cells.objref vec, netcon, nil vec = new Vector() netcon = new NetCon(source, nil) netcon.record(vec) objref netcon
Note that NetCon.event(t) events are NOT recorded.
The netcon.record(tvec, idvec) form is similar to netcon.record(tvec) but in addition the id value of NetCon[id] is also recorded in idvec (or the specified id integer if the third arg is present). This allows many source recordings with a single pair of vectors and obviates the use of separate tvec objects for each recording.
// ... soma with hh, IClamp, and voltage plot ... objref nc, nil soma nc = new NetCon(&v(.5), nil) nc.threshold = 0 // watch out! only one threshold per presyn location nc.record("handle()") proc handle() { print "called handle() at time ", t, " when soma.v(.5) = ", soma.v(.5) stoprun = 1 // Will stop but may go one extra step. Also with // local step the cells will be at different times. // So may wish to do a further... cvode.event(t+1e-6) } cvode_active(1) // optional. but fixed step will probably do one extra time step cvode.condition_order(2) // optional. but much more accurate event time evaluation. run() print "after run(), t = ", t, " and soma.v(.5) = ", soma.v(.5)
NetCon
tvec = netcon.get_recordvec()
NetCon
gid = netcon.srcgid()
There is no way to determine the corresponding target cell gid (assuming there is one and only one gid source integer for each cell. But see syn and postcell .