← All tutorials · Lumina

Tutorial 11 of 12

Stack astrophotos in Astro Lab

Intermediate 10 min

Add light, dark, flat and bias frames, check stars and alignment, stack with sigma clipping, stretch the result and export a linear FITS or a 16-bit PNG.

Open Astro Lab

Choose Astro Lab on Lumina's editing rail or in the Tools panel, or open /app#astro directly. Astro Lab works on your device: frames are read in a background worker and never uploaded. They stay in memory while Astro Lab is open, so download what you need before you close it.

To try everything first, choose Load synthetic sample. Lumina generates eight raw RGGB light frames of a synthetic star field with small shifts and rotations, a satellite trail in one frame, a sky gradient and vignetting, plus four dark, four flat and four bias frames. The sample is computed, not photographed.

Add your frames

Use Add light frames for the sky exposures, and Add dark frames, Add flat frames and Add bias frames for calibration. You can also drop files onto the dialog: Lumina reads the FITS keyword IMAGETYP or names that contain darks, flats or bias. Every frame in the Frames list has a type menu, so you can correct it, and Remove takes a frame out.

FITS (.fits, .fit, .fts, also .fits.gz), 16-bit PNG and uncompressed TIFF keep the full precision of your camera. JPEG works, but it is gamma-encoded and compressed, so calibration is only approximate. All frames must have the same size. The limits are 64 frames, 24 megapixels per frame and 120 million light samples.

Check stars in one frame

Choose Show next to a frame. The View switches to Selected frame with stars, and Show detected stars draws a green circle around every detected star (orange for saturated stars). The line below the preview reports the number of stars, the median FWHM, HFR and roundness. Large FWHM or low roundness values point to focus, seeing or tracking problems — drop such frames before stacking.

Choose the processing settings

Under Processing:

  • Calibration and colour: Bayer pattern of raw frames is read from the FITS header by default; choose RGGB, BGGR, GRBG or GBRG for raw files without it, or None (mono data). Combine calibration frames builds the masters with the median by default.
  • Star detection: Detection threshold (σ) and Minimum star area (pixels) decide which peaks count as stars.
  • Registration: keep Align frames on their stars on. Transform is Shift, rotation and scale for normal sessions; Affine (also shear) helps with slight optical distortion. Reference frame is automatic (the frame with the most stars) or one you pick.
  • Stacking: Winsorized sigma clipping is a robust default. Kappa-sigma clipping needs about eight or more frames, the Median works with three. Frame weights can favour quieter or sharper frames.
  • After stacking: Background gradient removal fits a polynomial to the sky; start with Linear (degree 1). Neutralise the colour of the background removes a colour cast from light pollution.

Choose Stack frames. A progress bar shows each stage; Cancel stacking stops and reloads your frames.

Read the report

The Result panel lists Frames stacked, the calibration used, Noise reduction with the ideal √N value, Rejected samples, the stars in the stack and their median FWHM, HFR and roundness. Warnings explain anything that was skipped. The Registration report table shows, for every frame, the detected and matched stars, the RMS residual in pixels and the shift, rotation and scale to the reference. With the synthetic sample all eight frames align with sub-pixel residuals.

Set View to Rejection map to see where outliers were removed: red marks samples that were too bright, such as the satellite trail, blue samples that were too dark.

Stretch, export and continue

Stacked data are linear and look dark. Display stretch changes only the preview and the PNG and TIFF exports. Automatic midtones stretch sets the black point and midtones from the background; Target background controls how bright the sky becomes. Choose Manual midtones stretch to fine-tune Black point, Midtones balance and White point, or asinh stretch with asinh strength for bright star cores. Same curve for all colour channels keeps the colour balance; Reset to automatic starts over.

Under Export and continue, choose Download FITS (32-bit float, linear) for further processing, Download PNG (16-bit, stretched) or Download TIFF (16-bit, stretched) for editing, and Download star list CSV, Download rejection map FITS or Download report JSON for records. Continue in photo editor opens the stretched result as a new Lumina photo; Send to Photo Lab adds it to your Photo Lab collection.

The same engine powers the Astro Image Stacker, the Star Detector and the FITS Inspector tools for scripts and AI agents, with smaller limits.

Ready to try it?

Launch Lumina →