> ## Documentation Index
> Fetch the complete documentation index at: https://docs.nebyoulous.space/llms.txt
> Use this file to discover all available pages before exploring further.

# Stacking

> Calibrate, register, and combine the frames in an integration set, or reject frames before you stack.

Stacking runs in the cloud from an [integration set](/workspace/integration-sets). Nebyoulous calibrates and registers the frames you map, then combines them into a master. You can leave the page while a job runs. The **Stacks** and **Analysis** sections refresh on their own until the job finishes.

Two ways in:

* **New stack** combines the folders you map, with optional frame filters.
* **New analysis** calibrates and registers first, then lets you drop frames before the combine step.

## Lay out the folders

Put each frame role in its own folder. **New stack** recognizes these names:

| Folder | Role |
| - | - |
| `lights` | Lights |
| `darks` | Darks |
| `flats` | Flats |
| `biases` or `bias` | Biases |
| `flat-darks` | Flat darks |

`flat-dark`, `darkflats`, `dark-flats`, `flat_darks`, and `dark_flats` also map to flat darks. If a folder name does not match, assign the role yourself in the panel.

## Start a stack

On the set, open **Stacks** and choose **New stack**.

**1. Map folders to roles**

Check the folder for each role. Lights are required. Darks, flats, biases, and flat darks are used when you include them.

**2. Pick a starting point**

Choose a preset, or use **Recommend settings** to fill the sensor and combine controls from the folders and frame counts already in the set. You can still edit anything the preset or the recommendation set.

**3. Start stack**

The job shows up in **Stacks**. When it finishes, **Download master** saves the result, and a `stack-1` folder (then `stack-2`, and so on) appears in the explorer.

### Presets

| Preset | Use it when |
| - | - |
| OSC broadband, many subs | Color camera, lots of frames. Mean combine, winsorized sigma rejection, frame-count weighting. |
| Few subs / aggressive rejection | A short stack where one bad frame would show. Tighter sigma. |
| Mono / no debayer | Monochrome or a single narrowband / LRGB channel. No debayer, no RGB equalization. |

Open **Advanced** on the panel to change the combine method, rejection, normalization, weighting, sensor (color or monochrome), and cosmetic correction. Cosmetic correction is available when the stack includes darks. Rejection and weighting apply to mean combine.

Frame filters (FWHM, weighted FWHM, roundness, star count, background, and quality) live on the same panel. Each metric can keep the best N percent, clip by sigma, or cut on a threshold. **Only already-selected frames** keeps frames registration already marked selected.

The master is a linear, unstretched FITS. It looks dark and flat until you stretch, remove the background, and color-calibrate it in your processing tool.

## Re-stack

A finished stack can be combined again without repeating calibration and registration. **Re-stack** keeps the sensor and the registered frames from the source stack and only reruns the combine step. Change the method, rejection, weighting, or sigma, then start the re-stack. The new master is a separate stack in the list.

## Analyze, then keep the good frames

Use this when you want to see every light before you commit to a master.

**1. New analysis**

In **Analysis**, choose **New analysis**. The job calibrates and registers the lights once and writes an `analysis-1` folder (then `analysis-2`, and so on).

**2. Review frames**

When the analysis is ready, each frame shows FWHM, weighted FWHM, roundness, star count, background, and quality. Plots show the spread. Turn a metric filter on to reject frames that miss the cut. Use **Exclude** on a row to drop a frame yourself, and **Include** to put it back.

**3. Start stack**

The summary shows how many frames you are keeping. **Start stack** needs at least two kept frames. The combine uses only those frames and reports **Refine stack started** when the stack job is queued. Download the master from **Stacks** when it finishes.

Past analyses stay on the set as chips. Open one to review it again or stack a different cut of the same registration. A failed or cancelled analysis stays in the list so you can tell it apart from a ready one.

> [!NOTE]
>
> Stacking reads the files already in the integration set. It does not upload from your camera card. [Sync](/cli/sync) or **Add files** first.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.