Learning center

Build a time–frequency view

Inspect a linear chirp with a windowed Fourier transform and an explicitly defined time grid.

The scientific question

When does a frequency component occur within a recording?

A single spectrum summarizes a whole record. A spectrogram adds time information by placing the spectrum of each short window at that window’s center.

24-second educational animation with synthetic data. No audio; captions and transcript available. Download MP4Video and transcript

Mathematical example

x(t) = sin[2π(4t + 4t²)] f(t) = 4 + 8t Hz

Data and analysis settings

SettingDefinition
Sampling frequency128 Hz; 256 samples over a two-second record.
Window64-sample symmetric Hann window; 0.5 s duration.
Hop8 samples; 0.0625 s between windows.
Transform size64 points; frequency bins separated by 2 Hz.
Magnitude2|DFT(window × segment)| / sum(window); displayed as a relative magnitude map.
Window placement25 full windows; center times from 0.24609375 to 1.74609375 s. No padding.

1. Inspect the signal

Compare signal_au with instantaneous_frequency_hz. The latter is the analytic phase derivative, not a frequency estimated from the data.

2. Move the window

Use complete 64-sample segments, starting at samples 0, 8, 16, and so on through sample 192. Multiply each segment by the same symmetric Hann window.

3. Place the spectra

Take the 64-point DFT of each windowed segment. Display magnitude against frequency, with each column placed at its window center.

4. Interpret the band

The ridge moves upward as the chirp accelerates. A finite time window blends information within that interval, so the colored band has a width and does not reproduce the instantaneous frequency exactly.

Expected result

CheckExpected result
Known frequency4 Hz at t = 0; 19.9375 Hz at the final sampled time.
Displayed range0–32 Hz; the full real-transform output extends to 64 Hz.
EdgesThe ends of the record have no full centered window and are left unfilled.

Scope of this example

The animation is a teaching implementation with its own explicit magnitude convention. It is not a calibrated power spectral density or a specification of a Pop Lab app’s defaults.

Further method reading

Read the video transcript

0:00 The instantaneous frequency of this synthetic chirp is 4 + 8t hertz. Its oscillations become faster over the two-second record.

0:08 A 64-sample Hann window moves through data sampled at 128 hertz, advancing by eight samples at a time. Each window produces a short-time spectrum.

0:16 The spectrogram places those spectra at the window centers. Darker teal indicates greater normalized magnitude. The finite window spreads energy across frequency bins; the plot is not an exact trace of instantaneous frequency.

Read and keep this CSV

This is a synthetic teaching dataset. The file contains 256 data rows plus one header row. Its first and last saved timestamps are 0.0 s and 1.9921875 s. Column order is shown below.

Exact CSV columnMeaning and units
time_sTime in seconds.
signal_auSynthetic chirp; arbitrary amplitude units.
instantaneous_frequency_hzAnalytic instantaneous frequency in Hz, not an estimate from the signal.
Show the CSV file identity

linear-chirp.csv · 9290 bytes

SHA-256: d74ad7955625b89c3d58765d5cf51891be23e8bb7eaba23694e9daf720a02b3d

These identifiers describe the retained CSV bytes; they do not establish scientific validity or an application import contract.

Continue with a scoped workflow guide

Compare the scoped Earthquake STFT guide

The Earthquake guide uses different recorded scaling and boundary conventions. Keep its dated source, zero-input and drawing limits separate from this teaching animation.

Worked examples describe particular inputs, methods and recorded results. Check current availability and input requirements before planning an evaluation.

← Back to the learning center