henrychen1986 wrote:Could I input multiple Netstim into one NetCon?
Code: Select all
V output stream
NS1 and NS2 are NetStims that drive IF1 (an instance of the IntFire1 class) via a pair of NetCons that have weight = 1. IF1 is operating as an OR gate.
In most situations this is not something that one would want to do.
1. Each of NEURON's built-in objects that can receive events (ExpSyn, Exp2Syn, NetStim, IntFire1, IntFire2, and IntFire4) can receive events delivered by any number of NetCons.
2. With NMODL it is possible to add definitions of new object classes that can receive events delivered by any number of NetCons. It is also possible to define classes that should only receive inputs from a single NetCon (e.g. synaptic mechanisms with use-dependent or associative plasticity which, for one reason or another, cannot be made stream-specific by code written in the NET_RECEIVE block).
Or if there is any function like (boolean) AND for combining two netstim?
Well, you can approximate AND by reducing the weights in the above diagram to 0.5 and make the time constant of the IF1 _much_ shorter than the shortest ISIs of NS1 and NS2. This is only an approximation because there is a chance of something like this happening
in which events 2 and 3 do not arrive at the same time, but temporal summation of the effects of events 1-3 drives the IF1 above threshold.
BTW, how to plot NetStim?
Use the NetCon class's record() method to capture the time of its events to a Vector. Then, after the end of a simulation, create a Graph object, and use the Graph class's mark() method (or the Vector class's mark() method--the difference is in how one controls the y position of the marks) to draw an "|" character at each recorded time.