Recall & Review
beginner
What is a spectrogram?
A spectrogram is a visual representation of how the frequency content of a signal changes over time. It shows time on one axis, frequency on another, and the intensity or power of frequencies as colors or brightness.
Click to reveal answer
beginner
Which function in scipy.signal is commonly used to generate a spectrogram?
The function
scipy.signal.spectrogram is used to compute the spectrogram of a signal. It returns the frequencies, times, and the spectrogram data (power or intensity).Click to reveal answer
intermediate
What are the main inputs to
scipy.signal.spectrogram?The main inputs are the signal array and the sampling frequency (fs). Optional inputs include window type, segment length (nperseg), overlap (noverlap), and FFT length (nfft).
Click to reveal answer
intermediate
How does changing the segment length (nperseg) affect the spectrogram?
A larger segment length gives better frequency resolution but worse time resolution. A smaller segment length gives better time resolution but poorer frequency resolution. It's a trade-off.
Click to reveal answer
beginner
What does the output matrix of
scipy.signal.spectrogram represent?The output matrix contains the power spectral density values for each frequency and time segment. Each element shows how strong a frequency is at a specific time.
Click to reveal answer
Which axis in a spectrogram represents time?
✗ Incorrect
In a spectrogram, time is shown on the horizontal axis, frequency on the vertical axis, and intensity by color or brightness.
What does the
fs parameter in scipy.signal.spectrogram specify?✗ Incorrect
The
fs parameter specifies the sampling frequency of the input signal, which is needed to correctly calculate frequencies.Increasing
nperseg in spectrogram calculation will:✗ Incorrect
A larger segment length (
nperseg) improves frequency resolution but reduces time resolution.What does the output 'Sxx' from
scipy.signal.spectrogram represent?✗ Incorrect
'Sxx' is the matrix of power spectral density values for each frequency and time segment.
Which of these is NOT a parameter of
scipy.signal.spectrogram?✗ Incorrect
'learning_rate' is not a parameter of spectrogram; it is unrelated to signal processing.
Explain how a spectrogram helps us understand a signal's frequency changes over time.
Think about how music or speech changes pitch and loudness over time.
You got /5 concepts.
Describe the trade-off between time and frequency resolution when choosing segment length in spectrogram generation.
Consider how zooming in on time affects frequency detail and vice versa.
You got /5 concepts.