PixInsight offers a lot of capability for processing astronomical images; however, it can be difficult to learn due to its unconventional, process-based, approach. While PixInsight offers a broad variety of processes, it is extensible through scripts that ordinary users can create. One such script is called AutoIntegrate.js by

PixInsight community member Jarmo Ruuth. AutoIntegrate.js applies a series of PixInsight processes to astronomical images, often resulting in a high-quality final image that may only require minor adjustments. While AutoIntegrate.js is fully automatic, it also offers a range of configurable parameters that allow users to customize its operation, reducing the manual work required on the image.

In this article, I explain what AutoIntegrate.js does and its parameters.

Result

The following image is the result of applying the AutoIntegrate.js script to LRGB images of Messier 20, also known as the Trifid Nebula:

The exposure time was 3Lx60sec, 1Rx50sec, 1Gx50sec, and 1Bx50sec (540 seconds total). I used the AutoIntegrate.js script using the default options to produce the above result.

Narrowband Processing

AutoIntegrate also supports the processing of narrowband images – here is the result of processing an image of NGC 2070 – the Tarantula Nebula – in the SHO (Hubble) palette:

I discuss the details of the narrowband process here.

Downloading A Sample LRGB Observation

If you don’t happen to have any FITS files available to try out AutoIntegrate.js, I have made available an observation of the Trifid Nebula below. I acquired the image using iTelescope.net, simulating what you would get from the Slooh.com Canary One telescope:

Download Observation of M20 – Trifid Nebula

Acquiring the AutoIntegrate script

Use the PixInsight Manage Repositories option to automatically install and update the script.

The repository URL is as follows:

https://ruuth.xyz/autointegrate/

Use the following steps to install AutoIntegrate:

  1. Start PixInsight and select from the menu Resources – Updates – Manage Repositories.
  2. Click the Add button and paste the following URL in the box:

https://ruuth.xyz/autointegrate/

  1. Click Ok to close the window.
  2. From the menu, select Resources – Updates – Check for Updates and allow the process to complete.
  3. Exit PixInsight (save your work first) and allow it to apply updates.

AutoIntegrate appears under the Scripts / Batch Processing menu.

Using AutoIntegrate.js

Start by adding FITS files from an observation – click the Add Lights button and select FITS files from an observation. The FITS files can be from any of the telescopes that Slooh.com or any other remote telescope service offers; however if you are using anything other than the Slooh.com Canary Three, ensure that you have all four types of files available (L, R, G, and B).

Once you Add Lights, AutoIntegrate sorts the input files based on their type. If you find the sorting to be inaccurate, check the Filter keyword in your files’ FITS header. If your FITS header contains inaccurate information, or the Filter keyword is absent, you can indicate the type of file using the last two letters of the filename – search this article for the Use file name for filters option for details.

The script offers many options at the center of the screen, however, the defaults are good for most cases. Click the Run button to execute the script.

The Process Console will come up, and several other windows will open and close as the script executes actions on the FITS images. Depending on how fast your computer is, this process might take some time since AutoIntegrate.js does quite a bit.

Once complete, you will see ‘Process Complete’ in the Process Console, and you’ll see one image open along with several other minimized windows on your PixInsight desktop.

Click Exit in the AutoIntegrate.js script’s window to dismiss it.

You should now be looking at the final image that AutoIntegrate.js produced for you.

From here, you could continue to adjust the image to taste, you could save it, or export it to some other format.

Understanding What AutoIntegrate.js Does

AutoIntegrate.js does quite a bit. Using the default options, AutoIntegrate does the following with LRGB files:

  1. CosmeticCorrection
  2. Debayer
  3. SubframeSelector
  4. StarAlign
  5. ImageIntegration (average)
  6. LinearFit
  7. ChannelCombination
  8. CurvesTransformation (on RGB)
  9. MultiscaleLinearTransform (reduce noise)
  10. HistogramTransformation (on RGB)
  11. CurvesTransformation (on RGB)
  12. HistogramTransformation (on L)
  13. BackgroundNeutralization (on RGB)
  14. ColorCalibration (on RGB)
  15. LRGBCombination
  16. SCNR
  17. TGVDenoise
  18. ACDNR
  19. MultiscaleLinearTransform (sharpen)

The process is different for color images from Canary Three; the details are documented in the AutoIntegrate.js source code.

Options In AutoIntegrate.js

AutoIntegrate.js offers a number of options in the center of the screen:

