This is the second half of the real radial-velocity workflow: a telescope never sees a smooth curve — it sees a scattered handful of noisy Doppler measurements, often with big seasonal gaps when the star isn't visible. This simulator generates that realistic dataset from the true (hidden) Kepler orbit, then runs a Lomb-Scargle periodogram — the actual statistical technique used to pull a periodic signal out of unevenly-sampled, noisy data — to recover the period without ever being told it.
Kepler + Doppler: v_r(t) = K·[cos ν(t) + e], same as the 3D orbit model
Lomb-Scargle power at trial frequency ω = 2π/P:
τ = (1/2ω)·atan2(Σ sin 2ωtᵢ, Σ cos 2ωtᵢ)
P(ω) = (1/2σ²)·[ (Σ(yᵢ−ȳ)cos ω(tᵢ−τ))² / Σcos²ω(tᵢ−τ)
+ (Σ(yᵢ−ȳ)sin ω(tᵢ−τ))² / Σsin²ω(tᵢ−τ) ]
- Measurement noise — real spectrographs have a noise floor from photon statistics and stellar surface jitter; push it up and the periodogram peak gets buried in false peaks.
- Number of observations — more data points sharpen the true peak and suppress noise peaks, exactly as in a real observing campaign.
- Seasonal gaps — a star is only visible from a given site part of the year; the resulting uneven time sampling creates "alias" peaks at spurious periods, a real and famous pitfall in RV planet-hunting.
- Peak / mean power — a crude significance proxy: a real detection stands many times above the noise floor of the periodogram, not just barely above it.
The scatter plot shows the raw noisy measurements against time with the true (normally unobservable) curve overlaid for reference; the periodogram plot is the actual detection statistic — its highest peak is the algorithm's best guess at the period, computed with zero knowledge of the true value.