Why a plain lighten stack loses your faintest star trails

A plain lighten stack loses faint star trails when sky brightness changes between frames, because the brightest background sets the floor; equalising each frame's sky before blending removes that bias. Lighten is still a useful blend: it keeps the brightest value each pixel saw, and its measurable failure is in the sky behind the stars, not in the stars themselves.

On this page

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. A star fainter than that sky-level difference is at risk of being hidden wherever a brighter-background frame sets the maximum.

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; in that measured detection comparison, stars below that drift were lost.

The fix, and what it is worth

Colour Star Trails in Equalised lighten now balances each frame with one background offset per colour channel and one shared frame-wide noise scale. It does not subtract a position-dependent sky surface from the picture. Mono and other blends retain their existing methods.

Historical measurements. The results below used the earlier local-background method. They have not been re-measured for colour frame-wide normalization v2.

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.

Historical local-background comparison: faintest recoverable star, 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.

These historical gains varied with the measured night. The current colour method has not yet been benchmarked with the same injection-and-recovery study. The tool's sky-drift measurement describes your inputs; it is not a prediction of a particular recovery gain.

Star Trails workspace with twelve generated PNGs selected and a separate Example only owner-photo comparison in the center
Synthetic intake demonstration; separate photo example. Twelve generated sample frames are selected in the workspace. The central “Example only” comparison uses a separate 64-photo owner sequence; it is not the result of these selected files. The capture shows intake and recipe controls only, with no completed stack, camera result or image-quality benchmark.
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.
Historical example using the earlier local-background method. 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

In that historical comparison, the middle column tracks the gain: a brighter frame's background can hide faint stars when taking a plain maximum. The measured gain was smaller on the steady night and larger on the night with greater sky drift. This relationship does not establish the gain of normalization v2.

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: the historical study used 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:

  • Whether 8-bit input costs anything. Our own harness had a defect on quantised input — where a sky sits on a single 8-bit code, the noise estimate measured the background's curvature instead of its noise, which inflated every 8-bit detection threshold. The comparison is being re-run with that fixed.
  • Whether the background is better subtracted in linear light or in the values as stored. Our measurement said linear light was slightly better; on two other instruments it was slightly worse. The difference is inside the noise on one and outside it on the others, so it is unsettled.

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.

Your first star trail, step by step

  1. Pick the photos. In Star trails, drop the night's exposures on Drop your night's exposures here, or use …or choose a whole folder. Nothing is uploaded.
  2. Read the plan card. Just above Start stacking it says the picture size and an honest time for this device (measured on your first photo or a first estimate for this device), and how the trails will be cleaned — when it says Trail cleaning: simple, it says why.
  3. Start. Press Start stacking; one progress bar covers the whole night.
  4. Look at the picture first. When it says Done, the picture comes first, with what was used and what was not applied, and why, under it. A line left on it: Remove a line, draw along it, Apply changes.
  5. Export. Export… then Download PNG (or TIFF, if you chose it under Picture format).

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.