Create marketing funnels in minutes!

Your page? Unpause your account to remove this banner.

Learn more
Kozmosi Logo
Articles/PixInsight/Astro Secrets: Enhancing the Night Sky's Hidden Wonders

Astro Secrets: Enhancing the Night Sky's Hidden Wonders

Faisal Khan

Monday, October 09, 2023

In the quiet embrace of the night, the heavens above spin tales of ancient mysteries and cosmic ballets. Each star, a distant echo of time, each galaxy, a swirl of luminous dreams. As we stand on this tiny blue speck called Earth, our souls yearn to capture these ethereal stories, to hold a piece of the infinite in our hands.

The PixInsight Dark Structure Enhance (DSE) script is not just a tool, it's like a magic wand that lets you touch the very fabric of the universe, revealing the delicate dance of light and shadows. Let’s dive into the art of astrophotography, and let the cosmos show its most intimate secrets to you.

The Science Behind the Dark Structure Enhance Script

Astrophotography is not just about capturing the bright and the beautiful. It's about revealing the hidden, the subtle, and the intricate. The DSE script in PixInsight is designed to do just that. I mean imagine being able to enhance the delicate dust lanes in a galaxy millions of light-years away, or bring out the faintest nebulosity in a star cluster. It's almost like having superpowers.

What Makes DSE Stand Out?

The DSE script enhances faint structures in the dark regions of astronomical images. It's a boon for images of deep space objects, where capturing faint nebulosity and dust lanes is a challenge.

The Mechanism? The DSE operates best on non-linear image data, enhancing the contrast of dark structures without affecting the brighter regions. This ensures that the final image is free from noise and artifacts.

Enhancing the Invisible: How DSE Brings Out the Hidden Beauty

The true magic of the DSE script lies in its ability to bring out details that might otherwise remain hidden in the shadows. What If I told you, that with just a few clicks, your image can transform from a flat and dull representation of the night sky to a vibrant, detailed masterpiece?

Adaptable and Flexible: The DSE script is versatile. Whether you're working with images that have varying levels of darkness or different types of celestial objects, the DSE can be fine-tuned to achieve optimal results. Users can adjust parameters like the enhancement amount, scale of structures, and the scaling function.

Mask Extraction: An added advantage is the option to extract the mask used during the enhancement process. This mask can be pivotal in further refining the image.

NGC3324 | Dark Structure Enhance Mask | Kozmosi.io

Original Image on the left, Dark Structure Map in the Middle and final output on the right.

Using the Dark Structure Enhance Script in PixInsight

For those eager to dive into the practicalities, here's a step-by-step guide to discover the power of the DSE script.

Navigating PixInsight

Navigating the intricacies of PixInsight can be hard for beginners but don't worry, we've got you covered. The A to Z of PixInsight series is a comprehensive guide that takes you through the basics to advanced techniques inside the pixinsight workflow like DSE.

Access the DSE script via the Process Explorer's search bar or the script menu item.
Under the utilities option, you'll find the Dark Structure Enhance script.

Note: The DSE script does not come with built-in documentation, and the property browser Description field lacks additional information. However, this guide will cover all the options the script provides.

Understanding the Script's Sections

It takes only a few seconds to execute the DSE on an image. But before you do that, let's look at the various sections of the script:

Target Image Selector

This section allows users to select the view for the DSE script. A word of caution: avoid selecting preview windows as this can lead to errors. The dropdown lists all available views in all workspaces, including Preview windows. If a preview window is chosen, the script will produce an error.

PixInsight | Dark Structure Enhance Mask | Kozmosi.io

Mask Parameters

Here, users can define layers to remove, extract masks, and choose the scaling function. The "layers to remove" parameter determines the size of structures that will be ignored by the DSE script.

For instance, a default value of eight means structures of eight pixels or smaller will be removed. This helps in reducing noise introduction during enhancement. The "extract mask" option outputs the generated mask used during the process, which can be useful for manual adjustments later on.

PixInsight | Dark Structure Enhance Mask | Kozmosi.io

The "scaling function" option provides two choices: the default five by five B Spline function and the three by three linear interpolation function. Each has its characteristics and impact on the mask generation.

DSE Parameters

This section lets users control the DSE algorithm, adjusting the amount parameter and setting the number of iterations. The "amount" parameter determines the blend of the transformed image with the original. 

For instance, a value of 0.4 means the final image will be 40% transformed and 60% original. The "iterations" parameter allows the DSE process to run multiple times successively, enhancing the details further with each iteration.

