Planetary SER stacking, and the three things it insists you choose
Planetary takes exactly one local, uncompressed SER capture, validates its fixed 178-byte header before reading a single timestamp or frame sample, and then requires three explicit choices — a region, a reference frame and how many of the best frames to keep — because each of them changes what the picture is, and none of them can be inferred from the file.
Why keeping the worst frames makes the picture worse
A planet is bright enough to expose in milliseconds, so a capture is thousands of frames rather than dozens. The atmosphere is not steady across them: a few per cent are taken through a moment of calm air and are genuinely sharp, most are not, and averaging all of them averages the calm ones into the turbulent ones.
So the frames are ranked and only the best fraction is stacked. That is the whole idea, and everything below is about making the ranking mean something.
The header is read and checked before anything else
A SER file opens with a fixed 178-byte header describing the dimensions, the pixel depth and the colour layout. This mode validates all of it before reading a single timestamp or frame sample — because a capture whose header disagrees with its contents will otherwise be read as a plausible picture of the wrong thing, at the wrong size, in the wrong colour order.
Uncompressed MONO, RGB, or BGR where the file declares BGR. A layout it cannot name is a refusal rather than a guess about which two channels to swap.
The three choices, and why none of them has a default
- A region. An integer rectangle inside the capture, at least 7 × 7 pixels. It is required rather than measured because the whole ranking pass is admitted before the first frame is sampled — the memory a run needs is known in advance, which is what stops a thousand-frame capture from ending in a closed tab.
- A reference frame, by zero-based index. Every other frame is measured against it, so which one it is changes what "sharp" is measured relative to.
- How much to keep — Best 25%, Best 50% or Best 100% — combined by mean or sigma-clipped mean. You may ask for more than one and compare them, which is the honest way to find out what your night's seeing actually was.
What it refuses, by name
- A region that reaches outside the capture, or is smaller than 7 × 7.
- A reference index that is not a frame of this file.
- A sigma-clipped variant that would select fewer than eight frames. Best 25% of a twenty-frame capture is five, and a spread estimated from five samples then used to discard one of them produces a cleaner-looking result by removing information.
- Anything compressed, and any container that is not a SER.
- A capture too large for the memory this device will give it — said before the run, with the sizes that would fit, rather than discovered by the tab closing.
Try it on your own night
Open the stacker Nothing is uploaded and nothing is installed; the frames are read in your browser.