Page 1 of 1

Times of spikes vector

Posted: Wed Apr 29, 2015 12:38 pm
by afc
Dear all,

I want to analyse the spike train outputs from some single neuron models that I am simulating, the spike trains are recorded as the voltage traces at the axo-somatic compartment of these models. When I pick the vector generated by these simulations, what one obtains is the time course of the voltage potential in the accessed section of the model, but what I was wondering if instead of the voltage trace time course it is possible to retrieve a vector of the times of spikes (i.e. for instance an operational definition of spike could be defined as the time of the voltage reversal at the axo-somatic compartment)? So, in the end one would have a vector where each entry would be the time, over the course of the simulation, when the voltage trace reached the predefined threshold.

Thank you all in advance!!

Re: Times of spikes vector

Posted: Wed Apr 29, 2015 4:39 pm
by ted
Unless you absolutely need to record membrane potential, why not just use the NetCon class's record() method to capture the times at which the observed variable crosses whatever you decide is the "threshold" for saying that a spike happened? Run a simulation, and the vector will contain those times. If you already have a bunch of membrane potential recordings, and you want to find out when those threshold crossings happened, you could use the Vector class's indwhere to find every point at which the recorded v crossed a threshold in the positive going direction.