How the forecast finds your cycle, and why it draws a sine
How reefnotes reads the high-low envelope of a water-change cycle, why the forecast draws a smooth sine instead of a sawtooth, and where it misleads.
Readings swing between water changes because the tank pushes a value in one direction all week and the change yanks it back in an afternoon: a 25% water change removes 25% of anything dissolved in the water. So 25 mg/L of nitrate the day before a change and 10 mg/L the day after doesn't mean your test kit is lying — you sampled the top and the bottom of a perfectly normal sawtooth. The pattern worth reading is the envelope those swings live inside; a single reading mostly tells you where in the cycle you happened to dip the vial.
Most aquarium parameters that you dose or dilute don't sit still. They breathe. Nitrate climbs as your fish eat and your filter does its work, then drops the moment you swap out a bucket of water. Potassium ticks down between fertiliser doses and gets topped back up. Watch one of these over a few weeks and you see a wave: up, down, up, down, paced by your maintenance routine.
When your logbook has proven that wave is real, the forecast curve on the reefnotes parameter chart reads it and continues it a little way forward. That "when" matters — the cycle drawing is no longer the default, and I'll get to why — but when it appears, behind it is something closer to an envelope detector than to a physics engine: it doesn't try to simulate the chemistry of your tank, it just measures how wide your cycle swings and how often it repeats, then keeps drawing. Below I'll unpack what that means without much maths, why the line comes out as a smooth sine rather than a jagged sawtooth, what your data has to prove before the app will draw it, and the situations where you should read it with a raised eyebrow.
What "envelope" actually means here
Picture your last several nitrate readings plotted as dots. Some sit high: the ones taken just before a water change, after days of accumulation. Some sit low: the ones right after a change. The forecast ignores the order they came in and splits them into a high group and a low group. The peak level is the average of the upper half of your roughly last ten readings, the value the parameter tends to climb to before maintenance. The trough level is the average of the lower half, where it lands after a change. From those two numbers you get the middle of the cycle and how far it swings:
mid = (peak + trough) / 2
amp = (peak − trough) / 2
So if your nitrate peaks around 25 mg/L and troughs around 10, the model reads a midpoint near 17.5 and an amplitude near 7.5. That's the "envelope": the band your readings live inside, summarised as a centre and a half-width. Averaging the halves rather than grabbing the single highest and lowest points keeps one freak reading from blowing the shape out of proportion.
Where the timing comes from
The envelope tells the forecast how high and how low. It still needs to know when, and that period comes from your water-change cadence, because for most parameters the water change is what resets the cycle.
reefnotes looks for the cadence in two places, in order of trust. If you've set up a recurring maintenance schedule, it reads the period straight off that recurrence rule, checking the spacing between two planned changes. You told it you change water every seven days, so the period is seven days. With no schedule, it falls back to your history and uses the median gap between your logged water-change events. Median, not mean, so one skipped week doesn't stretch the estimate. With fewer than two logged changes and no schedule, it assumes a weekly cycle.
Now it has everything: a middle, a swing, and a beat. The wave is anchored to your next scheduled water change and arranged so that at the moment of a change the value sits at the trough, while exactly halfway between two changes it reaches the peak. Each dip lands on a real water change; each crest sits in the gap. To avoid a jump where the forecast meets your latest reading, any small mismatch at the start is blended away over the first cycle, so the line joins your data without a kink.
For the full tour of every mark on the chart (the historical line, the shaded band, the dotted water-change markers), reading your trend forecast covers that ground. This guide is about the shape of the forecast itself.
Why a sine and not a sawtooth
A water change is a sudden event. You remove a third of the water in twenty minutes and the parameter drops fast; between changes it climbs gradually. So the honest picture should be a sawtooth: a sharp cliff at each change, a slow ramp in between. Why does reefnotes smooth that into a sine?
Part of the answer is just cosmetic. A sawtooth looks terrible on a chart. Sharp vertical drops fight with the smooth spline drawn through your actual measurements and produce a jittery line that's hard to read. We tried it. It looked like noise.
But the bigger reason is that the sawtooth isn't actually more truthful. It assumes the drop at a change is instantaneous and the rise between is perfectly linear, and neither holds in practice. Water takes time to mix; consumption and dilution overlap; biology doesn't run at a constant rate. When you test the day before a change and again the day after, the spline through those two points already averages over the dilution. The smooth wave ends up closer to what your measurements actually show than the cliff-edge model would. So a sine is what the model draws. (For a step-by-step view of what a single change does to your numbers, the water-change impact tool walks one event through the dilution arithmetic.)
The cycle has to earn its place on the chart
Here's the part that changed, and it changed because we measured. A wave like this is only a good forecast when the cycle it extrapolates is real, and over long stretches of most logbooks it isn't — tests come irregularly, kits quantize to colour steps, and the "cycle" the detector finds is noise wearing a costume. When we backtested the wave against years of real tank data, it predicted worse than simply assuming the value stays put, on every well-sampled parameter.
So the sine is no longer the default. By default the forecast draws a robust level — where your readings have settled, weighted toward recent tests and blended with your last reading according to which of the two has tracked the parameter better lately. Flat, humble, and in backtests measurably better than both the wave and pure persistence. Reading your trend forecast walks through that default line in detail.
The wave you've just read about appears only when your data passes a strict audition: at least 8 tests, spanning at least two full water-change cycles, with peaks and troughs that repeat cleanly (a stable envelope, not a smear) and a swing clearly larger than your kit's smallest step. Pass all of that and the chart draws your cycle forward, because at that point the cycle is a measured fact. Fail any of it and you get the level instead. The chart only draws a cycle when your data has proven one.
The confidence band, and why it isn't built from rate variance
Around the forecast line sits a shaded band: the uncertainty. The natural way to build one would be from the spread in the consumption rate, how much your day-to-day change wobbles between intervals. For cyclic data that approach falls apart. In a cycle the value rises, a water change drops it, then it rises again. The rate is positive for most of the period and sharply negative at each change, so its "variance" is enormous by construction, not because your tank is unpredictable but because the rate genuinely flips sign every cycle. A band built on that would balloon out to something useless.
So reefnotes builds the band from the forecast's own recent errors instead. It replays the model over your recent tests — "knowing only what came before, what would it have predicted here?" — and takes a typical miss as the band's base width. That makes the band calibrated rather than decorative: it's tuned so roughly two in three future readings land inside it, it widens with the square root of how far ahead it reaches, and it never gets narrower than half a colour-chart step, so it can't claim more precision than your kit has. It needs at least five usable readings to draw at all, because with fewer there are no errors worth quoting. And when the validated cycle wave is on screen, the band around it is tied to the amplitude of your cycle: a tank with a tight, repeatable cycle gets a thin band; one whose peaks and troughs jump around gets a wider one.
The forecast knows when to stop
A model is only as good as the data behind it, and old data is dangerous. If your most recent test is older than 14 days, reefnotes suppresses the forecast entirely. No line, no band, just a quiet note saying how long it's been since your last measurement. A two-week-old reading isn't enough to claim where your tank is now, and a confident projection drawn from stale numbers is worse than none.
Even when your data is fresh, the forecast only reaches a few weeks ahead, not months. The wave repeats, so in principle you could paint cycles out to the horizon, but every one forward compounds the assumption that nothing in your routine changes. A short reach keeps the line honest. Stormy, the seven-day watcher in reefnotes, leans this way on purpose: near-term and grounded beats far-out and confident.
Two cases where it will mislead you
The envelope detector rests on a single assumption: your recent cycle is representative of the next one. Break it and the forecast bends the wrong way. There are two common ways to break it.
A water change much heavier than usual. Suppose you normally swap 25% weekly, and this week you did a 60% change to fix a problem. That single event drops the parameter well below the trough the envelope learned from your ordinary changes. The forecast doesn't know it was a one-off; it only sees the recent average, so it tends to sit above your real value for a cycle or two, expecting the next trough where the small changes used to put it. The numbers catch up once a normal cycle or two passes and fresh readings pull the envelope back down — and sometimes the audition itself catches it: a trough that far out of family destabilises the envelope, and the chart drops back to the level until things settle. If you're weighing one of these larger swaps, when to do a bigger water change talks through the call.
An irregular cadence. The period detector wants a rhythm. Change water every Sunday and it locks on cleanly. Change it whenever you have a free evening, sometimes after four days, sometimes after twelve, and the median spacing won't match any actual gap. The troughs then land on dates where no change happens, and the wave drifts out of phase with your tank. In practice this is also the case the audition catches most often — an irregular rhythm smears the envelope, the gate fails, and the chart falls back to the level rather than draw a wave out of step with your tank. The fix is on your side either way: set a maintenance schedule, or keep your changes on a steadier beat, and the detector has something real to lock onto.
In both cases the model isn't broken. It's faithfully extrapolating a cycle that no longer describes your tank, and a couple of fresh tests on your new routine is all it takes for the envelope to relearn the shape.
None of this makes the forecast an oracle, and it was never meant to be one. What it does is take the rhythm your own logbook already contains and continue it a short way, so you can see roughly where nitrate or potassium is heading before your next change. Read it as the well-informed hunch it is. As long as you keep testing on a steady cadence, it stays close to the truth.

