Omniadisce

Computational physics 13.4: The FFT, which frequencies are in it?

Lesson Beginner

Join free to take this lesson

Anyone can look around, but taking a lesson needs a free account. With one, your answers are checked step by step and your progress is saved, so you can stop and pick up where you left off on any device.

12 steps ยท about 30 min

By the end you can

  • Make a spectrum with np.abs(np.fft.rfft(y)) and its frequencies with np.fft.rfftfreq(N, 1 / fs)
  • Draw a spectrum and read its peaks
  • Find the biggest peak's frequency: k = np.argmax(spectrum), then freqs[k]
  • Say why the frequencies stop at fs / 2 and come in steps of 1 / T

Who it is for: Anyone who has done lessons 13.1-13.3.

The steps

  1. From samples to frequencies
  2. Two lines
  3. The frequencies
  4. Why stop there?
  5. A spectrum
  6. Where is the peak?
  7. Find the note
  8. Position or frequency?
  9. How fine?
  10. A longer recording
  11. A quarter of a second
  12. Reading a spectrum

Discussion 0 comments

Log in to join the discussion.

× Enlarged view