Page 1 of 1

How to set spike detection threshold for pc.spike_record

Posted: Wed Oct 13, 2021 6:03 am
by Johannes
Hej!

I was wondering, is there a way to get access to the underlying NetCon object when creating spike recordings using pc.spike_record?
We need to change the spike detection threshold from default value 10 to a lower value.

I found an old post from 2005 which talked about netconExc but that does not appear to be present anymore?
viewtopic.php?t=2536&sid=989247c54516bc ... c6a871c8b9

In that post they used, which does not work for me:

import neuron
print len(neuron.h.netconExc) # prints length
for nc in neuron.h.netconExc:
print nc.hname() # prints NetCon[id]

There must be a smarter way that I am missing to set the spike detection threshold when recording spikes from a neuron using pc.spike_record...

Cheers,
Johannes

Re: How to set spike detection threshold for pc.spike_record

Posted: Wed Oct 13, 2021 12:13 pm
by ted
netconExc in the 2005 post is the name of a user-created variable. It has nothing to do with the question you asked.

ParallelContext.threshold() is what you want. Read about it in the Programmer's Reference in the documentation of the ParallelContext class https://nrn.readthedocs.io/en/latest/py ... arcon.html. You might want to browse through that particular page to see if there are any other items that would be useful.

Re: How to set spike detection threshold for pc.spike_record

Posted: Thu Oct 14, 2021 9:40 am
by Johannes
Thank you Ted!