Sampling a vector with variable time step

The basics of how to develop, test, and use models.
Post Reply
vladimirov
Posts: 50
Joined: Thu Jul 07, 2011 6:20 pm

Sampling a vector with variable time step

Post 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!
ted
Site Admin
Posts: 6289
Joined: Wed May 18, 2005 4:50 pm
Location: Yale University School of Medicine
Contact:

Re: Sampling a vector with variable time step

Post 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
vladimirov
Posts: 50
Joined: Thu Jul 07, 2011 6:20 pm

Re: Sampling a vector with variable time step

Post by vladimirov »

Solved the problem, thank you!
Post Reply