The cycle envelope — why your forecast wiggles
A look at how reefnotes detects the envelope of high and low values in a parameter's cycle, why the model uses a sine rather than a sawtooth, and the cases where it'll under- or over-forecast.
The forecast curve on the parameter chart isn't a guess — it's an envelope detector. Stormy takes the high-half and low-half means of your last ten tests, finds your water-change cadence from the schedule or past events, and emits a smooth sinusoid that lands troughs at WCs and peaks halfway between.
This guide explains why the model uses a sine rather than the sawtooth that physical mass-balance simulation would produce (the answer: sawtooths look like shit on a chart and the truth is closer to a sine anyway), and walks through the two cases where it'll mislead you — heavy WCs that exceed the envelope, and irregular cadence that confuses the period detector.
Full prose coming soon. The math lives in ui/src/lib/forecast.ts (computeForecast).

