To capture a faint details of deep sky objects and to reduce noise, astrophotographers take multiple images of the same target over a period many hours and many nights. However, these images won’t be perfectly aligned due to slight camera movements or tracking errors during exposure. The PixInsight Star Alignment process aligns all these individual subframes, allowing them to be combined into a single image. Stacking combines the signal from all the aligned images, resulting in a much deeper, cleaner final image with less noise and improved signal-to-noise ratio.

Apart from aligning stars within individual images, star alignment can also aid in registering frames within a panorama. Mosaics expand the captured field of view to encompass a larger portion of the sky beyond the limits of the imaging system. This process is detailed within a separate, mosaic workflow.

Star Alignment

The PixInsight Star Alignment process (Process – Image Registration – Star Alignment) can often be applied with default settings.

Star Alignment - Basic Configuration
Star Alignment – Basic Configuration

To get started, provide the following general information

  • Reference Image: This is the highest quality image identified during the PixInsight Subframe Selector process. All other images get aligned to the reference.
  • Registration Model: Projective Transformation and Thin Plate Splines are the two most used registration models within PixInsight. For mosaic creation, use Projective Transformation.
    • Projective Transformation: Corrects for basic misalignments like rotation, scaling, and skew. This registration model expects a significant portion of the image to be part of each image. This is the most common registration model for single frame images (non-mosaic)
    • Thin Plate Splines: More flexible model that can handle various distortions, including those caused by coma, astigmatism, and field curvature. This works well when subframes have a minimal overlap. This is appropriate for mosaic images
  • Working Mode: Register/Match Images. This mode takes each individual subframe (target) and aligns it with the reference image (best subframe). The output is a new, independent image for each subframe that has the following characteristics:
    • Has the same size as the reference image.
    • The stars from the target panel are positioned accurately within the reference image canvas.
    • As subframes are adjusted, black edges appear on the edges
  • Generate Drizzle Data: Enable. This will allow for the implementation of Drizzle Integration later to create higher resolution images. It doesn’t take much disk space or processing time to complete at this stage.
  • Target Images: Select the subframes to align. There are two different approaches for selecting the target frames: Per Filter or Per Object.
    • Per Object: In the per object scenario, all frames for the object, regardless of filter, are selected. Every image uses the same reference image, star detection settings, and star matching settings. This is the easiest and fastest approach.
    • Per Filter: In a per filter scenario, the target images are selected based on the used filter. This approach is useful when star alignment has issues with star detection or matching for a filter. If possible, use the same reference image across all filter sets so all subframes, regardless of filter, are aligned.
  • Output Images: Select the folder to store the new, aligned subframes.

Apply this process and wait for the results.

Troubleshooting: Issues with Star Detection

Sometimes, the defaults don’t work and the following error appears

“Unable to find a valid set of star pair matches” or “Unable to find an initial linear transformation”

This is when we start to tweak the Star Detection and Star Matching parameters.

To troubleshoot the reason for the failed alignment, it is important to look at the output from the process console to first determine if there are issues with star detection.

Detected Stars
Detected Stars

One of the first tasks the script performs is to detect stars in the reference image and the target subframe. How many stars were detected in the reference? What about the subframe? Does the number seem right based on the image? Or does the number seem too high or too low? For these difficult images, the Star Alignment Parameters will require adjustments.

Star Alignment - Star Detection
Star Alignment – Star Detection

There are a many settings to adjust to try and improve the star detection algorithm. A good place to start is to determine what stars the process currently detects. Load one of the target images and change the process to Working Mode: Detected Stars. When this gets applied to the loaded image, a new image gets created containing points for the stars currently detected in the target image. Note: It is a good idea to invert the detected stars to make them easier to see.

This will hopefully make it easier try and understand the root cause of the issue. Use the following as a guide to for what parameters to focus your attention on:

  • Is the image noisy? Focus on the Noise Reduction and Peak Response settings.
  • Are most of the stars dim? Focus on the Detection Scales, Sensitivity settings, and Peak Response settings.
  • Are most of the stars very large? Focus on the Detection Scales setting
  • Are most of the stars small? Focus on the Detection Scales setting
  • Are the stars distorted (not circular)? Focus on the Maximum Distortion setting.
  • Are too many stars being detected? Focus on the Sensitivity and Hot Pixel Removal settings