Your screen may vary, based on the version of AutoIntegrate.js that’s installed on your system; it is recommended to always keep AutoIntegrate.js up-to-date.

AutoIntegrate.js produces excellent results using its default settings; however, you can customize a lot of its processing. It’s recommended that you start by using all default options, then try some extra processing before you use the other available options.

Understanding The Options

In case you’re not too familiar with PixInsight, you should get into the habit of hovering your mouse over options in dialog boxes because there’s a lot of documentation available there. AutoIntegrate.js is not different: options are explained when you hover your mouse pointer over the respective checkbox.

At the top of the AutoIntegrate.js window are tabs for selecting different processing options; these are discussed later in this article.

The listing of files appears first where you select the files you wish to process. This list gets updated when AutoIntegrate.js runs and finds the best files using SubframeSelector; refer to the icons below the file list for details.

The Setup file section allows you to load and save file lists and script configuration; this can be useful when experimenting with settings.

The Reference image options allow you to either set or reset which images are used for the reference image; AutoIntegrate.js automatically identifies these images when it runs SubframeSelector. The Find reference images option runs SubframeSelctor on its own; this can be useful when automatically filtering images.

The Target type option selects your image’s primary target. The Galaxy option is useful when your target is much brighter than the background and the Nebula option can be helpful when your target is not much brighter than the image’s background.

The table that follows explains the various processing options under the Settings tab:

