Recall & Review
beginner
What is the purpose of applying a window function before performing an FFT?
Applying a window function reduces edge effects and spectral leakage by smoothing the signal edges before FFT.
Click to reveal answer
beginner
Name a common window function used before FFT.
The Hamming window is a common window function used to reduce spectral leakage before FFT.
Click to reveal answer
intermediate
What problem does spectral leakage cause in FFT analysis?
Spectral leakage causes energy from one frequency to spread into others, making it hard to identify true frequencies.
Click to reveal answer
intermediate
How does the length of the window affect the FFT result?
Longer windows give better frequency resolution but worse time resolution; shorter windows do the opposite.
Click to reveal answer
beginner
Show a simple Python code snippet using scipy to apply a Hamming window before FFT.
import numpy as np
from scipy.signal import windows
from scipy.fft import fft
signal = np.sin(2 * np.pi * 5 * np.linspace(0, 1, 100))
window = windows.hamming(len(signal))
windowed_signal = signal * window
fft_result = fft(windowed_signal)Click to reveal answer
Why do we use window functions before FFT?
✗ Incorrect
Window functions smooth the signal edges to reduce spectral leakage during FFT.
Which of the following is a common window function?
✗ Incorrect
Hamming is a common window function used before FFT.
What does spectral leakage affect in FFT results?
✗ Incorrect
Spectral leakage spreads energy across frequencies, reducing clarity.
What happens if you do not apply a window before FFT?
✗ Incorrect
Without windowing, sharp edges cause spectral leakage.
In scipy, which function creates a Hamming window?
✗ Incorrect
scipy.signal.windows.hamming creates a Hamming window.
Explain why windowing is important before performing an FFT on a signal.
Think about what happens at the edges of the signal and how it affects frequency results.
You got /4 concepts.
Describe how to apply a window function to a signal using scipy before computing its FFT.
Focus on the steps from creating the window to computing the FFT.
You got /4 concepts.