Why star trails come out dotted, and the arithmetic that fixes it
Dashed or beaded trails are not a stacking bug and not a focus problem. They are a record of the seconds between your exposures, when the sky kept turning and the shutter was shut.
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 two hundred times and every trail is a row of 30-second dashes separated by 2-second holes. The holes are proportional to interval minus exposure, and nothing else.
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.
-
Gap in seconds = interval − exposure. Both are in your EXIF: the interval is the difference
between two consecutive
DateTimeOriginalvalues, the exposure isExposureTime. - 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.
-
Image scale = 206265 × (sensor width ÷ image width) ÷ focal length, in arcseconds per pixel.
Focal length is in the EXIF; sensor width comes from
FocalPlaneXResolutionor from the 35 mm equivalent focal length. - 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
- One second of margin is usually enough. A card that cannot keep up will drop frames instead, which is worse.
- Shoot JPEG or small RAW if the card is the bottleneck
- Write time scales with file size. On real frames the difference between 8-bit uncompressed and linear 16-bit measured 0.97× — nothing — so this costs less than people fear. JPEG compression itself does cost 1.14–1.30×. It costs star colour more: most cameras write JPEG with the colour at half resolution, which averages a two-pixel star's colour with the sky beside it before the file is saved. Measured against stars of known colour that shifts them by 0.45–0.83, against 0.02–0.04 from a lossless file, and nothing done afterwards recovers it. If the colour of the trails matters, this is the one place to spend the card.
- 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.
Two details this tool handles that a slider cannot. The length comes from the arithmetic above rather than from your eye, so it is right the first time. And the direction is estimated locally across the frame, because star trails are concentric arcs around the celestial pole — a trail near the pole runs at a completely different angle from one near the horizon, and extending everything in one direction, or in all directions equally, either misses or thickens.
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.
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.