In order to get the dominant frequencies for the sampled signal (elbow rotational values) I need to interpolate the data so that there are enough sampled values to satisfy the Nyquist sampling theory.

At first, I was trying to go down the Matlab route for getting the fft, but I want to learn more about Python and the available packages. That’s why I spent about 7 hours setting up a “Matlab alternative” environment. The previous post somewhat describes my process.

Bottom Line: I have virtual environments for python with numpy, scipy, matplotlib, and ipython.

NOW: Get the fft of the sampled data from the rotoscoped animation.

*Initial data*: angle values for the elbow of the horse. These angles were obtained by looking at the angle between the shoulder and the ankle and running a python script to determine the value. The sampling rate was every frame at 24 frames per second.

Talking with my friend Takis, the steps are:

- Condition the data: interpolate to obtain more sampled values. Also make sure that the sampled region is set so that there’s not a jump between the N-1 point and the N point. The region is from 0 to N-1.
- Sampled values, N, must equal 2^k which is the length of the sampled function f(n)

- Assume that python doesn’t need a periodic extension to evaluate the data.
- Filter the data before or after the fft(f)…? Bandlimit the signal with a Butterworth filter.
- Take the fft(f)
- I think that I will end up with the complex fourier series. LOOK INTO THIS…

- Playback will be through the summation of the sinusoids and cosines using the values from the Fourier Series as the coefficients and frequencies. I really need to look over this stuff more!

### Like this:

Like Loading...

*Related*