OptionDetails
Fix column defectsWhen selected, automatically fixes column defects using CosmeticCorrection
Fix row defectsWhen selected, automatically fixes row defects using CosmeticCorrection
Comet alignWhen selected, executes a workflow that uses the CometAlign process for comet image processing; see the mouseover for details about how to process comet images.
Fast integrationWhen selected, uses the FastIntegration process to integrate images (this option is useful when your observation is made up of hundreds of images)
ImageIntegration use ssweightWhen selected, uses weight (quality) as determined by the SSWEIGHT keyword.
Crop to common areaAutomatically crops bad pixels at the sides of images, ensuring only real image data is included in calculations. To check cropping, check the LowRejectionMap_ALL image after processing completes – this image is required for cropping to work. This feature is by Jean-Marc Lugrin.
Use BackgroundNeutralizationIf selected, the BackgroundNeutralization is run before the ColorCalibration process; this may yield better results with some images.
Local normalizationWhen selected, enables the LocalNormalization process after the StarAlignment process; when this is selected ImageIntegration rejection normalization uses Local normalization. You can use this option in conjunction with the Start from ImageIntegration option to add local normalization after your process your images.
ColorCalibration before ABEThe ColorCalibration process executes before ABE when this is selected, otherwise it is run after BackgroundNeutralization
Color calibration using SPCCColor calibrates the RGB image using the SPCC process that requires your image to be plate solved. AutoIntegrate attempts to plate-solve your RGB image based on the information in the FITS header. You should provide the object and telescope focal length under the Processing tab, in the Image solving and color calibration settings sections – in this section, you can search for the object and provide the telescope’s focal length and camera pixel size.
Use ABE on channel imagesWhen selected, uses the AutomaticBackgroundExtractor process on the individual channels before channels are combined
Use ABE on combined imagesWhen selected, uses the AutomaticBackgroundExtractor process on the combined linear images
Use ABE on stretched imagesWhen selected, executes the AutomaticBackgroundExtractor process on the stretched images
Drizzle, scaleWhen selected, uses DrizzleIntegration at the selected scale.
Batch/mosaic modeUses a special batch mode which is useful for processing mosaics.
Use StarXTerminatorWhen selected, uses the optional StarXTerminator process instead of StarNet when an option to remove stars is selected.
Use StarNet2Uses StarNet V2 instead of Starnet to remove stars from images.
Use NoiseXTerminatorUses the optional NoiseXTerminator process to reduce noise; use in conjunction with Non-linear noise reduction option
Use BlurXTerminatorUses BlurXTerminator for deconvolution; set options in the Saturation, noise rediction and sharpening settings section, Sharpening settings section
Solve ImageThis option is selected automatically if you select the Color calibration using SPCC option. This step attempts to retrieve the correct parameters from your files’ header, but you can provide the details in the Image solving and color calibration settings section under the Processing tab.
Narrowband Processing section
Color paletteDetermines how you map narrowband images to RGB; you can make a selection from the dropdown on the left and you can also customize how each channel gets mapped by entering an expression in the R, G, and B boxes. If you decide to enter your own expression, H maps to the H-alpha image, S maps to the SII image, and O maps to the OIII image. You can also select the All option to have AutoIntegrate produce images for all color palettes – this will add quite a bit of time to the overall process and you can save all of the images automatically by clicking the appropriate button under the Save batch result files area.
Luminance mapping Determines how AutoIntegrate maps the luminance image; you can make a selection on the left or enter an expression on the right (L maps to the luminance image).
Force narrowband mappingWhen selected, forces the use of the options in the Color palette section
Narrowband mapping using non-linear dataWhen selected, sets AutoIntegrate to perform the color mapping using the stretched image instead of the linear image. Use the Linear fit option – note the mouseover text for details.
Use multiple mappingsWhen selected, allows you to select which narrowband mappings AutoIntegrate will produce; click the Select button to select the mappings you wish to use.
Other parameters section
No CosmeticCorrectionWhen selected, skips the use of the CosmeticCorrection process
No SubframeSelectorWhen selected, skips the use of the SubframeSelector process; this is useful if you select your own reference image manually.
No ImageIntegration clippingWhen selected, does not clip during ImageIntegration
Remove stars from channelsRemoves stars from individual channel images while they are still linear; this requires the use of StarXTerminator. Choose how stars are added back using options under Processing settings, linear fit and stretching section.
Remove stars before stretchRemove stars from image just before stretching to non-linear state; this requires StarXTerminator. Choose how stars are added back using options under Processing settings, linear fit and stretching section.
Remove stars after stretchRemove stars from image just after stretching; this requires StarXTerminator. Choose how stars are added back using options under Processing settings, linear fit and stretching section.
Remove stars from lightsRemoves stars very early in the processing workflow, just after StarAlignment
Unscreen starsWhen selected, uses a method called unscreen to produce a stars-only image. This method usually keeps star colors correct and this option can be used with the image stretching settings when recombining stars.
New maskWhen selected, always creates a new mask instead of reusing AutoMask
No extra contrast on maskWhen selected, does not add extra contrast on luminance mask.
Shadow clipWhen selected, performs shadow clipping (sets dark pixels to zero) for 0.01% of your image to improve contrast
No SCNRWhen selected, does not run SCNR on image – this is useful when you want to preserve the green in an image when processing objects like comets
No sharpeningWhen selected, skips sharpening of the image.
No noise reductionWhen selected, skip noise reduction; this can be useful if you performed noise reduction on your own.
No star noise reductionWhen checked, does not remove noise on the stars-only image
No color calibrationWhen selected, skips color calibration
Use ABE on light imagesExecutes ABE very early in the processing workflow, before CosmeticCorrection
The following are under ‘Special processing’ settings
Calibrate onlyOnly perform calibration and stop on completing it
Debayer onlyStop after debayering; you can continue processing by selecting the debayered files and choosing the None option for debayering
Binning onlyPerform software-based binning only
Extract channels onlyStopps after extracting channels; you can continue later by selecting the extracted channels
Integrate onlyWhen selected, produces the integrated L, R, G, and B images only – it skips all other processes. Use this option when all you want is a set of images that have been passed through StarAlign and ImageIntegration (depending on settings); this can be useful if you wish to shorten the amount of time you spend manually processing an image.
ChannelCombination onlyWhen selected, produces an RGB image as a result of running ChannelCombination. With the preceding option, this can shorten the amount of time you spend on manually processing an image.
Crop info onlyGenerates the LowRejectionMap_ALL image. To use this option, add the _r.xisf to the file list and select this option. The resulting LowRejectionMap_ALL image can be used with AutoContinue.
Image weight testingWhen selected, measures your frames using SubframeSelector and generates output in the Process Console only. This can be useful for large data sets where you want to measure the quality of images before committing to processing them. This does not produce any output files; only AutoIntegrate.log gets updated along with the output in the process console.
Early PSF checkWhen selected, filters images based on PSF weight before any processing.
Start from ImageIntegrationWhen selected, starts processing after ImageIntegration. You must select the _r.xisf files. Read the mouseover for details.
RRGB imageWhen selected, uses the R image as a Luminance image; this might be useful on some images depending on your preference.
Synthetic L imageWhen selected, produces a Luminance image based on the average of the R, G, and B images; useful when your FITS files are missing the Luminance image.
Synthetic missing imageWhen selected, produces a missing image from the average of the other images; this can be useful if your FITS files are missing an image.
Generate xdrz filesWhen selected, generates drizzle files even when the Drizzle option is not selected. This can be useful when using the Start from ImageIntegration option.
Use file name for filtersEvaluates the current filename instead of looking for the FITS Filter keyword. End filenames as follows: ‘_L’ for Luminance, ‘_R’ for Red, ‘_G’ for Green, ‘_B’ for Blue, ‘_H’ for H-Alpha, ‘_S’ for SII, ‘_O’ for OIII
Do not use FILTER keywordWhen selected, does not try to detect the light or flat image type
Do not use IMAGETYP keywordWhen selected, does not detect type of calibration image
The following are in the System settings subsection
Keep integrated imagesWhen selected, keeps open the integrated L, R, G, and B images when you select the ‘Close All’ button.
Keep temporary imagesKeeps the temporary images open when you select the Close All button
Save processed channel imagesSaves processed channel images and makes them available as icons on your PixInsight desktop; these can be used later with the AutoContinue option
Save all filesSaves all files, including iconized files
Select all filesWhen selected, sets the default file selection to . (all files) instead of image files only
Use unique file namesWhen selected, adds a timestamp to file names to make them unique
Add window prefix to log filesIf specified in the Window Prefix field, adds the prefix to the name of the AutoIntegrate log files
No subdirectoriesWhen selected, output files are not written to subdirectories
Start with empty window prefixWhen selected, clears the Window Prefix field at the upper-right of the AutoIntegrate window. If not selected, the Window Prefix is saved and used for each run of AutoIntegrate. The window prefix is useful when you want to run AutoIntegrate with several images and don’t want to Close All images between each run; using this option allows you to have multiple sets of images open at once.
Manual icon column control This option is useful if you use multiple workspaces. By default, AutoIntegrate keeps track of the location of the icons it creates on your PixInsight desktop. If you select this option and save parameters, on the next run of AutoIntegrate, a new option called Icon Column appears next to the AutoContinue and Close all buttons. This new option allows you to control which column AutoIntegrate uses; the Auto option selects the next available column.
Autosave setupAutomatically saves the script’s configuration after successfully completing including the best files and other details; you can use this for experimenting with different settings without having to reprocess your files from the very beginning. This is not used with AutoContinue.
Use processed filesUses already processed files – this option can be useful when adding files to an already processed set of files and when used in conjunction with the autosave option. This option is also useful when calibrating images; see the mouseover text for details.
Save cropped filesSaves cropped files using the ‘_cropped’ postfix.
Reset on setup loadResets parameters to defaults before loading setup file.
Save final image filesSelect the image format to save your final images.

