Your First DSLR Stack: From a Folder of Raw Files to a Picture

What to put in which folder, what the software detects on its own, and what two real sessions - 111 frames of the Pleiades and 134 of Orion - reported at every step.

A camera on a tracker produces a memory card full of raw files, and the gap between that and a photograph is where most people stall. Not because the steps are hard, but because nobody says plainly what to put where and what happens next. This post does, using two real sessions - a Canon on the Pleiades and the same camera on Orion - and quoting what the software actually reported at each stage.

The folder

Everything about calibration is decided by where a file sits. This is the layout every tutorial teaches and every stacking program reads:

Pleiades/
  lights/    111 x IMG_7156.CR2 ...   the photographs of the sky
  darks/      37 x IMG_7260.CR2 ...   same exposure, same ISO, lens cap on
  flats/      17 x IMG_7290.CR2 ...   a plain, evenly lit surface
  biases/     17 x IMG_7724.CR2 ...   the shortest exposure the camera allows, cap on

Drop the top folder onto Akastroid. It reads the four subfolders by name (dark/darks, flat/flats, bias/biases/offset all work), and it reports what it found before doing anything:

Calibrating with 37 darks, 17 flats, 17 bias.

A raw file has no header field saying what kind of frame it is, so the folder is the declaration. Put a dark in lights/ and it will be graded as a very bad photograph of nothing and rejected, which is the right outcome but a confusing one.

If you have only lights, that is fine. The session runs without calibration and says so:

No calibration frames detected. Continuing with light-frame optimization.

Hot pixels are then repaired statistically from the frames themselves, before demosaicing - which matters, because once a hot pixel has been interpolated into its neighbours it is no longer an isolated speck and cannot be found. (What each calibration frame actually fixes.)

What happens to the darks

Thirty-seven 24-megapixel darks, held in memory at once as floating point, is eleven gigabytes. Akastroid builds the master dark as a median when the set fits in a couple of gigabytes and as a running mean when it does not; on a set this size the difference in the result is nothing you will see.

It also checks that the darks match the lights. A dark shot at a different exposure or ISO is a measurement of a different sensor state, and subtracting it leaves a residual pattern. If they do not match, the session says so, applies them anyway, and tells you to reshoot:

The darks do not match the lights: the darks were exposed for 30s and the lights for 120s …

On both real sessions they matched and no warning appeared.

Grading, and the frames you lose

Every light is measured: how many stars it has, how sharp they are, how round, how bright the sky is, whether a satellite crossed it. The frames are then scored against each other, because “good focus” only means anything relative to the rest of the night.

The Pleiades session had 111 frames and 67 were selected; the rest scored below the session’s own threshold - soft focus, a passing cloud - and the quality verdict was “Challenging”. Orion: 134 frames, 119 selected. Both sessions carried the same warning:

Stars are slightly oval across the whole session (eccentricity 0.76). That is the optics rather than the tracking - coma, field curvature or camera tilt - so no frames were rejected for it.

That last clause is the important one. Oval stars in every frame are the lens, not a tracking error, and rejecting frames for a fault they all share would leave nothing to stack. The app tells you once, at session level, and moves on.

Registration

Frames are aligned on star patterns, not on the mount’s idea of where it pointed. A camera lens distorts the field slightly - the corners are stretched a little differently from the centre - so after the usual rotation-and-shift fit, a second pass allows the fit to stretch too, and keeps that only if it actually lands the corner stars closer. A handful of frames in each session could not be matched at all (three of the Pleiades, seven of Orion) and were excluded with their names in the log.

Integration

Here the two sessions diverged, and the log says why:

Pleiades: Integration: Sigma clipping - 64 frames - deep enough for sigma clipping to remove trails cleanly

Orion: Integration: Linear fit clipping - 112 frames whose sky level drifted through the session - fitting each pixel’s stack rejects outliers without mistaking the drift for one

The Orion sky brightened through the night. A plain sigma clip treats every frame as a sample of the same sky, so a smooth drift looks like the earliest and latest frames being outliers - and those are often the best data. Linear-fit clipping fits the drift first and rejects what is left over. Orion rejected 8.7% of pixel samples (a DSLR’s hot-pixel population plus the drift); the Pleiades 3.4%.

Neither session was drizzled, and the log says why for that too: stars spanned 3.6 and 3.9 pixels, which is sampled finely enough that a finer grid would enlarge the file without recovering detail.

The border

Field rotation and dithering leave a ragged edge where only a few frames overlap. That edge is trimmed to where it actually is, not by a fixed percentage:

Trimmed the frame edge where field rotation left partial coverage - 5 px left, 40 right, 0 top, 43 bottom.

Colour and gradient

Both sessions had the background gradient removed and the colour balanced from the stars in the field - 1473 on the Pleiades, 1500 on Orion. The Pleiades needed a quadratic gradient model rather than a plane, because the lens vignettes red and blue slightly differently from green and the flats correct brightness more exactly than colour; the app detects that from the residual and steps up on its own. (Why the reference star matters for the balance.)

Finishing

The stretch, noise reduction, star handling and contrast are tuned from a measurement of the finished linear stack - how much of the frame is sky, how bright the brightest structure is against the noise, how clean the stack is - and the log lists each decision:

Tuned background - 95% of the frame is empty sky, so the background is set darker to keep it from washing out Tuned highlights - the frame has a very bright core, so highlight protection is increased to keep its structure

Every one of those has a slider in the Adjust tab, on AUTO until you move it.

What you get

Pleiades: 64 frames, noise reduced 4.5× against a single frame, the reflection nebulosity around Merope and Maia visible, stars round to the corners. Orion: 112 frames, noise reduced 6.5×, the Trapezium region held short of white, the Running Man blue, the dust lanes clean.

Neither is a competition image. Both are photographs, from a folder of raw files, in about four minutes, with a log that says what was done and why. That is the first stack. The second one is where you start reading the log and disagreeing with it.

The short version

  • lights/ darks/ flats/ biases/ under one folder. Drop the folder.
  • The app reports what it found and whether the darks match. Read that line.
  • Frames are scored against the session; a fault every frame shares is not a reason to reject any.
  • The integration method is chosen from the data, and the log tells you which and why.
  • Every automatic decision has a slider. Start on AUTO.

Try it on your own data

Akastroid does everything in this guide automatically, and tells you what it did.

Download Akastroid - free