Why a plain lighten stack loses your faintest star trails

Every star-trail stacker combines frames the same way: at each pixel it keeps the brightest value it saw. That is the right idea and it has one specific, measurable failure, and the failure is not in the stars — it is in the sky behind them.

The sky is not the same brightness all night

Light pollution scatters off humidity that changes hour by hour. The moon rises. Traffic below you thins out or picks up. A thin high cloud passes and lifts the whole background for four frames. So the sky level in frame 1 and the sky level in frame 200 are not the same number, and on a bad night they are not close.

Now think about what maximum does with that. At a pixel with no star in it, the value kept is the sky level of whichever frame had the brightest sky. Not the average. Not the typical. The worst one. And that happens at every empty pixel, so the finished stack's background is very nearly the worst frame's sky.

A star has to beat that floor to appear. Any star fainter than the difference between your typical sky and your brightest sky is simply not in the picture, in any of the frames, no matter how many you took.

How much of the stack one frame decides

This was measured rather than argued. The data is 38 real 16-second exposures from an all-sky camera in Copenhagen — a genuinely light-polluted urban sky — published on Zenodo as record 3736793 under CC-BY-4.0. Nothing here is simulated: the noise, the gradient, the stuck pixels and the streetlight are all real.

Share of sky pixels won by the brightest-sky frames, 38 real frames
Share of the stack's sky pixels won by…Measured
the single brightest-sky frame53.6%
the brightest four frames89.4%
what you would expect if all 38 shared it evenly2.6%

Scroll the table sideways for the remaining columns.

One frame in thirty-eight decided more than half the picture. Across that night the background drifted by seven times the frame-to-frame noise, and every star fainter than that drift was erased.

The fix, and what it is worth

Before taking the maximum, subtract each frame's own background — a coarse model of the sky in that frame, block medians on a grid too coarse to follow a star. Then every frame contributes on the same footing, and the floor drops to the noise instead of to the worst sky.

To put a number on it, point sources of known brightness were injected onto trajectories copied from real tracked stars in the same data, and each method's detection threshold was calibrated separately so that both make false detections at the same rate. Neither method can win by being noisier or more aggressively stretched. The statistic is the faintest star that is still recovered half the time.

Faintest recoverable star, plain lighten against background equalised, by instrument
Instrument and nightSky driftGain over plain lightenMore real sources
Canon 5D Mark IV, 24 mm rectilinear, 32 frames, steady night4.1 σ1.34×+19.7%
ZWO all-sky camera, Copenhagen, 38 frames6.9 σ≈2×+15.4%
Sony A7S fisheye, 214 frames, unstable night25.7 σ4.48×+1142%

Scroll the table sideways for the remaining columns.

The direction replicated on all three instruments, by two independent metrics. The size did not: it ranges from 1.34× — about a third of a magnitude — to 4.48×, which is 1.63 magnitudes, and what it tracks is how unstable the sky was between frames, not which camera took the pictures.

That is why this site quotes no single figure and why the tool measures your own drift instead. A number taken from someone else's night is a number your night will not reproduce. If your sequence is steady, the honest answer is that this will help a little; if your sky moved, it will help a great deal, and the tool says which of those you are holding before you download anything.

Two stacks of the same 38 real frames side by side. The left, a plain lighten stack, shows a bright uneven background with only the brighter trails visible. The right, with each frame's background equalised first, shows a flat background and many more faint trails.
The same 38 real frames, from the middle row of the table. Left: plain lighten. Right: each frame's sky equalised first. Derived from Zenodo record 3736793, © its authors, CC-BY-4.0.

Why the size tracks the night and not the camera

Look at the middle column of the table again. A lighten stack's background floor is set by the frame with the brightest sky, so what equalising recovers is exactly the stars that were buried under the difference between a typical frame and the worst one. On a steady night that difference is small, so there is little to recover. On a night where the sky brightened by twenty-five times the frame-to-frame noise, almost everything faint was buried, and equalising gets almost all of it back.

The same relationship shows up inside a single corpus. On the all-sky camera's worst night the brightest frame won 65.6% of the sky pixels and the plain stack found 12 real sources against 173 for the equalised one; on its steadier night it won 51.3% and the counts were 3,574 against 4,738.

What is measured, and what is still in doubt

Three instruments, four nights, two independent metrics — an injection-and-recovery test at a matched false-alarm rate, and a plain count of real point sources with nothing injected at all. Both agree in direction every time. The corpora are public: Zenodo record 3736793 and record 3754088 for the all-sky camera, plus a Canon and a Sony sequence, all under CC-BY-4.0.

Two results quoted on this page previously are being re-measured and are not settled, and saying so is cheaper than being caught:

Neither touches the result at the top of this page. The background-equalisation gain is measured the same way on every arm, so a threshold error that applies to all of them equally cannot manufacture it — and the injection-free source counts, which use no threshold calibration at all, agree.

Two things the measurement ruled out

Per-pixel outlier rejection destroys trails
Throwing away the brightest frame at each pixel, to remove satellites, never reached 50% recovery at any brightness. A star trail is a single-frame outlier at every pixel it crosses; for a star at the detection limit, brightest minus second-brightest is about 3.5 sigma, which is indistinguishable from a satellite. Aircraft have to be found as long thin streaks within one exposure instead.
Percentile and mean blends are worse, not safer
A 90th-percentile blend recovered 1.7% and a mean 1.0%, where the maximum recovered 31%, for the same reason: a trail occupies each pixel in one frame out of thirty-eight, so every statistic except the maximum averages it away.

Try it on your own night — the tool shows you your files' own worst case, side by side, rather than an example of ours. Or read why trails come out dotted and what runs on a Mac.