I discuss the Extra processing for narrowband below.

The following settings are under the Processing tab:

The Stretching settings section controls how the script performs stretching and contains many useful settings; refer to the mouseover text in each option for details.

The Linear fit and LRGB combination settings section controls the linear fit and LRGB combination settings.

The following are under Saturation, noise reduction and sharpening settings:

OptionDetails
Saturation settingSet the amount of increase in the saturation of the linear and non-linear image.
Noise Reduction settingsNoise reduction uses MultiScaleLinearTransform and settings are for the L image and R, G, B, or H, S, O image; the number is the number of layers used to reduce noise. When selected, the color noise reduction checkbox reduces noise on color images.
Sharpening settingsSets options when using BlurXTerminator; refer to the mouseovers for details about each option.

The Image integration and local normalization settings section controls parameters used when integrating images. The normalization parameter is detailed here. The Rejection parameter controls which algorithm is used to reject pixels like satellite trails and is explained in detail here; also note that you can set this option to None which can help when working with images of comets and other bright objects. You can also adjust the parameters used – see the mousover text for details about each parameter.

The Star and comet alignment settings section controls parameters used during StarAlignment; see the mouseover text for details about each parameter; also note that this is where you set the comet starting and ending position using the respective Preview button (see the mouseover text for details regarding comet processing).

The following are under Weighting and filtering settings options:

OptionDetails
Image weight calculation settingsUses image weights (used by SubframeSelector) that are generic, based on noise, or based on other criteria as shown in the dropdown; the default is PSF Signal. Enter a limit value in the Limit field (use the Image weight testing option to determine the value to use here). Outlier filtering selects the options to use when filtering outliers; Outlier method selects the calculation used to identify outliers; see the mouseover for details. Use these options in conjunction with the Filter and Sort option below the listing of files.

