💬Comments welcome. To leave a note, select any text and click the note / highlight button that pops up — or open the panel with the tab at the top-right (‹). Notes are visible only inside our private review group.
💡 In a hurry? Jump to this chapter’s 1 big lesson ↓

10.12 Lucky imaging (planetary / lunar astro)

The deep-sky chapter ended on a contrast it left hanging. There, the enemy was photon and read noise, and the answer was to average everything — hundreds of subs, hours of integration, the $1/\sqrt N$ law pushed to its physical limit to lift a galaxy out of near-nothing. But for the bright targets — the Moon and the planets — noise is not the problem at all. There is plenty of light. The problem is that the image will not hold still, and it will not stay sharp: the atmosphere smears and wobbles it on a millisecond timescale, and no amount of averaging fixes that. Average all of it and you get a soft blob.

Lucky imaging is the fix, and it is the same burst with the opposite combine rule. Instead of averaging every frame, shoot thousands of very fast frames — usually a high-frame-rate video — score each one by how sharp it is, keep only the sharpest few percent, and then align and stack the survivors. Selection buys sharpness; the stacking of the keepers buys back the signal-to-noise the short exposures gave up. It is a recombination of tools you already have, and it is the part's spine in its starkest form: capture a stack along the time axis, and defer the decision — here the decision is which frames to keep — until after capture, when you can see them all.

💡 The big lesson

Lucky imaging is selection feeding averaging: auto-curation wired into denoising-by-averaging. Shoot a huge burst, score and rank every frame by a sharpness metric, keep the lucky few percent where the atmosphere happened to settle, then align and stack those keepers ($1/\sqrt N$). The trade is the whole point — you swap hardware (adaptive optics: a wavefront sensor and a deformable mirror) for data and a sharpness metric. Capture is cheap and the atmosphere is free; the cleverness is all in deciding, afterward, which captures to trust. It is the time-axis instance of L14 · capture the full set, decide later, with the "decide" being literally "throw most of it away" — and it works only because bright targets give you enough light to afford thousands of frames you can discard.

10.12.1 Atmospheric seeing — why one long exposure fails

Point a telescope at a planet and you are looking up through kilometres of turbulent air. The atmosphere is not a uniform sheet of glass; it is a churning stack of cells at slightly different temperatures, and therefore slightly different refractive indices. A star's wavefront, flat by the time it reaches the top of the atmosphere, gets scrambled on the way down — different patches of the wavefront are delayed by different amounts, so the image they form wanders and smears as the cells drift and boil. This is the seeing, and it changes on a timescale of milliseconds. The consequence for a long exposure is fatal: the shutter is open for the duration of thousands of these atmospheric states, so the recorded image is the time-average of thousands of differently-distorted instantaneous images. Mathematically, a single long exposure is the true scene convolved by the time-averaged seeing point-spread function (PSF),

$$ I_\text{long} \;\approx\; I * \overline{\text{PSF}}, $$

and $\overline{\text{PSF}}$ is a soft, broad blob — its width set by the atmosphere, not the telescope. No matter how large or how well-figured the mirror, a long ground-based exposure is permanently soft (Figure 10.12.2).

The escape is hidden in the word average. The long exposure is soft because it averages the seeing; but the instantaneous PSF is not soft — it is merely distorted, and differently distorted moment to moment. This is the key statistical fact behind the whole method, going back to the atmospheric-turbulence statistics of Fried (the coherence length $r_0$ that sets the seeing scale) and Hufnagel–Stanley: across a stream of very short exposures, the instantaneous PSF fluctuates, and a small fraction of those frames happen to catch the atmosphere nearly flat — close to diffraction-limited for that one instant. Those are the lucky frames the method is named for. The strategy writes itself: do not integrate over the turbulence, sample it fast enough to catch it standing still, and harvest the rare good moments.

10.12.2 Shoot thousands, keep the sharpest

So flip the capture strategy. Instead of one long integration, record a high-frame-rate video — thousands of short exposures, each frozen against the seeing — and treat it as a stack to be curated. The exposures are short enough that any single frame caught the atmosphere in essentially one state: some frames are badly distorted, most are mediocre, and a few are crisp. The task is to find the crisp ones, and that means putting a number on sharpness so the frames can be ranked.

The sharpness score is exactly the measure built for focal stacks: a region is sharp when it carries local high-frequency energy, and defocus or seeing-blur is a low-pass operation that destroys it. So score each frame by its gradient energy (or high-frequency power, or local contrast),

$$ s_i \;=\; \sum_{\mathbf{x}} \lVert \nabla I_i(\mathbf{x}) \rVert^2, $$

a single number per frame that is large for crisp frames and small for smeared ones. Then rank all the frames by $s_i$ and keep only the top $k\%$ — typically a brutal one to ten percent:

$$ \text{keep frame } i \iff s_i \in \operatorname{top\text{-}}k\,\{\,s_1, s_2, \dots, s_M\,\}. $$

Everything else is discarded. This is pure frame selection — "decide later" applied to the time axis, with the decision being which moments of atmosphere to trust (Figure 10.12.1).

It is worth seeing this for what it is: Auto curation in miniature. There the problem was ranking a large set of photos by a quality metric and surfacing the best; here the metric is sharpness and the set is the frames of a single video, but the move — score, rank, select — is identical. And it explains why lucky imaging is the planetary and lunar technique rather than a deep-sky one. To afford throwing away ninety-plus percent of your frames, each frame must already carry enough signal to be worth scoring, which means a bright target. The Moon and the planets are floodlit by comparison with a galaxy; they give you the photons to run a fast camera and the luxury of discarding most of what it records.

