Page 1 of 1

Sampling a vector with variable time step

Posted: Tue Jul 24, 2012 10:43 am
by vladimirov
Hello,
Can someone give me an advice how to sample a vector f(t) (voltage), which is drawn by NEURON GUI with variable time step? I basically need values of f(t) at equally spaced time points ti for a usual FFT.
I tried to export it (pick Vector->save to file) and perform interpolation, so that f(t) is evaluated in equally spaced time points. But NEURON exported f(t) with some "flattened" time points, so function values are ambiguous:

Code: Select all

ti        f(ti)
1024	  0.400798
1024	  0.400948
this is obviously due to round-error of time, but how can I deal with it?
Thank you!

Re: Sampling a vector with variable time step

Posted: Tue Jul 24, 2012 12:40 pm
by ted
Here's where the Vector class's record() method surpasses picking data from a Graph. Vector record() offers two ways to specify the recording interval.
http://www.neuron.yale.edu/neuron/stati ... tml#record

Re: Sampling a vector with variable time step

Posted: Tue Jul 24, 2012 2:12 pm
by vladimirov
Solved the problem, thank you!