I discuss how to use the settings in the following section: Filtering Large Datasets and Working with File Lists.

The Banding, binning and cosmetic correction settings control parameters are used for their respective processes.

The Image solving and color calibration settings control plate solving and color calibration settings. For plate solving, you can search for the target by clicking the Search button or enter the RA and Dec in the box to the left of Search; you should also supply the telescope’s focal length if it is not already filled-in to ensure plate solving succeeds. This option is used in conjunction with Color calibration using SPCC option which color calibrates based on the plate solution that this part of the script performs.

Narrowband processing – sets options for narrowband processing, which I discuss below.

The following is under the Preview and extra processing tab:

Target image for extra processing options select which image you want to operate on; use the settings that follow this section to select processing options.

Generic extra processing Options

Extra processing can apply several processing steps to any selected image. The options are as follows:

Remove stars, UnscreenExecutes the StarNet or StarXTerminator process which produces a starless image and an image containing only stars. Extra processing options get executed on the starless image, except for Smaller Stars which gets executed on the star image. Select the combination method using the dropdown to use to recombine and produce a final result.
Smoothen backgroundSets the pixel value for the background; you can find this value by measuring the pixels in your image.
Banding reductionRuns Canon banding reduction script just after debayering
ABEExecutes the AutomaticBackgroundExtractor process
Clip shadows, percentClips the shadows (sets dark pixels to 0) using the percentage of selected pixels
Darker BackgroundUses a mask to apply a CurvesTransformation to darken the background of the selected image
Darker highlightsMake image lighter using a lightness mask.
Enhance shadowsEnhances shadows using a log function.
Enhance highlightsEnhances highlights using an exponential function.
GammaAdjust the image’s gamma using the selected value; a value below 1 makes the image lighter and a value above 1 makes the image darker.
Normalize channels, referenceNormalizes channels, based on the selected reference
Adjust channelsAdjusts channels using PixelMath; refer to the mouseover for details.
ExponentialTransformExecutes the ExponentialTransform process using the setting in the Order box
HDRMultiscaleTransformUses a mask to apply the HDRMT process to the selected image
LocalHistogramEqualizationUses a mask to apply LHE to the selected image, using the specified kernel radius
Add contrast Uses a mask to apply CurvesTransformation to the selected image using the specified number of iterations
Auto contrastPerforms automatic contrast enhancement using the low and high values
Noise reductionRuns MLT with settings you can specify in the strength option – higher strength applies more noise reduction
ACDNR noise reductionRuns the ACDNR process
Color noise reductionRuns color noise reduction on the image (TGVDenoise)
Star noise reductionReduces noise on the stars-only image
UnsharpMask StdDevUses an unsharp mask to sharpen the image; a luminance mask is used for this process
SharpeningUses MLT and MMT to apply sharpening; specify the number of iterations in the box
SaturationSelects the number of iterations when saturating
Clarity, StdDevUses UnsharpMask to perform a local contrast enhancement
Smaller starsUses MorphologicalTransformation and creates a star mask to reduce stars – select Iterations to make stars smaller; when set to zero, uses erosion method
Combine starless and starsSelect a method to use to combine the starless and stars images
Reduce starsApplies star reduction using Bill Blanshan’s methods

Use the Target image dropdown to select an image that you want to process and click the Apply button to apply the processes in the order shown in the preceding table. There are undo and redo buttons next to the Apply button to make experimentation easier; you can also save the edited image using the Save button.

The following settings are under the Interface settings tab:

Enable previewWhen selected, the Preview tab is visible on the screen. If you change this setting, you must exit the script using the Exit button and restart the script for the change to become effective
Single columnShows all interface options using a single column; restart the script for the option to become active
More tabsAdds tabs labeled Other, Processing 1 and Processing 2 and rearranges available script options
Large previewMakes the preview window larger
Preview width, heightThe Preview width and height are based on your screen resolution; however, you can enter custom dimensions here. Click the Save button and the script will remember the settings when you restart the script.
Process consoleClick the buttons to show or hide the Process console
Toggle PreviewClick the button to toggle the preview in the main window or in a tab view
Save buttonSaves the script’s configuration to persistent settings that get restored when the script starts again; this can be useful when setting default options when running the script

Using AutoContinue

AutoIntegrate.js uses a number of pre-defined names for files and windows and it does this to enable it to support a feature called AutoContinue.