With an understanding of how these parameters work, they can be modified to help with image detection issues.

  • Detection Scales: Determines the size of the stars that the script should search for. Increase the scale to find larger stars, which might overlook smaller stars. If you decrease the scale, the script will focus on the smaller, dimmer stars. If the image contains mostly big, bright stars (common in open clusters), increase the scale. For images containing many dim stars, lower the threshold.
  • Hot Pixel Removal: If the camera is generating a lot of hot pixels, the script could consider these as stars, which will not match with the reference catalog. A hot pixel consistently outputs a higher value, appearing as a bright speck in the image. The Star Alignment process can remove ignore detected hot pixels from the star detection process by modifying the Hot Pixel Removal option. Setting this value to “1” looks for hot pixels that are 1 pixel in size, which is typical. A better option is to use Cosmetic Correction to handle hot pixels before solving.
  • Noise Reduction: If the image is noisy, false stars could be detected while true stars (faint and small) are missed. The Noise Reduction parameters applies a temporary noise reduction to the image. Increase the value to apply a greater noise reduction filter on the image. However, this will reduce the star position accuracy. Unless the image is extremely noisy, this parameter can often be left at 0 (disabled).
  • Sensitivity: Adjustments to the sensitivity slider below .50 will limit the script to focus on brighter stars, helping to reduce the number of detected stars. Adjusting above .50 will allow the script to focus on fainter stars, helping to increase the number of detected stars. This is useful when the image only has a few bright stars and many faint stars.
  • Peak Response: Determines how bright a pixel needs to be for it to be considered part of a star. A higher value is more selective, only focusing on brighter pixels as potential stars. This is useful for noisy images. However, increasing this parameter will often miss fainter stars within the image. If the image is dim or contains many faint stars with low noise, lower the value.
  • Bright Threshold: This parameter is a rejection threshold. It excludes pixels that are completely saturated in the image. This is useful if there is a bright foreground object (like an airplane or satellite). Unless the image is overexposed or contains bright foreground objects, this parameter can often be left at the default value.
  • Maximum Distortion: Most stars will not be perfectly round. The maximum distortion parameter allows you to set how far from a circle a star can be for it to be considered a star. A perfect circle has a value of 0.8 and the default value is 0.6, which shouldn’t require modifications.

Troubleshooting: Issues with Star Matching

If the Star Alignment process appears to be detecting the right number of stars, the next area of focus is to investigate the Star Matching parameters.

Star Alignment - Star Matching
Star Alignment – Star Matching

A good place to start is to determine what stars the process currently is able to match. Load one of the target images and change the process to Working Mode: Matched Stars. When this gets applied to the loaded image, two new images are created. The image called “Matched Stars” are the stars matched with the reference frame. The other image shows the stars detected in the target frame.

This process makes it possible to see which stars are detected to help determine what settings to modify.

  • Distortion Model: Stars on the edges of the panels are often distorted and warped, causing challenges for the star alignment process. If a distortion model was created during with the PixInsight Image Solver script, select the file. However, this is more of an issue with mosaics.
  • Undistorted Reference: If a distortion model is provided, do not select this option because the reference image is probably also distorted.
  • Maximum Stars: Simply determines how many stars to use for matching. More stars takes more time to process. Leaving the default of “Auto” is often the best case as the process will determine the optimal number of stars.
  • Descriptor Type: Defines the way the process characterizes stars for the purpose of finding matches between the reference image and target panels (individual mosaic images). By using a more detailed descriptor, Star Alignment can achieve more accurate matching, especially when dealing with challenging scenarios like distortion or faint stars. Descriptors are defined by geometric shape. The more sides of the shape equates to more information about a star, which is helpful when working with distorted stars. More complex geometric shapes requires more processing time, but can help identify more matches.
  • Descriptors per Star: Defines the number of data points used to describe a star.
  • Computer Intersections: This setting optimizes the star matching for mosaics. Not applicable for a single frame image.
  • Restrict to Previews: Enabling this option, the star matching will be limited to the preview window created on the target image. This can help reduce the scope of the matching to the best part of the image that is defined by the preview.
  • Scale Tolerance: Determines how the process handles variations in star sizes during the alignment process. This parameter allows Star Alignment to consider stars within a certain range of sizes around the expected size for a match. This flexibility helps account for slight variations in star size due to imperfect optics. If Star Alignment struggles to find enough matches, consider increasing the scale tolerance cautiously to allow for more flexibility in size matching. However, be mindful of potentially including outliers with significantly different sizes.

What’s Next

With a light frames aligned, the image processing can continue based on the respective workflow: