The signal I created to implement the FFT is kind of simple/boring, and obviously not from any real data, but at least it gave me the chance to really see the effect of the FFT directly. At the end of the code I also did a quick frequency-filtering routine to see whether that would work or not - and it did!

Nice.

The normalization of this FFT is described in the numpy fft docs. Pretty much every implementation defines the constants in their own way.

Another fun thing to do is to run this on an audio file. Then find the power spectrum (square of the frequency amplitudes) and plot. Perhaps apply a filter (low pass, high pass, or bandpass) and then transform back.

For that problem, you'll need to understand the relations between things like

- sampling rate
- total time
- highest & lowest frequencies
- sliding window (if you want to see the power spectrum evolve over time, you'd want to take a portion of the audio data, and perhaps use different weights for different time offsets)

See for example

As a general rule, please do upload the .ipynb file too, in addition to the .html.

And as you're creating these workbooks, remember that you can do markdown cells with LaTeX in 'em, too.

https://cs.marlboro.college /cours /spring2018 /jims_tutorials /computational_science /feb19

last modified Tue September 26 2023 6:07 pm

last modified Tue September 26 2023 6:07 pm

last modified | size | ||

chris_FFT_implementation.html |
Tue Sep 26 2023 06:07 pm | 390K | |

chris_FFT_implementation.ipynb |
Tue Sep 26 2023 06:07 pm | 134K |