AutoContinue allows AutoIntegrate.js to work with existing images so that you can customize the workflow. For example, if you want to use your own range mask, all you have to do is create it and name the file range_mask and AutoIntegrate.js will detect and use it.

AutoContinue allows you to modify the images AutoIntegrate.js creates and then use them to resume processing. Simply click the AutoContinue button after you make changes to the image(s). There’s an article that uses AutoIntegrate along with the AutoContinue option in a complete workflow for processing an image using PixInsight.

At the top of the AutoIntegrate.js window is a setting labeled Window Prefix. When specified, the prefix is added to all of the window names. This setting is useful when you want to experiment with different settings without affecting the other windows opened by AutoIntegrate. If you use this setting initially, ensure that you specify it again when you want to use AutoContinue.

Using Close All

AutoIntegrate.js leaves a number of windows open but minimized on your PixInsight desktop. You can close these images one by one, but the Close all button finds all of these windows and closes them automatically. Ensure you save your work before you click this button.

Narrowband Processing

AutoIntegrate is also capable of processing narrowband images, that is, images captured using H-Alpha, SII and OIII filters.

The processing steps are similar to that of LRGB the process with a few exceptions. I list the default processes when all default options are used here:

  1. CosmeticCorrection
  2. SubframeSelector
  3. StarAlign
  4. ImageIntegration (average)
  5. LinearFit
  6. ChannelCombination
  7. MultiscaleLinearTransform (reduce noise)
  8. HistogramTransformation
  9. TGVDenoise
  10. MultiscaleLinearTransform (sharpen)

Similar to the LRGB process, AutoIntegrate produces a final image after it completes processing and leaves a few image windows minimized on your desktop.

There are a number of options in this area that affect how narrowband processing works, and in some cases, you need to have available an RGB image to use along with your narrowband image; I explain how this works in this section.

Combining Broadband with Narrowband Images

Many imagers acquire both broadband and narrowband images and then combine the images to produce a result that brings the best of both types of images together in one image.

The ‘Narrowband to RGB mapping‘ section sets options to combine your narrowband image with a broadband/RGB image. You need to ensure that you have both LRGB and narrowband FITS files available to use the settings in this section.

Select the ‘Use Narrowband RGB mapping‘ option to enable the settings. From there, select how you want to map your narrowband to RGB using the dropdowns labeled L, R, G, and B. Select how much you want to boost each channel using the boost values; enter the bandwidth in nm of your filters in the boxes provided.

The Test button allows you to test your mapping, boost, and bandwidth settings without having to execute all of the processes that AutoIntegrate.js normally applies to create a finished image. To use the Test button, you need to have open the ‘Integration_’ H and O files along with the ‘Integration_RGB’ file from your RGB image which you can find in the output folder that contains your images and working files. When you click the Test button, AutoIntegrate produces a linear image that you can use to check the effect of your settings. Remember to note your settings for each run since AutoIntegrate resets the values you put in the boxes each time you run the script. Alternately, save a process icon for each run of AutoIntegrate to save your settings.

To use AutoContinue, open the ‘Integrated_’ H, S, O, and R, G, B images, make your selections, and then click the AutoContinue button to process and combine your images to produce a final image.

Here is a sample observation of the Rosette Nebula, or Caldwell 49, which contains both RGB as well as narrowband (SHO) FITS files for you to try with the settings in this part of AutoIntegrate.js (total integration time is 20 hours):

Download Rosette Nebula broadband and narrowband FITS (275 Mb)

Narrowband Extra Processing Options

There are four extra processing options for narrowband images:

Foraxx mappingSelect the Foraxx mapping you wish to use
Narrowband mappingSelect how you want to map your narrowband image.
Hue shift for more orangeWhen selected, shifts hue of resulting image so that it has more orange/gold color
Hue shift for SHOShifts hue to add more colors in an SHO image
Remove green castWhen selected, runs SCNR with an amount setting of 1.0 for green
Leave some greenWhen selected, runs SCNR with an amount setting of 0.5 for green
Remove magenta colorReduces magenta color in your image
Fix star colorsWhen selected, corrects magenta-colored stars and magenta star halos using a star mask
No mask when fixing star colorsWhen selected, uses a simplified method of fixing star colors; this may affect the other colors in your image

The Narrowband colorization section has settings that allow you to pick individual hue, saturation and weight for each R,G,B channels; refer to the mousovers for details.

