The Generalized Hyperbolic Stretch script has been a fantastic addition to my processing workflow in PixInsight. The script’s author has made the Generalized Hyperbolic Stretch script a process, making it faster and more tightly integrated with PixInsight.

The following are detailed steps to process the sample image of Messier 51 which you can download here (you can also download from the Samples page). I assume that you’re somewhat familiar with PixInsight. This is the final image that we’ll produce:

The steps that follow teach you how to:

  • Stretch the luminance image
  • Add contrast to NGC 5195
  • Stretch the color image
  • Add saturation to the color image
  • Combine the Luminance and RGB image
  • Adjust the histogram of the final image

If you haven’t already installed the GHS process, follow the directions in this section (direct link).

Stretching an Image using the Generalized Hyperbolic Stretch Process 

Use the following steps to process the images:

  1. Process the Luminance and RGB images to the point where you are ready to stretch them:

    For the sample Luminance image, use AutomaticBackgroundExtractor at the default settings (set the Correction parameter to Subtract and check the Discard background model and Replace target image). For the RGB image, assuming that you combined the channels, use BackgroundNeutralization with the default parameters, AutomaticBackgroundExtractor as you did with the Luminance image, and then use the ColorCalibration process at its default settings.

  2. If you haven’t already started it, start the ScreenTransferFunction process and enable the Track View option (checkmark icon)

    This is what my screen looks like (Luminance at the upper-left and RGB at the bottom-right):



  3. Start the GeneralizedHyperbolicStretch process
  4. Make the Luminance image the active image
  5. Disable the STF by clicking the computer icon in the STF window, or by pressing CTRL+F12 on your keyboard
  6. On the GeneralizedHyperbolicStretch process, click the Zoom In button (it should say 250 in the box to the left of the magnifying glass icons)
  7. Carefully drag the scrollbar below the black histogram display until you see the bump in the histogram. The scrollbar moves the display quite a bit, and you only need to move the scrollbar a very small amount to see the bump in the histogram. This is what my screen looks like:



  8. Click within the histogram window, at the point where the bump on the graph starts to rise from the x-axis; a yellow line will appear. This is what my screen looks like:




  9. Click the Send to SP button (if you don’t see the button on the screen, expand the process’s Readout Data section)
  10. Set the Local intensity parameter to 8
  11. Click the Zoom 1:1 button to adjust the histogram window
  12. Click the real-time preview button (the open circle) to bring up the real-time preview
  13. Slowly drag the slider next to Stretch factor until the bump on the histogram reaches the first quarter; this is what my screen looks like:



  14. Close the real-time preview and drag the triangle icon from the GeneralizedHyperbolicStretch process to the Luminance image to make the stretch permanent
  15. Reset the GeneralizedHyperbolicStretch process

    In the following steps, we’re going to make the nebulosity around NGC 5195 more apparent by stretching just that part of the image data that contains the nebulosity.

  16. Open the real-time preview
  17. Click somewhere in the nebulous region near NGC 5195; this populates the fields in the Readout Data section
  18. Click the Send to SP button (the value I used for SP was 0.408347)
  19. Set the Local intensity to 8
  20. Set the Stretch factor to about 0.16; you want to make the Luminance image just a little brighter at this point
  21. Close the real-time preview
  22. Drag the triangle icon from the GeneralizedHyperbolicStretch process window to the Luminance image; we’re done with the Luminance image now
  23. Make the RGB image the active image
  24. Click the Reset button in the GeneralizedHyperbolicStretch process window (bottom-right icon)
  25. Repeat steps 5-13, except this time in step eight, click near the highest point of the colored bump in the histogram window; this is what my screen looks like:



  26. Close the real-time preview and drag the triangle icon from the GeneralizedHyperbolicStretch process to the RGB image to make the stretch permanent
  27. Reset the GeneralizedHyperbolicStretch process window (bottom-right icon)
  28. Expand the Color Options section of the GeneralizedHyperbolicStretch process
  29. Select Saturation for the Mode parameter
  30. Open the real-time preview
  31. Set the Local intensity to about 2.55
  32. Set the Stretch factor to about 1.32; the galaxy should have more apparent color at this point
  33. Use the LRGBCombination process to combine the Luminance with the RGB

    This is what LRGBCombination process looks like (note that I selected Chrominance Noise Reduction):



    Drag the triangle icon from the LRGBCombination process to the RGB image to combine

  34. Open the HistogramTransformation process and where it says No View Selected and select the RGB image
  35. Open the real-time preview
  36. Move the slider shown in the screenshot below until the background becomes a little darker; this is what my screen looks like:




  37. Close the real-time preview
  38. Drag the triangle icon from the HistogramTransformation process to the color image to make the change permanent

Your final image is on the screen; save your image or save the whole workspace as a project so that you can come back to the workspace again some other time.

More About GHS

This article is part of a series on GHS, here are the other articles in this series:

Conclusion

In this article, you learned how to use the GeneralizedHyperbolicStretch process to stretch a sample image of Messier 51; along the way, you learned how to set the SP parameter, you learned about local intensity, and you adjusted the saturation of the color image.