NINA Setup
Setting up N.I.N.A. (Nighttime Imaging 'N' Astronomy) for an imaging session.
Setting up N.I.N.A. (Nighttime Imaging 'N' Astronomy) for an imaging session.
Calibration and stacking workflow for removing vignetting, using PixInsight's Weighted Batch Preprocessing (WBPP 3.2.0) with flats captured in NINA.
Updated 2026-11-08 (v1.0.1) · Worked example: NGC 1333, session of 2026-11-06 (ZWO ASI2600MM Pro on a Celestron EdgeHD 14, dithered lights)
Download the PDF 23 pages · 6.6 MB
Part 1 · Calibration
Flat frames record the optical system's uneven illumination: vignetting, dust donuts and sensor non-uniformity. Dividing each light frame by a normalized master flat removes these patterns. For that division to work, every frame must first have its offset (pedestal) signal removed with a matching dark.
For example, if a corner receives 70% of the light the center receives, the master flat records 0.70 in that corner. Dividing the light by the flat scales the corner back to match the center. If the flat's offset is not removed, the flat might record 0.80 instead of 0.70, and the corners come out over- or under-corrected.
| Frame | How it is captured | Purpose |
|---|---|---|
| Flat darks | Panel off, scope covered, same exposure, gain, offset and temperature as the flats (e.g. 1 s) | Remove offset and dark signal from the flats |
| Flats | Evenly lit panel, same optical setup (focus, rotation, filter) as the lights | Record vignetting and dust shadows |
| Darks | Cap on, same exposure, gain, offset and temperature as the lights (e.g. 300 s) | Remove offset, thermal signal and amp glow from the lights |
| Lights | The target exposures | The image data |
A bias frame is a zero-length exposure. It records only the camera's offset (pedestal) and readout pattern. Every other frame already carries that same bias signal underneath its own:
| Frame | What it contains |
|---|---|
| Dark (e.g. 300 s) | Bias + thermal signal + amp glow |
| Flat dark (e.g. 2 s) | Bias + a small thermal signal |
| Flat | Bias + thermal signal + the panel's light pattern (vignetting, dust) |
| Light | Bias + thermal signal + sky and target |
Subtracting a dark taken at the same exposure, gain, offset and temperature removes the bias and the thermal signal in one step, because the dark contains both:
Subtracting a master bias as well would remove the offset twice. A bias is only needed when a dark must be scaled to a different exposure (WBPP's Optimize master dark, or flats with no matching flat dark): only the thermal part grows with exposure time, so the bias has to be separated out before the dark can be scaled. With a matched dark for the lights and a matched flat dark for the flats, nothing is scaled and the bias has no job left.
The full flow is shown in Figure 1 at the top of this tutorial.
Every integration step (flat dark, dark, flat and light) runs the same sequence: Normalize → Weight → Reject pixels → Average → Master frame. The settings differ by frame type:
| Step | Darks / flat darks | Flats | Lights |
|---|---|---|---|
| Normalize | None (absolute levels must be kept) | Multiplicative (each flat scaled to the same brightness) | Additive with scaling, or local normalization |
| Weight | Equal | Equal | By quality score (subframe weighting) |
| Reject pixels | Cosmic rays, hot-pixel outliers | Dust specks, outliers (stars in sky flats) | Satellites, planes, cosmic rays |
| Average | Mean | Mean | Weighted mean |
Recommendation: in NINA's Flat Wizard, use Dynamic Brightness mode with one flat exposure shared by every filter. The exposure stays fixed, and NINA adjusts the panel brightness for each filter until its flats reach the target level.
| Dynamic exposure | Dynamic brightness (recommended) | |
|---|---|---|
| Flat exposure | Different for each filter (e.g. 0.72 s, 0.75 s, 2.5 s, 16 s, 20 s) | One exposure for all filters (e.g. 2 s) |
| Flat darks | One set for every exposure | One set for all filters |
| WBPP matching | Exposures 0.03 s apart; tolerance must be 0 or flats get the wrong dark | One flat dark exposure; nothing to confuse |
| Short exposures | Bright filters can drop below 1 s (panel flicker, unstable offset) | Exposure chosen to stay at 1–3 s or longer |
| Flat dark library | Many masters to keep and refresh | One master flat dark, reused across sessions |
IMAGETYP header (NINA writes DARKFLAT) and treats flat darks as darks.Master Dark 1.00s. If it shows a long dark (e.g. 300 s, often marked "optimized"), WBPP found no matching flat dark and is scaling the long dark instead. Scaling is inaccurate on CMOS and causes over-corrected corners. The fix is a matching flat dark (not a bias); override the assignment manually if needed.| Symptom | Likely cause |
|---|---|
| Over-corrected (corners brighter than center) | Missing or mismatched flat darks; offset mismatch; WBPP using an optimized long dark for the flats |
| Under-corrected (corners still dark) | Flats too bright (non-linear or clipped); light leak or stray light during the flats |
| Dust donuts remain or are shifted | Focus, camera rotation or filter changed between lights and flats |
| Uneven gradients | Uneven panel or sky flat; panel flicker at short exposures |
| Correction varies between filters | Narrowband flats too dim (panel at maximum); flat darks taken at a different gain or offset |
WBPP sorts files into darks, flats and lights by the IMAGETYP header NINA writes, so everything can be added from one folder. These settings are the most common sources of trouble, roughly in order of impact on flats.
| Setting | What to check | If it is wrong |
|---|---|---|
| File recognition | After adding the folder, check the file count and filter names in the Darks, Flats and Lights tabs, and that the Bias tab is empty. | Frames land in the wrong tab or are skipped; lights get no flat. |
| Flat dark assignment | Calibration tab: every flat group uses the 1 s master dark. | A scaled long dark is used; corners over-correct. |
| Optimize master dark | Turn off for CMOS cameras when matching darks exist. | Dark scaling is inaccurate; over-correction or residual amp glow. |
| Bias frames | Not used. Leave the Bias tab empty; flats are calibrated with matched flat darks (Section 3). | Flats calibrated with a bias alone keep an offset error; corners over- or under-correct. |
| Filter names | Names must match exactly between flats and lights (e.g. "Ha" vs. "H-alpha"). | Separate groups; lights calibrated without a flat. |
| Grouping keywords (multi-night) | If the camera is rotated or refocused between nights, add a keyword such as NIGHT or a session folder so flats match their own night. | One night's flats applied to all nights; dust donuts and vignetting mismatch. |
| Gain / offset | WBPP does not match on these by default. Add GAIN and OFFSET as grouping keywords if files use different settings. | Darks from another gain or offset are used. |
| Temperature | WBPP does not match darks by temperature; keep the dark library at the lights' temperature. | Thermal signal and amp glow not removed. |
| Dark exposure tolerance | Keep it small so a 1 s flat cannot pick up a 2–3 s dark. | Mismatched flat darks. |
| Output pedestal | Keep on Automatic in light calibration. | Weak narrowband pixels go negative and clip to black. |
| CFA images | Mono: off. OSC: on, Bayer pattern Auto, separate CFA flat scaling factors enabled. | Mono data debayered into a checkerboard; color-channel flat errors on OSC. |
| Cosmetic correction | Enable with automatic hot/cold detection or a template. | Hot pixels cause walking noise after stacking. |
| Cache | If a setting change does not change the output, use Purge cache and re-run. | Old intermediate results are reused. |
_c in the name in the calibrated folder) and apply a strong screen stretch. Even corners mean the flats work. Bright or dark corners mean the Calibration tab assignments need fixing.Part 2 · WBPP step by step
Weighted Batch Preprocessing 3.2.0 with a mono camera (ZWO ASI2600MM Pro on an EdgeHD 14) and dithered lights. The screens are from the NGC 1333 session of 2026-11-06.
WBPP runs the whole flow in Figure 1 from a single window. The work is done in seven tabs, left to right, plus three settings dialogs on the Lights tab:
| Step | Screen | What you do there |
|---|---|---|
| 1 | Bias tab | Load files (no bias); set the global options and output folder |
| 2 | Darks tab | Check the dark and flat dark exposures; set exposure tolerance |
| 3 | Flats tab | Check one flat group per filter; set flat integration |
| 4 | Lights tab | Check light groups; turn on the processing steps |
| 5 | Calibration tab | Confirm which dark and flat each group uses |
| 6 | Post-Calibration tab | Drizzle and integration grouping |
| 7–9 | Lights tab ⚙ dialogs | Image Registration, Local Normalization, Image Integration |
| 10 | Pipeline tab | Review the full run before pressing Run |
| 11 | — | Run, then check the results |
Dithering moves the telescope a few pixels between subs. After registration, the stars line up but the sensor's hot pixels, cold pixels and fixed pattern noise land in a different place in every sub. That has three effects on the settings:
| # | Problem | Fix | Step |
|---|---|---|---|
| 1 | L group holds an old master flat and 51 new raw flats; WBPP uses the master and ignores the new flats | Remove the L master flat so WBPP builds a new one from the 51 raw flats | 3 |
| 2 | Flats taken in dynamic exposure mode: five flat exposures (0.72 s to 20 s), each needing its own flat dark | Next session: NINA Dynamic Brightness with one exposure for every filter, and one flat dark set (Section 6) | 2 |
| 3 | No 1.00 s flat dark for the new L flats | Shoot 30–50 flat darks at 1.00 s, same gain, offset and −10 °C; add them on the Darks tab | 2, 3 |
| 4 | Calibration exposure tolerance 600 s merges 60 s and 120 s B lights; the 60 s subs get the 120 s dark | Set tolerance to 2 s; shoot 60 s darks or remove the 60 s subs | 4 |
| 5 | Autocrop off | Turn on Autocrop | 4 |
| 6 | Rejection on Auto; Large-scale High off | Generalized ESD; tick Large-scale pixel rejection High | 9 |
| 7 | A master bias was loaded from the library | Remove it; it is not used (Section 3) | 1 |
Problem 1 is the most likely cause of the leftover vignetting: if the L master flat was made before the camera was rotated to 25°, it no longer matches the lights.
IMAGETYP header of each file and sorts it into Bias, Darks, Flats or Lights. + Files adds individual files.master…. WBPP recognizes them because Detect masters from path is on.| Option | Setting | Why |
|---|---|---|
| Grouping Keywords | Empty for one night; add NIGHT (or a session keyword) for multi-night projects with re-rotation or refocus | Keeps each night's flats with that night's lights |
| Detect masters from path | On | Uses master darks and flats from the library |
| Generate rejection maps | On | Lets you check what rejection removed |
| Save groups on exit | On | Reopens WBPP with the same files |
| Registration reference | auto | WBPP picks the best-weighted frame |
| Output Directory | A drive with room (this run needs ~25 GiB) | All calibrated, registered and master files go here |
No bias in this workflow. The darks match the lights' exposure and the flat darks match the flats, so neither needs a bias; the Bias column shows ✗ in Step 5. That is correct for a CMOS camera.
Darks and flat darks both appear here, grouped by exposure. In this session:
| Exposure | Used by |
|---|---|
| 120 s | Lights (B, G, L, R) |
| 20 s, 16 s | Narrowband flats (S2 20 s; Ha and O3 16 s) |
| 2.5 s, 0.75 s, 0.72 s | Flats R, B and G |
| 0.24 s | No matching flat; unused |
| 1.00 s — missing | Needed for the new L flats |
masterFlat_BIN-1_6248x4176_FILTER-L_mono.xisf, then Remove Selected.The flat filenames show the sensor drifting from −10.0 to −9.3 °C during the flat run. It is minor, but let the cooler settle for a few minutes before starting flats.
| Setting | Value shown | Use |
|---|---|---|
| Calibration exposure tolerance | 600 | 2. 600 s merges the 60 s and 120 s B lights, so the 60 s subs get the 120 s dark. |
| Linear Defects Correction | Off | Off (only for sensors with bad columns) |
| Subframe Weighting | On, PSF Signal Weight | Keep |
| Frame Selection | On, not interactive | Keep. Removes clouded or trailed subs. |
| Image Registration ⚙ | On | Keep. See Step 7. |
| Local Normalization ⚙ | On | Keep. See Step 8. |
| Image Integration ⚙ | On | Keep. See Step 9. |
| Autocrop | Off | On. Trims the ragged dither edges. |
| Automatic integration mode | Off | Off, so the Step 9 settings are used |
| Astrometric Solution | Off | Optional; turn on for plate-solved masters for SPCC |
This is the most important check before running. Click each light group in the bottom table; WBPP highlights in green the master dark and master flat that group will use.
| Setting | Value | Note |
|---|---|---|
| Dark / Flat | Auto | Keep. Override per group only if the match is wrong. |
| Optimize master dark | Off | Keep off for CMOS. |
| Flat min | 0.0050 | Default |
| Output pedestal | Automatic | Keep. Stops faint pixels clipping to zero. |
| Cosmetic Correction | Automatic, high sigma 10 | Keep. A light first pass; rejection handles the rest with dithering. |
| CFA images | Off | Correct for mono. |
Show Calibration Diagram draws the same matching as a flow chart, which is useful for a final check.
| Setting | Value | Note |
|---|---|---|
| Exposure tolerance | 180 | Fine. Here it only groups subs for stacking, so the 60 s and 120 s B subs can be stacked together; weighting handles the difference. |
| Channels / Debayer | Combined RGB | Ignored for mono |
| Drizzle: Enable | On | Uses the dither offsets |
| Drizzle: Scale | 1 | Keep 1×. At about 0.2–0.3″/pixel the data is already oversampled; 2× only makes files 4× larger and noisier. |
| Drop shrink / Function | 0.90 / Square | Keep |
| Fast Integration | Off | Keep off for a quality run |
Click Apply to all groups after changing drizzle settings. Total integration for this session: 8 h 24 m (B 2 h 34 m, G 2 h 24 m, R 2 h 30 m, L 0 h 56 m).
| Setting | Value shown | Use with dithering |
|---|---|---|
| Combination | Average | Keep |
| Weight overshoot protection | On, 0.10 | Keep. Stops one sub from dominating. |
| Reject abnormally weighted frames | Off | Keep off; Frame Selection already does this. |
| Rejection algorithm | Auto | Generalized Extreme Studentized Deviate (ESD). Same method for every filter, whatever the frame count; ideal for 20+ dithered subs. |
| ESD outliers / significance | 0.30 / 0.05 | Keep |
| Large-scale rejection: High | Off | On, layers 2, growth 2. Removes satellite and aircraft trails. |
| Large-scale rejection: Low | Off | Keep off; it can eat faint dark dust lanes. |
Read the list top to bottom before pressing Run:
[60.00s, 120.00s] until the tolerance is fixed (Step 4).Total estimated disk space is about 25 GiB. Make sure the output drive has room before starting.
calibrated folder in the output directory and apply a strong STF auto-stretch.
master folder. Use the drizzled versions for processing.logs folder for warnings, such as groups without a dark or flat, and frames rejected by Frame Selection.