How does spikevec treat artificial cells?

General issues of interest both for network and
individual cell parallelization.

Moderator: hines

Post Reply
staceyw
Posts: 12
Joined: Wed May 21, 2008 3:49 pm

How does spikevec treat artificial cells?

Post by staceyw »

I've a question about the operation of the pnm.gatherspikes().

I have a network with biophysical cells, for which the spikevec is working just fine. I recently added some artificial cells that also appear to be working correctly. These cells' only action is to produce random synaptic potentials on the biophysical cells, ie. pnm.nclist.o.event(t). There is no input or connection to the art cells nor at any time do I address them per se. I merely call the event(t) at random times.

So I have made rasters of the spikevec from gatherspikes(), and I am getting unusual results from the art cells. Before worrying about this, I'd like to know if the spikevec of those art cells is even meaningful -- their only activity is as the dummy presynaptic anchor for a postsynaptic event. I expected no spikes at all on the spikevec, or else a record of all those events if they happened to backpropagate and "fire" the art cells. I got neither.

What I got- according to spikevec, all of the art cells are "spiking" synchronously at precisely 10 second intervals, from 50.0 to 140.0 ms, with no other spikes at all. But I know that the Netcon events are actually active much more frequently than that, and start at the very first time step. I don't believe there is anything special happening at those specific times in my code, either.

Should I just ignore it? The model seems to be working fine-it's just the spikevec that is unusual.
staceyw
Posts: 12
Joined: Wed May 21, 2008 3:49 pm

Post by staceyw »

So I'm almost certain those art cell events were initialized via a netstim call (this is exactly what would happen if the original art_cell=NetStim() was set to delay 50, interval 10, number 10).

So I'm guessing the answer to the first question is that I should have seen <NONE> of the random netcon events in the spikevec.

But that brings up another question. I cannot find that I actually set those netstim parameters. Maybe it's buried in code somewhere, but could those be the default values? And if so, how do I get rid of them?

I create the cells in a very simple iterator statement (iterating gids)

c = new NetStim()

pnm.register_cell(gid, c )

Then I make connections between known GIDs, in this case each art_cell c with corresponding physiological cells.

ind = pnm.nc_append(preGID, postGID, synID, g, delay)

Then I determine the nclist numbers and just call a later function that makes the events at random times t

pnm.nclist.o[1820].event(t)
ted
Site Admin
Posts: 5793
Joined: Wed May 18, 2005 4:50 pm
Location: Yale University School of Medicine
Contact:

Re: How does spikevec treat artificial cells?

Post by ted »

What I got- according to spikevec, all of the art cells are "spiking" synchronously at precisely 10 second intervals, from 50.0 to 140.0 ms, with no other spikes at all. But I know that the Netcon events are actually active much more frequently than that, and start at the very first time step. I don't believe there is anything special happening at those specific times in my code, either.

Should I just ignore it?
Only if you want to waste your time and risk having to retract anything you publish from
such a model implementation.

I don't see why you need artificial spiking cells for your purpose at all. Just create the
NetCons with NULLObject sources.
objref nc, nil
nc = new NetCon(nil, target)
Read about this here--it's in ~ the 9th or 10th paragraph or so of the (nearly endless)
Description of the NetCon class.
http://www.neuron.yale.edu/neuron/stati ... tml#NetCon
staceyw
Posts: 12
Joined: Wed May 21, 2008 3:49 pm

Post by staceyw »

since the first 1000 netcons are created with a
ind = pnm.nc_append(preGID, postGID, synID, g, delay)
call, how do I implement the new netcons within PNM structure, if there is no GID for the netcon source? It is not apparent to me how to combine your example with my pnm.nclist (or append to it with the NetCon command).

My confusion is from the docs on pnm.nclist
"If the source exists and is a artificial cell then the NetCon is created directly."
which to me sounds like the GID has to exist, which ( I think?) means it has to be created and registered somehow. In the alternative
"If the target exists but not the source, the netcon is created via gid_connect and added to the pnm.nclist."
gid_connect also requires the source to have a GID.
ted
Site Admin
Posts: 5793
Joined: Wed May 18, 2005 4:50 pm
Location: Yale University School of Medicine
Contact:

Post by ted »

staceyw wrote:how do I implement the new netcons within PNM structure, if there is no GID for the netcon source?
Why bother?
The only reason for gids is to handle events that must be passed from one processor to
another. The only reason to pass events from one processor to another is if the event
source and event target are on different processors. You're just stuffing events into a
NetCon's queue. Do that on the same processor as the one where the target exists.
staceyw
Posts: 12
Joined: Wed May 21, 2008 3:49 pm

