Removing aircraft and satellite trails without losing the meteors
Most stackers remove an aeroplane by discarding whatever is bright and inconsistent between frames, which is also the definition of a meteor; this finds the track itself and repairs the hole from a neighbouring frame.
What it looks like on a real frame
These three panels are one exposure from a public observatory sequence, put through this tool's own engine. Nothing is illustrated or redrawn: the outline is where the detector said the track was, and the third panel is the difference between the frame as recorded and the frame after repair.
Drag, or use the arrow keys. The two frames differ by 667 samples out of 129,600 in this crop, so the wipe is a fair test of how little a single frame changes — and the panels below are where that half per cent is visible.
Frames from the Yebes Observatory All Sky Gallery, 13 May 2021 — image property of Yebes Observatory, used with credit. The original sequence is public, so every number below can be reproduced against it.
Why the honest picture is undramatic
A before/after of a single frame barely moves, and it would be easy to pick a more flattering example or to brighten the difference until it looked impressive. Here is the real figure instead: on this endpoint the repair changed 667 of 3,273 masked samples. One frame carries one dash of a dashed trail; the rest of that aeroplane is in the frames either side.
The number worth having is a different one. Of the 3,273 samples the mask covered, 3,273 — every single one — matched an observed donor exactly: not an interpolation, not a blur, but the sky as another frame of the same night actually recorded it. Zero samples came out above the donor and zero below it.
What that costs, and what the usual method costs instead
The ordinary approach is sigma rejection: compare each pixel across the sequence and discard the outliers. It works, and it removes every transient in the night with the same stroke — the meteor you waited four hours for, the Iridium flare, the satellite pass you wanted. There is no setting that keeps one and not the other, because to the arithmetic they are the same event.
Finding the track first means the decision is about this object: how long it is, how straight, how it moves between frames, whether its brightness flickers at the rate an anti-collision light is required to. A meteor fails those tests and stays.
And since this week, a second opinion that finds three times as many
Everything above describes a matched filter, and a matched filter has a shape it cannot escape. Measured against 740 trails drawn by somebody with no stake in the answer, on 925 frames chosen by somebody else, it surfaces 190 of them. Turning its sensitivity all the way up raises that to 260 and doubles the false alarms — and at every setting, for more than half the labels, its best guess does not come near the trail at all. That is a property of the method, not of a threshold, so no dial fixes it.
So there is now a second detector, off until you ask for it: a small network trained on a few thousand hand-labelled frames, which looks at each of your frames on its own. On the same 925 frames, on photographs it had never seen, it surfaces 602 — and raises fewer false alarms doing it, 79 frames against 106.
| What is looking | Trails found | How much of one it covers | Clean frames wrongly flagged |
|---|---|---|---|
| The ordinary search, careful | 190 of 740 | 0% | 106 of 434 |
| The ordinary search, eager | 260 of 740 | 0% | 152 of 434 |
| The trained model | 602 of 740 | 95% | 79 of 434 |
| Both together | 634 of 740 | 96% | 118 of 434 |
The middle column is the one worth staring at. The ordinary search finds trails; it does not get close to the ones it misses. The model covers almost all of the trail it points at, which is what makes its answer usable rather than merely present.
It is not allowed to remove anything. It sees one frame at a time, never the one before or after, so it has none of the evidence that earns the right to erase a pixel — no donor frame, no strobe gap, no track that persisted across three exposures. And it cannot tell an aircraft from a satellite either: every one of the 3,926 trails it learned from carried a single label that says only a track is here.
What it does instead is say where to look. Where it points, the ordinary search lowers its own bar and measures — and then applies every test it applies anywhere else: the cross-section has to be wider than a star, the gaps have to be short enough for an anti-collision light, a neighbouring frame has to be able to supply the sky underneath. A track can be removed after that, but on the search's evidence and never on the model's. Anything it points at that the search then declines is still on the review list for you.
The effect that surprised us most was not the trails it adds but the ones it completes. Left alone the search often finds the bright middle of an aeroplane and loses both ends, because the windows covering them score below its bar — so the mask covers part of a trail and leaves the rest. On a measured case the same frame at the same sensitivity went from 140 pixels of a 240-pixel trail to the whole of it.
What that is worth against the alternative you would otherwise reach for
If a night has traffic in it, the move without a model is to turn the sensitivity up. Measured on the same 925 frames, that is the worse of the two by every column at once:
| Careful | Careful + the model | The dial at medium | |
|---|---|---|---|
| Trails found | 190 | 243 | 231 |
| Trails removed for you | 140 | 179 | 148 |
| Clean frames erased without asking | 39 | 34 | 55 |
So the model at the careful setting finds more than the dial does, removes more, and erases twenty-one fewer clean frames than turning the dial up — and five fewer than leaving it alone. That is why the advice is to leave the sensitivity where it is and tick the box instead.
The 602 further up this page and the 243 here answer different questions, and both are true. 602 is what you are shown: the model's own candidates are on the review list whatever the search made of them. 243 is what the search itself accepted after measuring where the model pointed, and 179 is what it removed without needing to ask.
What it costs: about 14 MB downloaded the first time you tick the box, and your frames read a second time. Nothing is downloaded until you ask. The full measurement, the criterion written down before the numbers existed, and what the corpus cannot support are in the receipts linked from the foot of this page.
How the detector actually works, and what it refuses to do
A threshold cannot see a faint trail. Summing along a line can.
The first version of this thresholded the residual at 4σ and labelled connected components. That fails twice over, and both were measured on real frames rather than argued. A connected component breaks at a gap: an aircraft's strobe flashes 40–100 times a minute, so in a 30-second exposure the light is a row of dashes, and labelling turns one aeroplane into forty specks that each fail the length test. And a threshold-then-label detector cannot see anything below its threshold — so a faint trail is invisible however long it is.
Summing along a line recovers √L. A 1.4σ-per-pixel streak over 80 px is a 12σ event once you add it up, and a 4σ threshold never sees a pixel of it. So the search is a matched filter along straight segments — a windowed Radon transform — and the interesting work is in the verifier, because everything a matched filter finds that is bright is also a star.
It will not remove what it cannot repair
A mask is only applied where a neighbouring frame can supply the sky underneath. If no donor exists the candidate is reported and left alone, with the reason given, rather than being cut out and filled with a guess. And if the detector believes a large part of the frame is aircraft, it concludes that the detector is wrong about that frame and removes nothing.
What it has never been able to tell you
Whether a track was an aeroplane or a satellite. Two attempts failed on the same obstacle: the labels available were morphology — somebody looked at a track and decided what it was — and rate, uniformity and gap did not separate them. Aircraft navigation lights are the first signal that ever pointed the right way, and two of two is a direction, not a rate.
The route out is not a better feature but better truth: for a frame whose time and place are known, which satellites were above the horizon and how fast each was crossing is computable from published orbital elements. That work is under way, and this page will carry the number when there is one worth carrying.
Which cameras and file types any of this has actually been measured on is a separate question, and it has its own page: what it can read, and what has been through it.
Try it on your own night
Open the stacker Nothing is uploaded and nothing is installed; the frames are read in your browser.