You have a dataset you know nothing about. Let the agent explore it for you. The rhythm of this step: express an idea → the AI does the work → you look at the result and ask yourself: is this what I wanted? If not, ask your AI for a change.
"The clearer your idea and your prompt, the more stable the AI's output. Your prompt is your thought — and your thought is the boundary of the AI."
— lucky Shi
1What is inside this file?
idea: I just downloaded this file and know nothing about it. Start somewhere — what's inside?
Look at hsr_waveform_velocity.npz and tell me what's inside: shapes, dtypes, and the statistics of the velocity (min/max/mean/std).
>Look at hsr_waveform_velocity.npz and tell me what's inside ...▌✦ Agent — waveforms (25071, 2500) float16 — one 25 s trace per station & event
velocity (25071,) float32 — 60.0 – 97.8 m/s, mean 85.2, std 6.5
→ 25,071 recordings of trains passing 3 stations, 100 Hz, speed 216–352 km/h.
Is this the summary you wanted? Anything else you'd like to know? Ask your AI — e.g. "how many events per station?"
2Velocity distribution
idea: I want to see the distribution of train speeds.
Plot the distribution of the train velocity.
>Plot the distribution of the train velocity.▌✦ Agent — → one clear peak near the mean: typical speed ≈ 85 m/s (306 km/h)
→ spread ≈ ±6.5 m/s; speeds range 60–98 m/s (216–352 km/h)
→ a single fleet of trains, tightly grouped.
Example output (yours will use the same data, so nearly identical).
Is this figure what you wanted? What could be better? Ask your AI — e.g. "split it by station", "also show the two directions".
3Example waveforms
idea: Show me a few waveforms — what does a train passing look like?
Show me some example waveforms — a few random events per station.
>Show me some example waveforms — a few random events per station.▌✦ Agent — → the main burst sits just after t = 10 s (the train passing)
→ single traces are noisy — slow vs fast is NOT obvious by eye,
that is exactly why Step 5 uses a network and 24,000 examples.
Example output: rows = P050 / P180 / P349, columns = 3 random events each. Arrival at t = 10 s (orange dashed).
Is this what you wanted? Ask your AI — e.g. "mark the arrival time", "compare the 3 slowest with the 3 fastest".
4Time-frequency — the Doppler signature
idea: How does the signal change over time and frequency? Make a spectrogram.
Make a spectrogram of one event per station.
>Make a spectrogram of one event per station.▌✦ Agent — → energy tilts in time near the arrival: the Doppler signature of a
moving source — frequency rises on approach, falls on departure
→ faster train → steeper tilt. THIS is the feature Step 5's network
will learn to read.
Example output: one random typical-speed event per station. Arrival at t = 10 s (green dashed).
Is this figure what you wanted? What would you change? Ask your AI — e.g. "zoom to 0-50 Hz", "compare a slow and a fast event".
idea: the spectrogram has lines in it — what are they?
In the spectrogram of the train data I see lines — what are they?
>In the spectrogram of the train data I see lines — what are they?▌✦ Agent — → the tilted band = the train itself, a moving source: its frequency
sweeps (Doppler) — up on approach, down on departure.
→ the line patterns = the train's PERIODIC AXLE LOADING: wheel sets
spaced every few metres (carriage ≈ 25 m) excite the track
periodically → line spacing f ≈ v / d.
→ ahead of the train the pattern arrives early (blue-shifted);
behind it, stretched (red-shifted).
5From the lines to the speed — one station?
idea: the lines' spacing depends on the train speed (f ≈ v/d). Can a single station measure the speed from them?
The line spacing in the spectrogram depends on the train speed. Can one station estimate the speed from these lines? Try it on a few events and compare with the true speed.
>The line spacing in the spectrogram depends on the train speed ...▌✦ Agent — → measured the spacing Δf of the line pattern on 5 events,
estimated v = Δf × d (d ≈ 25 m carriage spacing)
→ estimate vs true speed: e.g. 81.2 vs 84.0 m/s — it works roughly,
error a few m/s, but the lines are faint and noisy in single events
→ a hand-made Doppler tracker: possible, but fragile.
Is this what you wanted? Think: why is the hand-measured estimate noisy? (faint lines, unknown d, resonance...). This is exactly the idea of Step 5 — but there we won't measure lines by hand: we'll let a network learn the mapping from the whole waveform.
Think · A colleague’s idea: CWT instead of STFT?
Scenario: a math-minded colleague stares at the time-frequency figure, deep in thought — and a lightbulb goes off: "What if we use a Continuous Wavelet Transform — a scale-adaptive analysis — instead of STFT? A more robust time-frequency picture, and more accurate amplitude information."
Now present your idea to the agent — in your own words. Here is one way to say it:
I have an idea: use CWT (Morlet) instead of STFT for the time-frequency plot. Try it on one event and compare them — which one is more robust, and which one gives more accurate amplitude? Show both figures.
Think about it
Did the agent just agree with you, or did it actually implement and test? Did it push back anywhere?
CWT vs STFT: where is the CWT really better for this data (time localization near the arrival) — and where is it worse (absolute amplitude calibration)?
Fun fact: the paper that published this dataset used a Morlet CWT (w0=12) for its amplitude analysis. Did your agent figure that out by itself?
Tip: if the agent only talks, push it — "No, actually implement it and show me the figure."