Why star trails come out dotted, and the arithmetic that fixes it

Dotted or beaded star trails are exposure gaps: the interval between frames is longer than the exposure, so the shutter is closed while the sky keeps turning. They are not a stacking bug or a focus problem.

On this page

The cause, in one line

If your interval is 32 seconds and your exposure is 30 seconds, the camera recorded 30 seconds of movement and missed 2. Repeat that across a complete, regularly timed sequence and each trail is a row of 30-second dashes separated by 2-second holes. In that regular case the holes are proportional to interval minus exposure; dropped frames or a varying timer create larger, irregular gaps.

The usual sources of that difference are the write time to the card, long-exposure noise reduction (which takes a dark frame after every shot and doubles your dead time), and an intervalometer set to a round number that happens to be a second or two longer than the shutter.

How long the gap is, in pixels

This is worth doing once by hand, because after that you will never accept a slider for it again.

  1. Gap in seconds = interval − exposure. Both are in your EXIF: the interval is the difference between two consecutive DateTimeOriginal values, the exposure is ExposureTime.
  2. Gap in arcseconds of sky = gap × 15.041. The sky turns 360° in a sidereal day, which is 15.041 arcseconds every second, near the celestial equator.
  3. Image scale = 206265 × (sensor width ÷ image width) ÷ focal length, in arcseconds per pixel. Focal length is in the EXIF; sensor width comes from FocalPlaneXResolution or from the 35 mm equivalent focal length.
  4. Gap in pixels = arcseconds ÷ arcseconds-per-pixel.

A worked example. A 24-megapixel full-frame camera at 24 mm: 206265 × (36 ÷ 6000) ÷ 24 = 51.6 arcseconds per pixel. With a 30-second exposure on a 32-second interval, the gap is 2 seconds = 30.1 arcseconds of sky = 0.58 pixels. That is invisible, and a set like that needs no gap filling at all.

Now the same camera with long-exposure noise reduction on, so the interval is 62 seconds: the gap is 32 seconds = 481 arcseconds = 9.3 pixels. That is a clearly beaded trail, and the fix at capture time is one menu setting.

The fix while you are still outside

Turn off long-exposure noise reduction
It doubles your dead time by taking a dark frame after every exposure. For trails you do not need it — stuck pixels are better removed by their persistence across the whole sequence, which needs no dark frames at all and is what this tool does.
Set the interval as close to the exposure as the camera will allow
Use the shortest interval the camera and card can sustain, then verify it from consecutive EXIF timestamps. A card that cannot keep up may drop a frame, which makes a much larger gap.
Shoot smaller RAW or lossless 16-bit if the card is the bottleneck
Write time scales with file size. Our earlier 8-bit detection comparison used a broken noise estimate and is being re-measured, so it is not a basis for throwing precision away. JPEG chroma subsampling also changes the colour of tiny stars in the controlled browser fixture. If faint detection or trail colour matters, use smaller RAW or lossless 16-bit TIFF/PNG while the 8-bit result remains unsettled.
Use the camera's own interval timer rather than a cable release with a fixed cycle
An external timer that fires every 32.0 seconds against a 30-second shutter will drift in and out of sync with the write, producing an irregular gap that is harder to fill than a constant one.

The fix afterwards, and its limits

Gap filling extends each recorded dash along the direction the trail is travelling until it meets the next one. It works, and it is what makes a beaded sequence look continuous. What it cannot do is invent the sky that was not recorded: if an aircraft crossed during a gap, or a star brightened during it, that is simply not in your data.

It must also not extend what is not a star. A warm pixel, bright in some frames and not in others, is a single coloured dot in a lighten stack, and a fill along the arc draws that dot out into a short red, green or blue dash. With RAW frames, this tool looks for each one in the sensor mosaic, where it is one photosite standing alone above its neighbours, and sets it back to the sky around it before the fill runs; a spot the stack shows as part of a trail, in more than one colour, or repeated one interval along the arc is left alone as a star.

Nor may it extend the sky. On a noisy sky the brightest of a few noise samples on either side of a pixel is nearly always brighter than the pixel itself, so a fill that asks only whether a pixel is darker than both sides lifts most of the sky and draws its noise out into short streaks along the arc. This tool fills a gap only where both sides stand above the sky around them by three times that sky's own noise, so a trail too faint to clear it stays dotted rather than being drawn out of the noise.

Two details this tool handles that an unlabelled slider cannot. The direction is the arc itself: the tool fits where the sky’s axis is from your own stars, so it fills along each trail’s circle around the pole and nowhere else, which stays right where a trail is faint, dotted or crossed by another. The length is one interval’s worth of the sky’s turning — the same angle everywhere, so a short step near the pole and a long one at the edge of the frame, which no single slider value can be. When the stars do not give a usable axis, the fill falls back to the arithmetic above for its length and estimates the direction locally from the stacked trails; that fallback length, with its arithmetic, is shown before the run.

Extending in all directions equally is what a plain circular blur-and-brighten does, and it is why so many gap-filled trails come out looking thick and soft. A trail is one or two pixels wide; the fill should make it longer, not fatter.

What that looks like on a real night

Below is one 15-second frame, then the whole night’s 389 frames — about two hours of sky on a Sony A7C — stacked by this tool on its default settings: equalised lighten, gaps filled along the arcs, aircraft and satellites cleaned. The interval was 18 seconds against a 15-second shutter, so the gap is 3 seconds: short enough that the arcs come out very nearly continuous rather than beaded. Drag the slider.

About two hours of star trails as concentric arcs around the celestial pole, over a field and a dark treeline, with no aircraft line left across them. One 15-second frame of the same sky: stars as points over the same treeline, with a single short aircraft dash near the centre.

Watch two things across the wipe: every star point on the single frame becomes an arc, and the one short dash near the middle of the single frame — an aircraft or satellite — does not become a line across the arcs, because the trail cleaner found it in its frames and repaired only the line.

Plan the interval before the shoot, or open your sequence in the tool — it prints the interval, the exposure, the gap in seconds and the radius in pixels, with the arithmetic beside it, before it stacks anything. Or read why a plain lighten stack loses faint trails and what runs on a Mac.

Code-native exposure diagram showing thirty recorded seconds followed by a thirty-two-second gap, with both arc lengths converted into pixels.
Code-native fixed-input geometry: recorded arc, missed arc and the exact image-scale arithmetic. It is not camera output or a processing benchmark.