Wavelet Transform
Compose a signal from sine waves and see how the continuous wavelet transform reveals time-localized frequency content — something FFT alone cannot show. The scalogram maps frequency against time, exposing when each frequency appears.
How it works
The Fourier Transform decomposes a signal into sine waves of different frequencies, telling you which frequencies are present — but not when they occur. For stationary signals (where frequency content doesn’t change over time), this is fine. But many real-world signals — music, speech, seismic data, radar — have frequency content that varies with time.
The Continuous Wavelet Transform (CWT) solves this by correlating the signal with a small oscillatory function called a wavelet, shifted across time and stretched across scales. At each position and scale, the magnitude of the correlation tells you how much frequency content is present at that time and scale. The result is a scalogram: a 2D map of the time-frequency plane.
This lab uses the Morlet wavelet, which is essentially a Gaussian-windowed complex sinusoid. The width parameter σ controls the trade-off between time and frequency resolution — a manifestation of the Heisenberg uncertainty principle. A wider wavelet gives better frequency resolution but poorer time localization, and vice versa.
Try the “Chirp Signal” preset for the most dramatic demonstration. The FFT shows a broad smear of frequencies with no time information. The scalogram, by contrast, traces a clear diagonal line showing exactly how the frequency sweeps from low to high over time. This is the fundamental advantage of wavelet analysis.