This is the 2D counterpart to the 3D exoplanet radial-velocity simulation — not a flattened version of its orbiting scene. Instead of rendering the star's tiny reflex orbit, this model reproduces the actual measurement technique astronomers use: it synthesizes the star's absorption-line spectrum, Doppler-shifts it by the same Keplerian radial velocity, adds realistic photon noise, and then recovers the velocity every simulated exposure with a genuine cross-correlation function (CCF) and a sub-pixel parabolic peak fit — exactly the pipeline behind real instruments like HARPS or ESPRESSO.
Kepler's eqn: E − e·sin E = 2πt/P (mean → eccentric anomaly)
True anomaly: ν = 2·atan2(√(1+e)sin(E/2), √(1-e)cos(E/2))
Radial vel.: v_r(t) = K·[cos ν(t) + e]
Line profile: f(v) = 1 − depth·exp[−(v−v_r)²/2σ²] (Doppler-shifted absorption line)
CCF(v_trial) = Σᵢ (1 − f_observed(vᵢ))·template(vᵢ − v_trial)
Recovered v_r = argmax CCF, refined by a 3-point parabolic fit around the peak
- Mp, P, e, i — set the true Keplerian radial-velocity curve exactly as in the 3D pair, via the same K = (2πG/P)^(1/3)·(Mpsin i)/(M★+Mp)^(2/3)/√(1−e²).
- Spectrograph S/N — the photon signal-to-noise per exposure. Low S/N scatters the recovered points around the true curve; a real spectrograph's radial-velocity precision is fundamentally photon-noise-limited, exactly what the scatter in the bottom chart shows.
- Cross-correlation — the spectrum panel shows the tiny true Doppler shift is usually far smaller than one wavelength bin. The CCF panel shows why that's not a problem: correlating the whole line against a bank of trial velocities produces a smooth peak, and a parabolic fit through its 3 highest points locates that peak to a small fraction of the trial-velocity grid spacing — the trick that lets real instruments reach metre-per-second precision from lines many kilometres-per-second wide.
- Phase-folded curve — every exposure's recovered velocity is plotted against orbital phase and never erased, so points from many simulated orbits pile up onto the same curve, the same way a real radial-velocity survey folds years of sparse, noisy observations onto one orbital period to reveal K and e.
Real spectrographs correlate thousands of stellar absorption lines at once, not one — that's what pushes their precision down to ~1 m/s. This model uses a single line so the mechanism stays visible, but the underlying recovery method (synthesize → Doppler-shift → add noise → cross-correlate → parabolic sub-bin fit) is the real technique, unmodified.