Post by staceyw »

OK it's working now. I did have some confusion understanding that I could make another List() of those NetCons in the "normal" fashion that would coexist with the parallelnetmanager.nclist. But they live perfectly well together, just making additional NetCon objects. And in answer to my original posted question: it looks like if you assign GIDs to NetStim objects, then spikevec will treat them like the other cells. If you use Ted's method above, it ignores them.

But I have another spikevec question that is very different.

In long runs, if I stimulate my network very hard, the cells fire in the 100's of hz range, and the Vm creeps upward (we've all seen this). This makes the APs lower in amplitude as well. What is happening is that the spikevec stops recording spikes, although the voltage traces clearly show APs.

What I get is a couple of cycles of spikes registered on spikevec, then none for the rest of the stimulus. The voltage traces show that the first couple of APs go from Vrest of -60 up to 40 mV, then the baseline creeps up to -50 and the APs stop crossing 0 mV. Once that starts, none of the APs are "detected" by the spikevec. I am assuming spikevec measures ZERO crossings.

Is there a way to change the parameters of spikevec detections?
ted
Site Admin
Posts: 5793
Joined: Wed May 18, 2005 4:50 pm
Location: Yale University School of Medicine
Contact:

Post by ted »

staceyw wrote:I did have some confusion understanding that I could make another List() of those NetCons in the "normal" fashion that would coexist with the parallelnetmanager.nclist.
If a spike source and all of its targets exist on the same processor, there is no need to
assign a gid to the spike source. This is true regardless of whether the spike source is
an artificial spiking cell or a biophysical model cell.

nrn/lib/hoc/netparmpi.hoc contains the template that defines the properties of the
ParallelNetManager class. This is an excerpt from that template:

Code: Select all

proc want_all_spikes() {local i
        for i=0, ncell-1 {
                spike_record(i)
        }
}

proc spike_record() {
        if (gid_exists($1)) {
                pc.spike_record($1, spikevec, idvec)
        }
}
Now you can see why calling pnm.spike_record() results in the capture of spike events
and gids (of all spike sources that have gids).
hines
Site Admin
Posts: 1601
Joined: Wed May 18, 2005 3:32 pm

Post by hines »

APs stop crossing 0 mV. Once that starts, none of the APs are "detected" by the spikevec. I am assuming spikevec measures ZERO crossings.
Unless you specifically set the NetCon
source threshold, the default is +10mv.
See http://www.neuron.yale.edu/neuron/stati ... #threshold
or, if you know the gid,
http://www.neuron.yale.edu/neuron/stati ... #threshold

With respect to the earlier issue of
how do I implement the new netcons within PNM structure, if there is no GID for the netcon source?
you can create the gid with
pc.set_gid2node and just start using it as a source without it ever being attached to anything with pc.cell. The question is whether you want your input spikes that you define with NetCon.event to be recorded in the spikevec. A spikevec
contains source spikes not target delivery spikes. If so, either you really do need artificial cells and stimulate those or else when you generate a NetCon.event, explicitly append its srcgid and delivery time into idvec and spikevec.
staceyw
Posts: 12
Joined: Wed May 21, 2008 3:49 pm

Post by staceyw »

Thanks. Didn't realize the spikevec just gathered from the NetCon events. That brings up the important issue that if I'm "watching the network" with spikevec raster plots, I have to be sure all cells of interest are NetCon sources, and not just "dead ends".
hines
Site Admin
Posts: 1601
Joined: Wed May 18, 2005 3:32 pm

Post by hines »

Didn't realize the spikevec just gathered from the NetCon events.
I believe you understand that spikevec does not include NetCon.event from the
rest of your post but the above is an infelicitous way of putting it.
I should mention that the reason that NetCon events do not get recorded is because
there are generally orders of magnitude more of them than source events (more
connections than cells). It might also help to be aware that there is an internal
object (called a PreSyn in the c++ implementation) which is not exposed to the
hoc level and which completes the conceptual
PreSyn->NetCon->Target. Many NetCons can have the same PreSyn as a source,
ie a source cell can connect to thousands of target cells. Sometimes a
PreSyn watches a voltage, sometimes it just accepts the net_event in the
NET_RECEIVE block of an artificial celll, and sometimes it is just associated with
a gid (when the gid does not exist on that machine) for receiving interprocessor
spikes from the PreSyn (associated with the gid via pc.cell) in some other process.
So the gid and threshold are really a part of the internal state of a PreSyn, but since
the PreSyn was never exposed to the user, those states are accessed via
the NetCon methods.
Post Reply