Jump to content

Banner.jpg.b83b14cd4142fe10848741bb2a14c66b.jpg

Pixinsight image stretching – GHS Version 2


Recommended Posts

In December 2021, I issued version 1 of the Generalised Hyperbolic Stretch (GHS) script for Pixinsight.  Since then many Pixinsight users have incorporated GHS into their workflow to great effect (including competition winning images!)

The script provides a complete integrated environment to define, analyse and apply stretches within Pixinsight.  It incorporates the GHS equations which allow a high degree of control over your image stretches, adding contrast exactly where you want it, preventing bloated stars, and controlling background noise. 

Here are just a few comments from GHS users:

·      “incredible breakthrough improvement to linear stretching in PixInsight”

·      “This script will remain a permanent part of my workflow, it's really fantastic”

·      “it’s become my first port of call for the stretch”

·      “really makes it feel like you are in control of what happens to the image”

·      “I can't say enough good things about how Mike's script created a superb framework for stretching images and removed most of the guesswork from this part of the processing”

I am now really pleased to make version 2 of GHS available.  The key improvements from version 1 include the following:

·      Real-time preview

·      Luminance, saturation and colour stretches

·      Full masking support

·      Additional stretch types

·      Secure repository updates (much easier to install!)

·      Dedicated website (https://ghsastro.co.uk) with tutorial videos and more – available directly from within the script

If you are a Pixinsight user and haven’t yet tried GHS, I would really encourage you to give it a go – it’s free!  If you are already a GHS user, thank you for your support and to many of you, thanks also for your feedback and suggestions.  Many of your suggestions have helped inform the content of this release – please do keep them coming!

To install GHS into Pixinsight, add the repository information as follows:

·     If you have GHS Version 1 installed then remove this first, then ...

·     From within Pixinsight go to: Resources>Updates>Manage Repositories

·      In the Manage Update Repositories dialog, click the Add button

·      In the URL box type the GHS repository information as follows: https://www.ghsastro.co.uk/updates/

·      In the Add Pixinsight Repository dialog, click the OK button

·      In the Manage Update Repositories dialog, click the OK button

When you next sign back into Pixinsight you will receive a message to say there are updates available which will include GHS.  Proceed in the same way as you would for any Pixinsight update (including restarting Pixinsight) to complete the installation.

Your comments, feedback and suggestions are very welcome.

Happy stretching and clear skies!

Mike Cranfield

Edited by mike1485
  • Like 3
  • Thanks 6
Link to comment
Share on other sites

Hi Mike, thanks for this.  GHS is great - cannot wait to try out v2.  I just tried to add the update repository and got this error msg "You have specified an unsupported update repository protocol".  It may be b/c I'm still on 1.8.8-6 not the latest version (1.8.8-8?) as my MacBook OS doesn't support the latest Pixinsight (it's too old!).

Cheers

  • Like 1
Link to comment
Share on other sites

52 minutes ago, vineyard said:

Hi Mike, thanks for this.  GHS is great - cannot wait to try out v2.  I just tried to add the update repository and got this error msg "You have specified an unsupported update repository protocol".  It may be b/c I'm still on 1.8.8-6 not the latest version (1.8.8-8?) as my MacBook OS doesn't support the latest Pixinsight (it's too old!).

Cheers

Hi - my mistake - there should be two forward slashes after the https:  I have corrected in the OP now.  Sorry about that and thanks for picking it up. (1.8.8-6 should work fine).

Cheers

Mike

Edited by mike1485
  • Thanks 1
Link to comment
Share on other sites

Thanks Mike for making an excellent well thought out environment to apply GHS stretching.    The first thing that strikes you is the preview, which is great, but there is so much more that you have done here.   My favourite new thing is the "Col" option.   What this option does is use a modification of same technique as the "Arcsinh Process" to enhance the colour saturation of images as you stretch - only this time using the GHS to do the stretch.   That way you can have the best of both worlds - colour saturation enhancement of AP + the benefits/control associated with GHS.   In practice, the GHS actually also produces much less frequent and severe colour artifacts in the brightest stars.   Try the "Col" option rather than "K/RGB" for your colour images.   If it is too much, then use the blend option to find a balance of images stretched with "K/RGB" and "Col".    Mike will be posting a video about this on the ghsastro.co.uk site.  

  • Like 1
Link to comment
Share on other sites

23 minutes ago, Gunshy said:

Hi "Lazy".  Go to Feature Scripts and uncheck the box that points to the directory where you installed v1

 

Thanks - after doing this I then had to go back and add v2 in feature scripts as well, but all sorted now. Looking forward to taking it for a spin shortly 👍

  • Like 1
Link to comment
Share on other sites

15 minutes ago, The Lazy Astronomer said:

Thanks - after doing this I then had to go back and add v2 in feature scripts as well, but all sorted now. Looking forward to taking it for a spin shortly 👍

Thanks guys for sorting this - I have edited the instructions to suggest version 1 is removed before installing version 2.

  • Like 1
Link to comment
Share on other sites

I thought people may want to know of a couple of great new videos that have been released.  Dave Payne has released the first in his GHS2 tutorial series which should be a great place to start to get acquainted with the tool.  Paulyman Astro has also released a video showing how he has used the new functionality in GHS to implement an "Eric Coles" type approach to image processing which can really help make your images pop!  Links to both videos can be found on the https://ghsastro.co.uk website.

  • Like 3
Link to comment
Share on other sites

Hi Mike,

I'm having an issue with the install on a Windows 10 PC.

I downloaded GHS V1 but it seemed to disappear during one of the PixInsight updates and I never tried to install it again. I can't find any files relating GHS in the PixInsight program folder or in the settings.

When I try to update PI to install GHS V2 I get this:

GHS-Error.png.e01e758f5bde1778f46d7a49da02f5c7.png

I didn't get on with V1 as I work best with the live preview, now you've added this functionality and seeing some of the results others have had, I wanted to give it another go.

So any suggestions would be appreciated. :D

Link to comment
Share on other sites

Hi Budgie

The repository information you need to use is: https://www.ghsastro.co.uk/updates/

 

The GitHub repository is available so people can download the files and install manually if they prefer but using the ghsastro repository is my recommended route as it is much easier and means you will automatically receive any updates. 

I hope this sorts things out for you but let me know if you are still having problems. 

  • Thanks 1
Link to comment
Share on other sites

Okay, I'm sold on the new version! :hello2:

I completely reprocessed an image from last weekend of the Cone Nebula region and the only real change was the use of GHS V2, instead of the PI Histogram Transformation for the stretch. Although the colours have changed quite a bit by leaving out the ColourCalibration & PhotometricColourCalibration, which were both used on the original processing, but made it very red. 

I have been able to control the centre of the Christmas Tree Custer a lot better and it's no longer blown out, with added colour & detail. This is only my first attempt with the script and I'm sure things will improve further with more practice.

Top is the GHS version & below is the original.

443795443_NGC2264-ConeNebula-4h52m-NB-05032022.png.c8ea4df4afc39f617cecaaffe1b5d0e2.png

2133802270_NGC2264-ConeNebula-4h52m-NB-05032022.png.a801fee77c34c4afab28a5c343f7ed17.png

  • Like 2
Link to comment
Share on other sites

7 minutes ago, Budgie1 said:

Okay, I'm sold on the new version! :hello2:

I completely reprocessed an image from last weekend of the Cone Nebula region and the only real change was the use of GHS V2, instead of the PI Histogram Transformation for the stretch. Although the colours have changed quite a bit by leaving out the ColourCalibration & PhotometricColourCalibration, which were both used on the original processing, but made it very red. 

I have been able to control the centre of the Christmas Tree Custer a lot better and it's no longer blown out, with added colour & detail. This is only my first attempt with the script and I'm sure things will improve further with more practice.

Top is the GHS version & below is the original.

443795443_NGC2264-ConeNebula-4h52m-NB-05032022.png.c8ea4df4afc39f617cecaaffe1b5d0e2.png

2133802270_NGC2264-ConeNebula-4h52m-NB-05032022.png.a801fee77c34c4afab28a5c343f7ed17.png

Nice work Martin.  That is a great image - thanks for sharing it.

Mike

  • Thanks 1
Link to comment
Share on other sites

Hi, I've installed GHS v2 to PixInsight for the first time and it works really well, so many thanks for this.  However, after installing this I am now seeing 'type errors' all over the place when I run other scripts, e.g. eZprocessing suite scripts - any ideas?

image.png

image.png

image.png

image.png

Link to comment
Share on other sites

1 hour ago, ArEnJee said:

Hi, I've installed GHS v2 to PixInsight for the first time and it works really well, so many thanks for this.  However, after installing this I am now seeing 'type errors' all over the place when I run other scripts, e.g. eZprocessing suite scripts - any ideas?

image.png

image.png

image.png

image.png

 

Something has clearly gone awry there - I don't know if this is a GHS related problem, I am not aware of the issue before.  Are there any other warning/error messages earlier in the GHS session that might give a clue to what may have happened? I would exit Pixinsight and fire it up again - that should clear everything down.  If it happens again and seems related to GHS, if you could try to recall what you were doing in GHS and let me know, I will take a closer look at the issue.

Link to comment
Share on other sites

Hi,

I am seeing this issue on multiple installs across laptops (Win 10 64 / Win 11 64).  To double check I have done a clean install of 1.8.9, but no joy.

> If I close PixInsight and reopen, running scripts from other repositories first, then no issues. 

> I only see the issues after I run the GHS.   Then I see type errors *everywhere*. 

It seems that GSH may not be playing nicely with other custom scripts.  To confirm this, you add the repositories I have listed, run e.g. the eZstretch script without errors, then run GHS  (close / don't save) then retry eZstretch

 

*** Error [022]: C:/Program Files/PixInsight/include/pjsr/NumericControl.jsh, line 382: TypeError: this.updateEditControls is not a function

Regards

 

Roland

 

Link to comment
Share on other sites

I thought people would want to know that Dave Payne has released the next in his GHS2 tutorial series.  Dave's tutorial videos now cover the following:

Tutorial 1: Introducing GHS Version 2

Tutorial 2: More advanced stretching

Tutorial 3: More options, colour stretch and image blending

Links to these videos as well as links to the excellent series prepared by Paulyman Astro  can be found on the https://ghsastro.co.uk website.

  • Like 2
Link to comment
Share on other sites

  • 3 weeks later...

I have today released version 2.1.0 of GHS. A number of features have been included in this update, including the following:

  • Stretches are now recorded in a view’s history with a fully parameterised script instance, allowing this to be dragged and repeated on another view for example.
  • You can now transfer the selected readout point on the histogram to the stretch parameters by clicking the reset button to the right of the relevant parameter’s slider.
  • You can now toggle the preview between “before” and “after” by ctl-click (cmd-click on a Mac) on the preview image.
  • The maximum zoom available on the histogram zoom slider can now be increased in the preferences dialog (use with care on slower systems!).
  • A new stretch visualisation using a greyscale mapping has been added below the histogram – in common with other chart features, this can be turned off if preferred in the preferences dialog.
  • The histogram display has been improved for single channel (R, G or B) stretches so the histogram of the stretched channel can more easily be judged against the unstretched channels.

Plus a number of other changes/improvements/fixes.

Many of the changes introduced in this release have been motivated by the excellent and helpful feedback we have received from users. I would like to take the opportunity to thank everyone who has downloaded GHS and particularly those who have taken the time and trouble to provide their feedback. Your feedback helps to make GHS as useful as it can be for everyone, and your comments help motivate Dave and I in developing the script.

Clear skies and happy stretching

Mike

  • Like 1
  • Thanks 4
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. By using this site, you agree to our Terms of Use.