fig-lucky-imaging
Figure 10.12.1. Selection, then averaging — the whole method on one strip. Top row: a sequence of short Moon/planet frames straight from the video, each wobbled and smeared a little differently by the seeing; a sharpness score $s_i = \sum\lVert\nabla I_i\rVert^2$ is printed under each. Middle: the frames sorted by score, with the worst (low $s_i$) struck through and discarded and only the sharpest few percent retained. Bottom: the surviving keepers, registered sub-pixel and stacked, resolving into one crisp result — selection buys the sharpness, averaging the keepers buys the signal-to-noise.

10.12.3 Align and stack the survivors

Selection is only half the method. The keepers are the sharp frames, but they are not the same frame: the atmosphere that left each one crisp also shifted and gently warped it, so a survivor is the scene displaced by some small, unknown offset $\mathbf{d}_i$ (and, strictly, locally distorted). Stack them as they sit and the detail will not line up — you would average a set of crisp-but-misplaced images into a blur, throwing away the sharpness you just worked to select. So the survivors must be registered before they are combined, sub-pixel, frame to frame. This is the translational (and locally elastic) alignment of image alignment: estimate each frame's shift $\mathbf{d}_i$ against a reference, then resample so every keeper is brought onto a common grid.

With the keepers aligned, the combine is the plainest tool in the part — the average from Denoising by averaging:

$$ \bar I(\mathbf{x}) \;=\; \frac{1}{N} \sum_{i=1}^{N} I_i(\mathbf{x} - \mathbf{d}_i). $$

Because the surviving frames all show the same sharp scene once registered, the signal adds coherently while their independent noise falls as $1/\sqrt N$ — the exact law that drives the rest of this part. This is why selection alone is not enough: a single lucky frame is sharp but noisy (it was, after all, a very short exposure), and averaging $N$ of them recovers the signal-to-noise a long integration would have had, without the seeing-blur a long integration would have suffered.

That division of labour is the entire method, and it is worth stating cleanly because it is what makes lucky imaging more than either of its parts. Selection buys sharpness — only the flat-atmosphere frames survive, so the stack never contains a smeared frame to soften it. Stacking buys signal-to-noise — averaging the survivors beats down the shot and read noise of the individual short exposures. Neither step alone would do: average everything and you have a long exposure (sharp frames diluted by smeared ones); keep one lucky frame and you have a sharp but noisy image. Together they give a sharp and clean result. In practice this is exactly what the amateur planetary-imaging toolchain does — AutoStakkert! and RegiStax score, rank, align, and stack a planetary video automatically, often refining the alignment patch-by-patch and sometimes sharpening the stacked result afterward with wavelets.

10.12.4 A poor man's adaptive optics

Set against the alternative, the payoff is striking. The "proper" way to beat atmospheric seeing is adaptive optics: sense the distorted wavefront in real time with a wavefront sensor, and cancel it with a deformable mirror that flexes hundreds of times a second to flatten the incoming light before it reaches the detector. It works beautifully and it is extraordinarily expensive and complex. Lucky imaging reaches toward the same goal — ground-based images approaching the telescope's diffraction limit — with none of that hardware: just a fast camera, a sharpness metric, and patience. The atmosphere is doing the same flattening, only occasionally and by chance instead of continuously and on demand; lucky imaging simply waits for it to happen and keeps the frames where it did. This is the demonstration of Law, Mackay & Baldwin (2006), who reached near-diffraction-limited resolution on a ground-based telescope this way. It trades hardware — the deformable mirror and wavefront sensor — for data and selection: thousands of cheap frames and a metric to pick the good ones (Figure 10.12.2).

But the trade has honest limits, and they follow directly from how it works. First, it needs a bright target, for the reason given above — short exposures and a few-percent keep rate only make sense when you have photons to spare. This rules out faint deep-sky objects, where you cannot afford to discard frames and where the real enemy was noise anyway (hence the opposite, average-everything strategy of the previous chapter). Second, the seeing is only locally flat: a single instantaneous wavefront is reasonably uniform over a small angular patch — the isoplanatic patch — but not across a wide field, where different parts of the image are distorted differently at the same instant. A frame that is lucky in one corner may be unlucky in another, so the method shines on small fields and degrades as the field grows. Between them, these two limits draw the technique's natural home almost exactly: bright, small targets — which is to say the Moon and the planets, where lucky imaging has become the standard amateur road to sharp results, and a vivid closing illustration of capturing the full set and deciding, frame by frame, later.

fig-lucky-vs-longexposure
Figure 10.12.2. Same turbulence, two combine rules. Left: a single long exposure of a planet — the shutter integrates over thousands of seeing states, so the result is the scene convolved by the time-averaged seeing PSF, a soft, detail-free blob no matter how good the telescope. Right: lucky imaging on the same atmosphere — score thousands of short frames, keep the sharpest few percent, register and stack them — recovering crisp surface detail (bands, craters, the Cassini division) the long exposure could never resolve. The contrast is entirely in the combine rule: average all of it (left) versus select-then-average (right).

Big lessons of this chapter

The recurring principles from this chapter, gathered for review.

💡 The big lesson

Lucky imaging is selection feeding averaging: auto-curation wired into denoising-by-averaging. Shoot a huge burst, score and rank every frame by a sharpness metric, keep the lucky few percent where the atmosphere happened to settle, then align and stack those keepers ($1/\sqrt N$). The trade is the whole point — you swap hardware (adaptive optics: a wavefront sensor and a deformable mirror) for data and a sharpness metric. Capture is cheap and the atmosphere is free; the cleverness is all in deciding, afterward, which captures to trust. It is the time-axis instance of L14 · capture the full set, decide later, with the "decide" being literally "throw most of it away" — and it works only because bright targets give you enough light to afford thousands of frames you can discard.