PixInsight | Dark Structure Enhance Mask | Kozmosi.io

Delving Deeper: Advanced Techniques and Tips

When it comes to astrophotography, experimenting and tinkering with settings can lead to stunning results. It's like being a scientist in a lab, exploring the unknown. Here are a few tips to take your DSE game up a notch:

The Extract Wavelet Layers Script

PixInsight workflow allows users to decompose images into layers, revealing structures of different sizes. This script can be accessed from the Process Explorer and provides insights into how the DSE script perceives the image.

The extracted layers can be inspected individually, and the script doubles the pixel size with every layer. This understanding helps in fine-tuning the "layers to remove" parameter in the DSE script.

Moon | Dark Structure Enhance Mask | Kozmosi.io

Original Image

Wavelet Layers | Dark Structure Enhance Mask | Kozmosi.io

Wavelet Layer 0

Wavelet Layers | Dark Structure Enhance Mask | Kozmosi.io

Wavelet Layer 1

Wavelet Layers | Dark Structure Enhance Mask | Kozmosi.io

Wavelet Layer 2

Wavelet Layers | Dark Structure Enhance Mask | Kozmosi.io

Wavelet Layer 3

Residual Layers | Dark Structure Enhance Mask | Kozmosi.io

Residual Layer

Fine-tuning with Curves Transformation

Once the DSE script has done its magic, further refinement can be achieved using the Curves Transformation tool. This tool allows users to adjust the lightness component, enhancing the details in the image.

By creating an S curve, users can push the values back a little, enhancing the details even further. The transformation can be previewed in real-time, and the changes can be toggled on and off to compare the before and after effects.

Real-world Application: Enhancing the Cosmic Cliffs Image

You may be wondering, what difference can one script make? The answer is, a significant one. Let's take the example of the DSE script applied to an image of the Cosmic Cliffs Nebulae.

The Cosmic Cliffs Image

NGC3324 | Dark Structure Enhance Mask | Kozmosi.io

This image, sourced from the JWST database, showcases the nebula, with stars removed to provide a clearer view of the nebula itself.

NGC3324 | Dark Structure Enhance Mask | Kozmosi.io

The DSE script's application on this image brings forth more details, especially in the darker regions, enhancing the overall visual appeal of the image.

Applying the DSE script

Applying the DSE script is like adding a finishing touch to the image. It might not be apparent, but it makes all the difference in bringing out the hidden beauty in astrophotography.

Before applying the DSE script, ensure that the image has no masks applied. The DSE script internally creates and applies masks as part of its transformation process. If a mask is already applied to the image, the DSE script will not function correctly.

When executing the DSE script, there's an option to extract the mask used during the process. This mask can be invaluable for manual adjustments later on.

After applying the DSE script, the darker parts of the Cosmic Cliffs image will reveal more intricate details, enhancing the visual depth of the image.

Refining the Image with Curves Transformation

Refining the image with Curves Transformation allows users to push the details even further.

Once the DSE script has been applied and the mask generated, further refinement can be achieved using the Curves Transformation tool available in the PixInsight workflow.

By selecting the lightness component in the Curves Transformation tool, users can make adjustments to enhance the details in the image further.

A real-time preview window in PixInsight allows users to see the changes being made in real-time. By creating an S curve, users can push the values back a little, enhancing the nebula's details even further.

The transformation can be previewed in real-time, and the changes can be toggled on and off to compare the before and after effects. This is particularly useful to ensure that the desired effect is achieved without over-processing the image.

Once satisfied with the adjustments, apply the Curves Transformation, and disable the mask to view the final results.

PixInsight | Curves Transformation | Kozmosi.io

Conclusion: The Future of Astrophotography with Kozmosi.io

The DSE script is more than just a tool, it's a game-changer for astrophotographers. Whether you're an enthusiast or a professional, the script promises to elevate your images, revealing the hidden wonders of the cosmos.

At Kozmosi.io, we're committed to guiding you on this celestial journey, offering insights, techniques, and a platform where the universe's wonders come alive. Join us, and let's explore the cosmos together. Just Imagine, What's Out There. Remember, the possibilities are endless when it comes to capturing the beauty of the cosmos.

References and Additional Resources

Many of the concepts in this article were inspired by the following resources and I would highly recommend you check them out!

Learn More

Expand your Astrophotography processing skills with Susie, the self-described "Angel Astronomer". Get the A to Z of PixInsight Masterclass membership and learn how to use PixInsight as a professional Astrophotographer.    

Dark Structure Enhance | A to Z of PixInsight | Kozmosi.io