One ratio reads a peak and a trough
Assumes A straightened channel repeats the one beside it, Two channels estimate what one can only sort and A narrow channel has to be read on its own.
A straightened channel repeats the one beside it asked which second narrow channel a phone’s ambient-light sensor should carry to estimate how far off the camera’s colour will be under a lamp. Across fifty-four lamps, a channel at 450 nanometres estimated the camera’s error to ±0.164 ΔE₀₀, left out one lamp at a time; a 570 nm channel, straightened by a logarithm, repeated what 450 already said; a 500 nm channel, beside 450, brought the estimate to ±0.143, because it reads whether the stretch between a lamp’s blue emission and its green is empty.
That essay closed on a proposal: read the gap directly, as one number, the ratio of the 500 nm reading to the 450 nm one. A ratio cancels whatever the two channels share — the lamp’s overall level, a calibration gain common to both — and keeps what distinguishes them. The prediction was that one ratio would estimate the error as well as the two channels as separate inputs, ±0.14, with one fewer number to fit, and that it would separate the triphosphor tube from the three-emitter source, the pair no transform of a single reading could.
Which ratio
The 500 nm channel’s departure divided by the 450 nm channel’s estimates the camera’s error to ±0.355, worse than guessing the mean, ±0.304; its logarithm, ±0.303. The departure of the two readings’ ratio — the logarithm of the 500 nm reading over the 450 nm one, set against what the camera predicts for that ratio — estimates it to ±0.141 as one input, against ±0.143 for the two channels as two, and ranks the lamps’ errors at 0.88, better than the 450 nm channel’s 0.87. For forty-five of the fifty-four lamps, every structured one among them, the two channels depart from the camera’s prediction in opposite directions, and the ratio’s departure is exactly the sum of their two departures. A five per cent gain error in the narrow channels moves no estimate by a hundredth.
- The prediction holds, for one of the two ratios the proposal’s words could mean.
- The other ratio is worthless, and why it is says what a departure is.
- The ratio works because of a sign: a structured lamp puts a peak in one channel and a trough in the other, and the ratio adds them.
- Robustness was not the reason to want it. None of the estimates is fragile to calibration, as the verdicts drawn from the same channels were.
Two ratios, two answers
A narrow channel’s departure, as a narrow channel has to be read on its own defined it, is the logarithm of the channel’s share of the sensor’s total signal over the share the camera’s own three channels predict it should have — the prediction fitted on smooth lamps, so that a smooth lamp’s departure is close to nothing and a lamp with lines or gaps near the channel departs by a lot. The earlier essays used its magnitude.
“The ratio of the 500 nm reading to the 450 nm one” can therefore be taken at two stages. The ratio of the departures divides the 500 nm channel’s magnitude by the 450 nm channel’s. The departure of the ratio first divides the two narrow readings — the logarithm of that quotient — and then asks how far it sits from what the camera’s channels predict for it. The two sound alike and behave nothing alike. The first estimates the camera’s error to ±0.355 and its logarithm to ±0.303, no better than the mean. The second estimates it to ±0.141, as well as the two channels given to the fit separately, and beside 450 it adds nothing further, ±0.145: it already carries what 450 carries.
Kept signed rather than in magnitude, the ratio’s departure estimates to ±0.177. The magnitude matters because a lamp can depart from smoothness in either direction and both raise the camera’s error.
Why the ratio of departures is worthless
For a smooth lamp both departures are nearly nothing, and the ratio of two nearly-nothings is anything. The smooth radiators and daylights depart by a hundredth or a few hundredths in each channel, as the channels’ fit to smooth lamps is meant to make them; the violet-pumped LEDs, most of which the channels cannot see, depart by a few hundredths too. Their ratios run from a thirtieth to fifty, set by which near-zero is nearer zero. The structured lamps, whose departures are large, give ratios from a third to three. So the ratio’s spread is dominated by the lamps whose errors it has least to say about, and its rank correlation with the error is −0.31.
The departures’ magnitudes were built to answer “how structured is this lamp?”, and their ratio asks “in which of two ways is it structured?” — a question with no answer for a lamp that is not structured at all. Two channels estimate what one can only sort found the error following how structured a lamp is; dividing one measure of structure by another divides that out.
A peak and a trough
Kept signed, the departures sort the lamps into quadrants, and nearly all of them into two. Thirty-seven of the fifty-four lamps, every structured one among them, depart upwards at 450 nanometres and downwards at 500: more light than the camera predicts at the blue pump or the tube’s blue line, less in the stretch after it. The phosphor LEDs read +0.87 to +0.96 at 450 and −0.33 to −0.47 at 500; the triphosphor tube +0.62 and −1.90; the three-emitter source +0.81 and −0.87. Eight more lamps sit in the opposite corner — down at 450, up at 500 — most of them violet-pumped LEDs whose pump misses the 450 nm channel and whose phosphor spills into the 500 one.
In both corners the two channels depart in opposite directions, so the departure of their ratio — the 500 nm departure less the 450 nm one — is the sum of the two magnitudes, exactly, to the last digit, for all forty-five lamps. That is why one number does what two did. The two-channel estimate fitted a weight to each channel’s magnitude; for these lamps the ratio fixes the two weights equal and spends one parameter where the fit spent two, and the fit had found them nearly equal anyway.
The triphosphor tube, which a transform of 570 nanometres could not separate from the three-emitter source, sits furthest down the 500 nm axis: its trough is more than twice as deep. The ratio’s departure puts it at 2.52 against the three-emitter’s 1.68, in the order of their camera errors, 2.37 against 1.75.
Where a fill turns the sum into a difference
Seven lamps depart the same way in both channels. Two are daylights, near the origin in both. The other five are the most heavily cyan-filled LEDs of the constructed family — fills of 0.22 and 0.35 at 490 to 505 nanometres — whose added emitter puts more light at 500 nanometres than the camera predicts, turning the trough into a small excess. For them the ratio’s departure is the difference of the two magnitudes rather than their sum: 0.68 minus 0.06 for a fill of 0.22 at 505 nanometres, 0.37 minus 0.12 for a fill of 0.35 at 490.
All five give the camera a smaller error than the family’s median, 1.35 to 1.60 against 1.67. The fill is what the lamps two channels miss found making those LEDs easier for the camera: it fills the gap the camera and the observer disagree about. The ratio’s departure encodes that without being told: where the gap is filled, the two channels no longer add, and the number falls with the error. The two channels as separate magnitudes cannot see the difference, since a magnitude has no sign.
The error against one number
Against the ratio’s departure the lamps lie along one band. The smooth lamps and the violet-pumped LEDs sit near nought, where the camera’s error is about 1.2; the cyan-filled LEDs run from 0.2 to 1.2 as their fill thins, the phosphor LEDs sit at 1.25 to 1.34, the three-emitter source at 1.7 and the triphosphor tube at 2.5, the camera’s worst lamp at the end of the band. The rank correlation is 0.88 and a straight line misses by ±0.141, the worst miss the halophosphate tube by 0.45.
The halophosphate tube is the one lamp neither this number nor the two channels estimate well. It is the tube a lamp is not a blackbody took apart to show that a colour temperature says nothing about a spectrum, and it makes the matching point here: a lamp’s trouble can sit where neither channel looks. Its broad phosphor fills most of the stretch after its blue line, so its trough at 500 is shallow, −0.19, and its peak at 450 modest, +0.37; the ratio’s departure is 0.55, and the camera’s error under it is 1.90, as high as a phosphor LED’s. A halophosphate tube’s colour trouble is further into the long wavelengths, which neither of these channels reads.
Where one number gains and where it loses
The tie between one number and two is an average of families that do not tie. Split by family, the ratio’s departure misses the smooth lamps by ±0.164 against the two channels’ ±0.178 and the structured lamps by ±0.248 against ±0.284 — it is better on both. It is worse on the two constructed LED families: ±0.101 against ±0.087 on the violet-pumped LEDs and ±0.103 against ±0.077 on the cyan-filled ones.
The structured lamps gain because the equal weighting the ratio imposes is close to right for them, and a fit that can set two weights spends some of its freedom chasing the triphosphor tube. The LED families lose because for them the two departures are not equally informative. A violet-pumped LED whose pump sits at 475 nanometres, just past the 450 nm channel, departs by −0.45 at 450 and only +0.03 at 500; the ratio’s departure counts the deficit at 450 in full, and reads the lamp as more structured than the camera finds it. The separate fit weighs 450 by what it is worth across the whole census and does better on exactly those lamps.
So the ratio is not a better estimator than the two channels. It is an equally good one with one number fewer, and it is better where the census’s worst lamps are.
Calibration
A gain error shared by both narrow channels leaves the ratio’s departure exactly where it was, since it multiplies numerator and denominator alike. That was the proposal’s second reason to want a ratio, and it holds. It turns out not to matter much. Fitted on a sensor as designed and applied to one whose narrow channels read five per cent high or low — together, or either alone — no estimate’s error changes by as much as a hundredth: the 450 nm estimate moves from 0.159 to 0.168, the two-channel estimate from 0.125 to at most 0.134, the ratio’s departure from 0.135 to at most 0.139.
This is the opposite of what the same channels did as classifiers. A narrow channel has to be read on its own found a verdict — structured or smooth — breaking at one per cent of calibration error, because a verdict is a threshold and smooth lamps sit just under it. An estimate has no threshold: a gain error shifts every smooth lamp’s departure by a few hundredths, and the estimate moves by that amount times its slope, a few hundredths of a ΔE₀₀ at most. What a threshold turns into a wrong answer, an estimate turns into a slightly different number.
What a sensor designer should take from it
One ratio, if it is the right one. A phone with channels at 450 and 500 nanometres can compute one number — the logarithm of the 500 nm reading over the 450 nm one, less what its camera channels predict — and estimate its camera’s colour error under a lamp from it as well as from both channels, in a form that is immune to a shared calibration drift and knows when a lamp’s gap has been filled.
A ratio of departures is not that number, and the difference is not a technicality. Departures are already comparisons with a smooth-lamp prediction; their ratio compares two comparisons, and is dominated by the lamps where both are nothing. The rule is to divide readings and compare the quotient with its prediction, not to divide the comparisons.
How the ratios were computed
The fifty-four lamps, the camera with its two-matrix profile blended at each lamp’s colour temperature — the blend two matrices do not reach a white LED found wanting under exactly the lamps this estimate is for — the ambient sensor and the narrow channels at 450 and 500 nanometres, ten nanometres wide, are as the essays this continues built them. Each channel’s signed departure is the natural logarithm of its share of the sensor’s four-channel signal — red, green, blue and itself — over the share predicted linearly from the camera’s white, the prediction fitted on the smooth training lamps. The ratio of departures is one magnitude over the other; the departure of the ratio is the 500 nm signed departure less the 450 nm one, which is the log of the two narrow readings’ quotient less its prediction. Every estimate is a least-squares line or plane scored by leaving each lamp out in turn. Calibration errors multiply a narrow channel’s reading by one plus the error before its share is taken; the estimates are then the ones fitted with no error, and their error is the root mean square over all fifty-four lamps.
What this leaves out
The sensor is modelled, as before: gaussian channels, a silicon response, calibration perfect unless a gain error is stated. The signs of the departures depend on where the channels sit against real lamps’ lines, and a channel at 505 rather than 500 nanometres would put some of the lamps in different quadrants.
The census is one census. Its structured lamps are phosphor LEDs and tubes whose blue emission precedes a gap; a lamp with a deep-red emitter and no gap at 500 would depart at neither channel, and the ratio would call it smooth whatever the camera’s error under it.
Calibration error is a gain. A sensor’s narrow channels can also drift in wavelength as their filters age, or with the angle the light arrives at, as the interference edge in the corner of the frame has another filter moves by nineteen nanometres across a camera’s field, which a ratio does not cancel and which moves a channel on or off a lamp’s line.
Still open: whether a third channel in the long-wave gap catches the halophosphate tube
The estimate’s worst miss is the halophosphate tube, whose colour trouble lies in its long-wave phosphor rather than in the blue-green gap both channels read. The census’s lamps differ at long wavelengths too: a tube’s orange and red lines, an LED’s broad phosphor tail, a lamp with a deep-red emitter.
The calculation is a third narrow channel swept from 580 to 650 nanometres, its departure added to the ratio’s, scored by leaving each lamp out and by the halophosphate tube’s own miss. The prediction is that a channel near 610 nanometres, where the tube’s phosphor has a shoulder the LEDs lack, halves the tube’s miss and takes the whole estimate to about ±0.12, while channels nearer 580 add nothing, for the reason a straightened 570 nm channel added nothing: they read the same phosphor the 450 nm channel already implies. If no long-wave channel helps, the tube’s error belongs to something no narrow channel sees, and ±0.14 is the floor two numbers reach.
Divide the readings, not the comparisons
The habit is about where in a calculation a ratio is taken.
A ratio is a good idea when two quantities share a factor that should be cancelled — a lamp’s brightness, a sensor’s gain. Taken of the raw readings, it cancels exactly those, and what is left is compared with a prediction. Taken of the departures, it cancels something else: the departures have already had the prediction removed, and what they share is the lamp’s overall degree of structure, which is the very thing the estimate needed.
The failure mode is to take a ratio after the step that turns readings into a measure of the answer, and so divide the answer out. The right ratio of two channels is the one that could have been taken before anyone knew what the channels were for.
Named alongside this one
Essays reaching for the same objects. Nobody chose these; they are what the index of named objects makes visible.
- A corner is corrected by one row calibration · camera raw · held-out validation · least-squares · white balance
- One row for every lamp costs the lamps that lose least calibration · camera raw · held-out validation · least-squares · white balance
- A matrix is fitted under one light calibration · camera raw · held-out validation · white balance
- The chart decides the profile calibration · camera raw · held-out validation · least-squares
- The chart was measured by an observer too calibration · camera raw · held-out validation · least-squares
- A camera profile is a fit camera raw · least-squares · white balance
The objects this essay names
Each one links to every other essay that touches it.
CalibrationCamera rawHeld-out validationLeast-squaresModelling assumptionPredictionRank correlationSpectral power distributionWhite balanceWhite LED