PixInsight CombineImages Script

By  Greg McCall

UPDATE 7/12/2022:

This script is now at version 0.61 

You can find it with Dean's comments on the PixInsight Forum at



I've included an email below (with permission) from Dean Carr who created a PixInsight script that I've been helping test.
(By the way, Dean is a local Sydney person.)

This script is not for the beginner and is still under development.

I've uploaded two articles to our document library that may assist in obtaining JWST images if needed but the script can combine other images as well.

I have ideas on how best to use this script but I think it best for you to try it yourself first I'm curious to see what works best for you with various JWST objects.

Unless you know Dean and want to talk directly to him, let me know of any issues.

Using PixInsight is just one way of combining lots of mono images into a colour image. Photoshop layers are another and each person can choose whatever tools they want to create their own astro art.



---------------------------------- Dean's email follows ----------------------------------



This email describes and offers access to a script that operates within PixInsight.  If you do not work with PixInsight, this e-mail will be of little interest to you.


I developed an early version of the CombineImages script in 2018 to allow users (actually just me) to select a number of grayscale (master) images, assign whatever colours are desirable for each image, and then combine them to form a colour image. I have now redeveloped the script to improve its functionality, and to provide better support for the processing of images involving more than the usual number of filter sets – e.g. images from the James Webb Space Telescope (JWST) and Sloan Digital Sky Survey (SDSS.) 


I consider this v0.50 because it needs a little more user testing before I consider it ready to be v1.00.


Thank you to Greg McCall for assisting with the testing to date.


I understand this may be of interest to only a niche element of the astroimaging community, and although I have developed this script as a tool for myself (and for educational purposes), others may find some use for it.


This script allows the assignment of almost any colour to each grayscale image. This may be useful for aesthetic reasons, but also if you desire more distinction between the chemical elements being imaged. Processing of RGB or HST images usually starts by assigning three master images (e.g. SII, Ha, OIII) to the three RGB channels – easy.  But wait until you need to assign 4, 5, 6 or 7 masters to the same three RGB channels – not so easy.


What the script does is conceptually rather simple, but the implementation of the user interface has been quite complex. The complexity results from the need to support trial-and-error approaches by users seeking the best colours and methods of combination to provide aesthetically pleasing results.


To be clear, CombineImages is NOT an image stacking or processing tool. The script does not seek to replicate existing tools, and it is certain that other processing will be necessary. It is intended help span the gap between preprocessing/integration and your own processing of combined masters. When the Script is finished it will be up to you to do the rest.


Further description and instructions are available through the Script. 


So, a zipped ‘clean’ copy of CombineImages v0.50 script (i.e. without any test images) and another with test images are provided through my Google Drive. The test data incorporates JWST images of the NGC3132, with 6 filters already star-aligned and linear-fitted.  The attached image is the result of absolutely minimal processing of a combined image after using the script with specific settings (saved for you with the script).  The minimal processing comprised one HistrogramTransformation, one CurvesTransformation and one SCNR (Green) only – no further processing.

Version 0.50 (‘Clean’ without test images)

Version 0.50 (With test images – i.e. large)


I would be particularly interested to know how the Script operates and displays on non-Windows systems and higher-resolution screens.  It has only been tested on Windows systems.

See below for a recommended start-up approach using the test data.

Regards to all





Recommended fast start-up approach:


  1. Download and save the Script and data from my Google Drive transfer folder (links above).
  2. Start PixInsight; select SCRIPT=>EXECUTE SCRIPT FILE, then select the script: ‘DC_CombineImages_v0.50.js
  3. Accept the presented option of loading and selecting the test data already provided in the INPUT FILES folder.
  4. Don’t touch any dialog sliders just yet!
  5. Press the LOAD [SETTINGS] button at the top-right of the dialog, and select the only saved settings file present.
  6. Press the COMBINE button, wait about a minute for the Script to run.  Note: In other modes, execution is much faster (~6 seconds)
  7. Review the results in the IMAGE REVIEW panel; use the MIDTONE ADJUST if necessary to see the results a little better.
  8. Press SAVE to retain a copy of the combined image on the PixInsight desktop. The saved image will probably not look exactly the same as the Review Image you saw while running the script if you used a different method of stretching, any saturation boost or midtone adjustment at the time.
  9. Process the image yourself – the Script has done all its supposed to.
  10. Read the USER GUIDE! It will explain a lot.


You need to login to make a comment.