You can select the preceding options either when you first process an image or when you want to use the AutoContinue button. If you want to use the AutoContinue button, rename your image RGB_HT, select from the preceding options, and click the AutoContinue button; AutoIntegrate will create a new image called AutoRGB.

Selecting the AutoContinue button without selecting any extra processing options is useful when you want to process images on your own, and then let AutoIntegrate handle the rest of the processing workflow. You can have AutoIntegrate take over at various points in the workflow; read the mouseover for details.

This article discusses a narrowband processing workflow that takes advantage of AutoIntegrate and other scripts to simplify processing yet still takes advantage of PixInsight’s capabilities.

Using AutoIntegrate.js with non-FITS Files

While AutoIntegrate works with FITS and XISF files, you can also get it to work with any type of file that PixInsight supports. For example, you might capture images using a 35mm camera that only produces TIF files: you can use AutoIntegrate in this case too.

Simply name each of your files so that the last two letters of the filename use the following convention:

_LLuminance
_RRed
_GGreen
_BBlue
_CColor
_HH-alpha
_SSII
_OOIII

Your filenames only need to end in the underscore and letter as shown in the preceding table. AutoIntegrate will be able to work with the files as if they were FITS files.

Using AutoIntegrate.js To Calibrate Your Images

AutoIntegrate is capable of calibrating your images using Bias, Darks, Flats, and Dark Flats. Simply add your bias, dark, flat, and dark flat images using the buttons at the top of the AutoIntegrate.js window (you can also add the bias, dark, flat, and dark flat images just by using the Add Lights button and AutoIntegrate.js will attempt to automatically detect the type based on the metadata in the FITS header).

Options when calibrating:

TabOptionComment
BiasSuperBiasWhen selected, creates a super bias from your bias frames – this option is useful when you specify more than one bias frame
DarksPre-calibrateWhen checked, darks are pre-calibrated with bias and not during ImageCalibration; see the mouseover for details.
DarksOptimizeWhen checked (the default), darks are optimized when calibrating lights; see the mouseover for details
FlatsStars in flatsWhen checked, this option will help remove stars from your flats
FlatsDo not use darksWhen checked, does not use darks to calibrate flats – this option is useful if you use a CMOS sensor
FlatsAdd manuallyWhen checked, allows you to add flats manually (the script does not autodetect)

For the Bias, flats, and Flat darks tab, you can specify multiple master files (for example, you might have files for different binning); select the Master files option and add your files. When multiple master files are present, AutoIntegrate.js chooses the one with the same resolution.

Using AutoIntegrate.js with Color Images

AutoIntegrate.js can work with color data. If your FITS file header contains metadata indicating you’re using a color image, AutoIntegrate.js automatically debayers the image. If you’re using OSC.DSLR images, you can specify a debayering option in the Lights tab under the ‘Debayer’ setting by selecting the sensor type your camera uses. If you select the None option then AutoIntegrate.js does not perform any debayering. For the Slooh.com Canary 3 telescope, select the None Debayer option.

New in version 1.37 is an option to extract color channels from OSC color images. Use the Extract channels option located at the upper-right of the AutoIntegrate window; select the option that you require. Extracted channels are saved to disk and can be used in later processing too. The extracted channel filenames end in cc_<color>.xisf where color is the letter representing the color; you can reuse these files in later processing sessions. Color images can benefit from this separation of channels.

Note that for OSC/DSLR files, PixInsight should be put into ‘Pure Raw’ mode (select the Format Explorer, then select RAW, click the Edit Preferences button at the bottom of the screen, click the Pure Raw button, and click Ok).

When processing OSC/color images, AutoIntegrate.js produces an Integration_RGBcolor image which you can use with the AutoContinue option. The Integration_RGB image, the mono image file, is still created.

AutoIntegrate.js Output Directories

When the ‘No subdirectories’ is not selected, AutoIntegrate creates several subdirectories in the same folder as your source image files:

  • AutoOutput – continas the intermediate files produced during processing
  • AutoMaster – contains the master calibration files
  • AutoCalibrated – contains the calibrated light files
  • AutoProcessed – contains the processed final images and log output

At the top of the AutoIntegrate.js window is a setting labeled Output directory; when selected, the preceding folders are put into the directory you specify. Otherwise, the preceding directories are put in the same folder as your input files.

Saving AutoIntegrate.js Settings

