Calibrate, Register, and Stack Images with WBPP
Turn raw exposures into a linear master with WeightedBatchPreprocessing. Organize calibration frames, verify their assignments, align the light frames, and inspect the stacked result before moving on to color and stretching.
Sources reviewed October 25, 2026
What WBPP does
WeightedBatchPreprocessing, usually shortened to WBPP, coordinates several PixInsight tools. Calibration corrects repeatable sensor and illumination effects; registration aligns stars between exposures; integration combines the accepted exposures into a master with less random noise. Weighting lets useful frames contribute according to the selected quality measure.
The result is still linear: it normally looks dark without a display stretch. WBPP does not finish your photograph, choose an artistic palette, or replace inspection of the data. Color calibration, gradient treatment, stretching, and finishing come later.
Start with one target, one camera, one binning and readout configuration, and one observing session. This exercise assumes raw, uncalibrated frames. WBPP interfaces and defaults change; use the installed help and tooltips for your version. The linked older walkthroughs explain concepts, but their screenshots are not a current settings template.
1. Know which frames belong together
For a first cooled-CMOS exercise, use exposure-matched darks for the lights and matching flat-darks for the flats. A bias-based flat workflow can also be appropriate for some cameras, but do not combine recipes without understanding the resulting calibration path.
| Frame type | What it records | What to check |
|---|---|---|
| Lights | The target exposures to combine | Target, filter, exposure, camera settings, and usable stars |
| Darks | Dark signal and electronic offset with no light reaching the sensor | Match light exposure, temperature, gain/ISO, offset, binning, and readout mode |
| Flats | Vignetting and dust shadows in the optical path | Same filter and optical configuration as the lights; suitable exposure without clipping |
| Flat-darks (dark-flats) | Dark exposures matching the flats | Match flat exposure and camera settings; load in the Darks category |
| Bias, if using a validated bias workflow | Electronic offset at a camera-appropriate short exposure | Compatible camera settings; verify how WBPP uses it |
2. Organize and inspect the raw data
Keep the originals untouched. Put copies or clearly identified source files into Lights, Darks, Flats, and FlatDarks folders, with filter subfolders for monochrome data. Choose a separate empty output folder such as Target_WBPP_run01. Allow substantial extra disk space for intermediate files; the requirement depends on frame count, dimensions, and enabled stages.
Use Blink to review lights at a consistent display stretch. Exclude clear failures such as clouds obscuring the target, badly trailed stars, severe focus loss, or corrupted frames. Keep a note of exclusions. Weighting and pixel rejection are useful, but they are not reasons to retain every damaged exposure.
Inspect representative calibration frames too. Flats should show the illumination pattern without saturated regions, and darks should have no light leak. Compare metadata such as exposure, filter, gain, offset, temperature, and binning with the acquisition record.
Do not stretch, color-balance, debayer, or resize raw inputs for this workflow. For DSLR or mirrorless RAW files, preserve the sensor data rather than using camera JPEGs or edited exports. Check PixInsight’s RAW import settings for an unprocessed CFA workflow and your camera before loading a full batch.
3. Load files and verify the groups
Open Script → Batch Processing → WeightedBatchPreprocessing. Reset a reused configuration when starting an unrelated dataset, or carefully review its saved settings. Work through the file categories rather than trusting folder names to establish calibration automatically.
- Add the raw lights to Lights, raw darks and flat-darks to Darks, and raw flats to Flats. Add bias only if it belongs to your chosen calibration workflow. Check the counts against the files you intended to load.
- Review the resulting groups for exposure, filter, binning, and other relevant metadata. Monochrome R/G/B or S II/Hα/O III lights must remain separate filter groups for integration. Do not rename unlike filters into one group just to obtain a single output.
- Check whether nearby flat and flat-dark exposure times have been grouped together incorrectly. Review the exposure grouping or tolerance controls in your version so each flat group gets its intended matching dark. Fix wrong or missing metadata deliberately on copies, using the acquisition record.
- If using existing calibration masters, explicitly identify them as masters with the controls supported by your version, verify their history and compatibility, and use the required format. Do not load raw frames and equivalent masters as though they were independent exposures. This first exercise is simpler with raw calibration frames throughout.
- Select the separate output directory. Keep previous completed runs available for comparison instead of mixing unrelated targets or camera configurations into the same working folder.
4. Check the calibration path before running
Select each light and flat group in the Calibration area and inspect the assigned masters. Use Show Calibration Diagram or its equivalent to follow the actual path. For the example workflow, flats use matching flat-darks, and lights use matching darks plus the corresponding calibrated flat.
Keep dark optimization/scaling off for this exposure-matched CMOS example, especially with amp glow. Do not use scaling as a general solution to mismatched darks. A different sensor or calibration strategy needs its own validation.
Do not manually bias-subtract darks before feeding them into this raw-frame workflow. Avoid subtracting the same offset twice. If reusing masters, inspect the documented calibration history and the current WBPP expectations rather than guessing from a filename.
A flat corrects the light through a normalized division, not by simply subtracting its dust pattern. Inspect a calibrated light for improvement. A missing or wrong flat can leave dust shadows and vignetting; background extraction later is not a replacement for correct calibration.
5. Choose the color-camera or monochrome path
For raw one-shot-color data, verify the CFA setting and Bayer pattern against the camera and file metadata. WBPP should calibrate the raw mosaic before debayering it. Auto detection is convenient only when the metadata is correct; do not guess a pattern because one preview looks more colorful.
For monochrome data, keep CFA/debayer processing off. Each filter produces its own grayscale master. Broadband R/G/B and narrowband S II/Hα/O III combination are later steps covered in the linked lessons.
Do not enable CFA for data that has already been debayered. This tutorial starts with raw files; pre-calibrated or pre-debayered inputs require a separately configured workflow so earlier operations are not repeated.
Leave drizzle integration off for this first baseline. Drizzle can be valuable for an appropriately sampled, dithered dataset, but requires deliberate configuration and additional resources. Ordinary integration gives you a result to inspect before that separate experiment.
6. Set registration, weighting, and integration
Enable registration and integration so the run reaches a stacked master. For the first same-field dataset, automatic registration-reference selection is a reasonable starting point. If selecting manually, choose a sharp, well-exposed, representative light with good stars and field coverage, not a cloudy or strongly trailed frame.
Keep the same registration reference across filter groups intended for later combination. Different integration or normalization references may serve other purposes; do not confuse those with the common geometric reference. Inspect the registered outputs before assuming all filters share a grid.
Start with your version’s standard weighting, normalization, and integration configuration. Read what the selected quality metric measures. A low weight is a prompt to inspect the frame, not automatic proof that it is useless. Avoid copying rejection thresholds from a dataset with a different number of exposures.
If Frame Selection is available, an interactive run can help you compare quality measurements with actual images before accepting exclusions. It may pause for your input. Check which interactive stages are enabled before planning an unattended overnight run.
Local normalization can help reconcile differences among exposures; it is distinct from NarrowbandNormalization and from later gradient correction on a master. Review its reference requirements and diagnostics in the installed help. Keep optional advanced features at a documented baseline rather than turning everything on at once.
7. Run diagnostics, then a pilot batch
Run Diagnostics and read each warning. Resolve missing calibration assignments, incorrect groups, incompatible geometry, and output-path problems before continuing. A warning may be explainable in a specialized workflow, but this beginner exercise should not dismiss an unexplained warning.
For a large dataset, first try a representative subset of lights with the complete matching calibration set. Include enough lights for the chosen integration and rejection method. The purpose is to catch setup problems before processing everything, not to judge the final depth from a tiny stack.
Record or save the WBPP configuration using the option available in your version, then click Run. Watch the console and respond to any enabled interactive selection stage. Processing time varies widely with data size and computer resources.
If the run stops, read the first relevant error and preserve the log. Check available disk space, file paths, and the failed stage before retrying. Current versions provide recovery and reuse options; consult their help so a changed setup does not accidentally reuse unsuitable earlier products.
8. Inspect the outputs before accepting the stack
Read the completion report and locate the integrated light masters. Output paths and names vary with version and grouping: use the report rather than assuming a particular suffix. Calibration masters, registered subframes, and rejection maps are different products from the integrated target image.
Open each integrated master and use STF for display. Keep the pixels linear. Compare a calibrated light, representative registered lights, and the integration at 1:1. Look for residual glow, dust rings, unusual borders, doubled stars, clipped dark regions, or repeated artifacts.
Inspect available rejection maps alongside the integration. They help reveal rejected trails and outliers, but bright areas are not automatically evidence that the settings are correct. Check whether real star profiles or object structure have been damaged in the resulting master.
Review accepted, rejected, and registration-failed frame counts. Confirm that the expected filters and exposure groups produced outputs. Inspect a frame that failed registration rather than silently treating a much smaller stack as a full success.
If the pilot is sound, run the full accepted dataset with the validated configuration in a clearly identified output location. Save the report and note the number and exposure time of contributing frames. Keep the raw data and calibration records.
Quick troubleshooting
No suitable dark or flat: inspect metadata, grouping, filter labels, and camera settings. A folder containing calibration files does not prove WBPP assigned them to the correct group.
Dust rings or vignetting become worse: inspect flat quality, matching optical setup, flat calibration, and any accidental repeated calibration. Do not compensate by applying a stronger stretch.
Amp glow remains or dark patches appear: check exposure, temperature, gain, offset, readout compatibility, dark scaling, and whether a reused master was already calibrated. Return to the calibration diagram.
Color-camera output has strange colors or checkerboard artifacts: verify the raw import, CFA pattern, and debayer stage. A general color cast in an otherwise sound linear RGB stack is not, by itself, proof of a wrong Bayer pattern.
Registration fails or stars double: inspect the affected light and reference, field overlap, star visibility, and geometry. Do not relax every detection setting simultaneously; change one cause at a time and test again.
Several masters appear: inspect filter, exposure, and grouping choices. Multiple filter outputs are expected for monochrome data. Other splits may be deliberate or may reveal metadata problems; do not blindly stack every output together.
The result looks black: try STF for inspection. Do not apply a permanent stretch just to make a linear preprocessing checkpoint look like the finished image.
Continue from the linear master
Preserve the unmodified WBPP integration as a linear XISF checkpoint. Work on a duplicate for a common edge crop and subsequent processing. Verify registration across monochrome filter masters and use the same intended crop before RGB or SHO/HOO combination.
For an RGB image, continue to plate solving and the appropriate linear calibration and gradient workflow before stretching. If geometry changes invalidate an earlier sky solution, solve the final working geometry again. WBPP registration alone is not proof that the output has valid astrometric metadata.
This is an original practice sequence, not a universal camera-calibration prescription. The references include older interfaces; installed WBPP documentation, current release notes, and your camera’s validated calibration requirements govern the final configuration. Keep the settings and logs with the master so the run can be understood later.