PixInsight - Image Post Processing

WBPP -  Weighted Batch Preprocessing

updated: 2023-11-27


This script will add all the light frames, the flats, the darks and the bias frames, register them, stack them, debayer them and return a single stacked image


Script 🡺 Batch Processing 🡺 WeightedBatchPreprocessing


Batch of original pre-selected Light frames + master Dark, Flats and Bias frames


integrated picture, file name “*_i.xisf” into sub folder "\_Astro\2021 Astro\20210814 M101\AutoCal\master"

Previous Step

Picture Shooting

Next Step

Picture Post Processing






Set Global Options

  • Optimize dark frames: will work on some DSLRs but probably not on OSC cameras.
  • Make sure to check Up-Bottom FITS for ZWO ASI294 (or final picture will be reversed!)

Figure 1.1


Adding Frames (Lights, Bias, Dark etc.)

If you want to use Master calibration frames instead of multiple single calibration frames, then make sure the file name of the master files start with "Master".

Make sure to check

Master frames will be marked with an asterisk, see figure 2.1 on the right

To ensure that the master files generated by ASIAIR  are recognized as Master Calibration Files by PixInsight and thus supplied with the correct parameters by Weighted Batch Pre-Processor (WPP), the file names for Master Calibration Files are subject to special naming conventions. A correct file name could therefore be :


and the automatic batch process will be able to treat them as master files. Otherwise, the calibration frames will be ignored during the light frame calibration part of the process with an error message such 

*** Warning: Cannot integrate less than three frames.

!!! Error: Master Flat file was not be generated.

When adding light you may also consider adding the manually approved light frames from 1.1 Blink or 1.2 Automatic Selection using Subframe Selector in order to avoid integrating frames with satellite streaks or other artifacts.

Note: After loading all light, bias, dark and flat frames once, click to verify that PixInsight has accepted all calibration frames. 

Flat Frame Filter Problem: If you see a message like this

 Note: No Master Flat will be used to calibrate the frames.

then PixInsight was probably unable to correctly interpret the contents of the calibration frame. although binning, filter, exposure are recognized correctly.


Workaround: In this case, delete the flat frame and add it using the Add Custom command, fill in the correct information, and click OK:

Now the Flat Frame is displayed as if "NoFilter" has been used as filter keyword:

The message "No Master Flat will be used to calibrate the frame" no longer appears when you click : 

No other workaround of this problem has been found yet, even adding the keyword FILTER with a property like OleN or anything else to the FITS keywords  worked so far.

Figure 2.1

Figure 2.2


Bias Frames Integration Settings

Combination: Average

Rejection Algorithm:

  • Up to 15 frames: use Sigma Clipping
  • Over 15 frames: use Winsorized Sigma Clipping

If you are using Master Bias Frame, the above settings do not apply. In this case use "No Rejection" as rejection algorithm.


Dark Frames Integration Settings

same settings apply as for Bias Frames


Flat Integration Settings

same settings apply as for Bias Frames


Light Frame Handlings Subframe Weighting

try the settings on the right

Comet processing:

WARNING: if you are processing frames of a comet then please make sure not to use the integrated Image Integration.

Uncheck the the Image Integration step in case of comet pictures:

Image integration will be done using the Comet Alignment tool. 


Linear Pattern Subtraction


Cosmetic Correction


Subframe Weighting

SNR: If this option is checked light frames will be analyzed and weighted accordingly to the relative weights assigned to FWHM, eccentricity and SNR. Weights are saved into the image as WBPPWGHT header key which will be used during the ImageIntegration process.


Image Registration 

try the settings on the right.

Set Pixel Interpolation to Auto or try Lanczos-3, which seems to be a good interpolation algorithm.


Image Integration (Stacking)

Rejection Algorithm:

  • Up to 15 frames: use Sigma Clipping
  • Over 15 frames: use Winsorized Sigma Clipping.


On the Post-Calibration tab

enable Drizzle configuration (always for OSC cameras!)


Set the output folder

Use subfolder "AutoCal\master" as output directory.


Start the batch process

by first running a diagnostic check and then the click on Run if the diagnostic didn't return any problems.


Check and save the log file for documentation

e.g. into a subfolder "logs" and name it according to major process settings, e.g. "AWBP_Lanczos-3_ ProcessLogger.txt"

Example log file


Rename the resulting master light image file

Typically, PixIsight will use the original filename and put a "master" in front of the name, like:


Consider renaming the file to your own file name convention in the master subfolder using the naming convention, e.g.:


e.g.:  20210815_M101_ZWOASI294_0000.xisf

Created with the Personal Edition of HelpNDoc: Transform Your Word Doc into a Professional-Quality eBook with HelpNDoc