You can save AutoIntegrate.js settings like you save a process icon. Once you have selected the options you wish to save, drag the small triangle button to your desktop to create a process icon. To restore your settings, double-click the process icon and then click the Apply Global button (the circle button) to bring up your saved options.

If you update AutoIntegrate.js and want to restore your settings, double-click the process icon, clear out the MD5 checksum field, and then click the Apply Global (circle) button to restore your settings with the new version.

Another way of saving settings is to use the Save button under Save and reset parameters options. The Save button saves all of your settings so that the next time AutoIntegrate runs, it restores your settings.

Yet another way of saving your settings is to use the Save file lists and current settings button near the top of the AutoIntegrate window (the icon looks like this: ). The option saves your listing of files along with all selected settings, making it easier to work with saved file lists and settings allowing you to more easily experiment with different options.

AutoIntegrate.js saves the state of collapsable sections of the display; the script saves the state and restores it automatically and this can be useful for smaller displays.

Filtering Large Datasets and Working with File Lists

You can use AutoIntegrate with large datasets where you want to automatically filter out poor-quality images instead of inspecting each image yourself. This can be useful in cases where you have hundreds of observations and wish to filter automatically. You can still inspect images yourself using the Blink option to view the selected file in the file list; however, the automatic filtering options work to narrow down the listing of candidate files for you to review, possibly saving a lot of time during manual review.

To use the Filter and Sort option, first, add files to AutoIntegrate by using the Add Lights button. Once you have added lights, observe that the files are all checked. Checked files become part of the group of files that AutoIntegrate will process. You can filter the list by having AutoIntegrate measure each file and then applying a filter to the measured values.

To measure the files, click the Filter and Sort button below the listing of files. The process console will show you that all files are checked because we haven’t applied a filter to the files yet.

To apply a filter to the files, expand the Processing settings, weighting and filtering section, and make selections using the options there. The Weight calculation setting selects how AutoIntegrate calculates the relative weight, or quality, of the file under consideration and there are several options to choose from. Click the Filter and Sort button again to execute the filter and note the output in the process console. Experiment with each option and note the output of the files checked and unchecked in the process console. Also note that AutoIntegrate.js lists details about each image as you click it – check the status bar at the very bottom of the AutoIntegrate.js window. Information output includes the image size, exposure time, and the image’s calculated weight (the weight option can be helpful if you want to exclude images below a certain weight using the Limit option). This area is also updated as AutoIntegrate.js processes images so you can see status updates as the script processes your images.

You can further restrict filtering by selecting how AutoIntegrate identifies outliers and the more options you select, the more restrictive the filter becomes. You can also select the Outlier method option, with two sigma being more restrictive than one sigma and note the mouseover text on the Min Max option. Rember to click the Filter and Sort button as you make your changes and note the output in the process console.

Once you have filtered your input files, you can view each file simply by selecting the file in the file list. You might have to move the AutoIntegrate window a little to see your image. An AutoSTF is applied to each image so that you can see it on your screen. Deselect any files you want to reject.

You can save your listing of files and come back to them later. Select the Save file list icon (the disk icon) below the file list to save the listing of selected and unselected files to a file for later use. Use the Load file list icon (the folder icon) to load a previously saved file list.

Note also that you can save your file list and all of your AutoIntegrate settings – click this icon () to save your file list and all selected options.

Remember that you can save the state of the AutoIntegrate script selections to a process icon as discussed in the section before this one: Saving AutoIntegrate.js Settings.

Blinking Images

It can be helpful to view each image in your image set. While you can use the Blink process to view the images in your image set, AutoIntegrate.js also includes a blink feature that, when used along with file lists, can make selecting images that become part of your final image quick and easy.

To blink your image, select an image from your listing of images using AutoIntegrate.js. AutoIntegrate.js displays the image under the Preview tab of the AutoIntegrate.js window.

You can zoom in to your image by clicking the magnifying glass icon. You can select and deselect files using the file list and save the listing of files and even your settings, as explained in the preceding section.

Complete Workflow

I created a complete workflow for processing images based on the AutoIntegrate.js script – you can find the workflow for both LRGB as well as narrowband here.

Conclusion

In this article, you learned about AutoIntegrate.js for PixInsight: you learned how to acquire it, install it, and execute it, you learned about what it does, and learned about its advanced usage. This is a valuable addition to your image processing workflow because it allows you to quickly determine whether your FITS data is good enough to produce a good image before you commit a lot of time to it in PixInsight.