AutoIntegrate is a PixInsight script to integrate FITS (and other) image files and run a basic image processing workflow to create a final image. Script has a GUI interface where some processing options can be selected.
After running the script there will be integrated light images and automatically processed final image. LRGB, color and narrowband files are accepted.
This script is targeted for use with FITS files that are already calibrated. Many remote telescope sites offer already calibrated files, or it can be done manually. LRGB or narrowband files need to have a keyword FILTER that specifies the image as Luminance, Red, Green, Blue, SII, Ha or OIII data. If the keyword FILTER is not found then images are assumed to be color images, except for files that end with _L, _R, _G, _B, _H, _S, _O or _C which are treated as filter files. Files from remote telescope systems like Slooh, Telescope Live, iTelescope and Deep Sky West have been tested and they work fine. Also camera RAW files can be used and they are treated as color files. Details of processing steps can be found from the header block of the source code.
Below is a sample output from AutoIntegrate script with default options.
Running the script
Steps to run the script
- Open Script Editor in PixInsight
- Open file AutoIntegrate.js
- Press F9 to run the script in the editor
- When script dialog opens, click Run
- In the file dialog, select all *.fit files and wait until the script completes.
Erik Westermann has written more detailed instructions in his blog article PixInsight AutoIntegrate.js Processing Script
It is also possible to run manually background extraction, histogram transformations or other steps on the integrated images and then continue automatic processing from there. For more details see header block in the source code.
AutoIntegrate dialog screen
Below is the script dialog screen. Often it is best to start with default options and just hit the Run button. Script will then ask for files to process.
I have created a short YouTube video that shows the workflow with AutoIntegrate script.
Some tips for using AutoIntegrate script
Very often you get good results by running the script with default settings and then continue processing in Pixinsight.
Always before running the script you should the quality of the data using a Blink tool. Remove all files that have movement like wind effect or clouds.
Sometimes you may want to do some shadow cleanup with HistogramTransformation tool. Depending on the image you can try clipping shadows between %0.01 and %0.1.
If an image lacks contrast it can be enhanced with the CurvesTransformation tool. Changing the curve to a slight S can be helpful. CurvesTransformation can also be used to increase saturation.
If the background is not even then tools like AutomaticBackgroundExtractor or DynamicBackgroundExtractor can be helpful. Script can run AutomaticBackgroundExtractor automatically if needed.
Further enhancements may include masking, noise reduction, sharpening and making stars smaller. Often tools like HDRMulticaleTransform and LocalHistogramEqualization can help with details in the image.
Some of these steps can be run by the AutoIntegrate script with setting Extra processing options.
If you want to integrate only a single channel, you can do it by clicking Monochrome and Integrate only options, and then selecting correct files.
Batch mode for mosaic images
Batch mode is intended to be used with mosaic images. In mosaics there are several images and typically the same basic processing options are used for all images. In Batch mode AutoIntegrate script automatically asks for files for the next mosaic panel. You can freely choose the directories for images. Script creates a final processed image which has the same name as the directory where images were read. So if images are from directory P1 then the image name will be P1. At the end of the script all batch mode images are left open and all intermediate images are closed.When batch files are ready for further processing is it possible to save all files by clicking a button in section “Save batch result files”. Batch mode adds a keyword to each image and it is used to find files saving. It is possible to save images in PixInsight .xisf format, 16-bit TIFF format or 8-bit TIFF format. If you want to assemble the final image in Photoshop, save images in 16-bit TIFF format. Batch mode keyword is saved on disk with .xisf format but not with TIFF format. If you want to process images later and use batch save then you should save files also in .xisf format.
Tips for combining mosaic panels
When doing a mosaic, after running AutoIntegrate script I often do just HistogramTransform at Pixinsight. With HistogramTransform I just try to get the panels visually close enough. Then I save panels as 16 bit TIFF and move to Photoshop.In Photoshop I load the panels as layers (File/Scripts/Load Files into Stack…). Then I align them using a Difference blending mode (select all layers and change to Difference mode). It makes it quite easy to adjust panels correctly. After that I change the blending mode back to normal. At this point it is still possible to adjust individual panels to make them match more closely. I blend layers together using Edit/Auto-Blend Layers. Usually it works very well and you get a nice blended image. After that you can flatten the image and continue processing as a single image in Pixinsight or Photoshop.
Processing OSC files
Default options are typically a pretty good start for most images but sometimes a few changes are needed for OSC (One Shot Color) files. If there is a strong color cast and/or vignetting it is worth trying with Use ABE and Use BackgroudNeutralization options. Sometimes also choosing Unlinked in the Link RGB channel option helps. Examples where these options may be useful are DSLR files and Slooh Canary Three telescope.
Processing narrowband files
Also narrowband images are supported by the script. They are processed mostly the same way as other images. Main difference is that you can choose the color palette that is used when mapping narrowband images to RGB channels.
Below is a sample output from AutoIntegrate script when using narrowband data and SHO color palette. Otherwise it was run with default settings but Remove green cast and Fix star colors options were checked.
The following extra processing can be applied to an image
- Darker background with a luminance mask
- HDRMultiscaleTansform with a luminance mask
- LocalHistogramEqualization with a luminance mask
- Add contrast
- Smaller stars with a star mask. Number of iterations can be given. More iterations will generate smaller stars. If a predefined star_mask exists it is used.
If multiple options are selected they are executed in the order listed above. If a predefined luminance mask range_mask or AutoMask it is used.
In case of Run or AutoContinue, extra processing steps are applied to a copy of the final image. A new image is created with _extra added to the name. For example if the final image is AutoLRGB then a new image AutoLRGB_extra is created. AutoContinue can be used to apply extra processing after the final image is created.
There are also narrowband specific extra processing options in the Narrowband processing section.
From a drop down list it is possible to select an image into which extra processing is applied. With the Apply button extra processing is run on the selected image.
AutoIntegrate in Remote Astrophotography site
Erik Westermann has a web site Remote Astrophotography. He talks about AutoIntegrate in his blog post PixInsight AutoIntegrate.js Processing Script. It has a lot of useful information so please check it out.
List of steps run by AutoIntegrate
Below are listed PixInsight processes used by AutoIntegrate script with default LRGB processing. AutoIntegrate writes processing output to the Process Console window and to AutoIntegrate.log file.
PixInsight scripts that come with the product were a great help when developing this script. Website Light Vortex Astronomy was a great place to find details and best practises when using PixInsight.
Routines ApplyAutoSTF and applySTF used by AutoIntegrate are from scripts that are distributed with Pixinsight.
This product is based on software from the PixInsight project, developed by Pleiades Astrophoto and its contributors (https://pixinsight.com/).