Pixinsight image stretching – GHS Version 2

Jerry YesavageDavid PayneMike CranfieldScott Badgerkuechlew
376 replies35.5k views
Mike Cranfield avatar
In December 2021, I issued version 1 of the Generalsied 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
Helpful Engaging
Michael Ring avatar
Autoupdates via pixinsight, a great tool has gotten even better, many thanks!
Mike Cranfield avatar
Michael Ring:
Autoupdates via pixinsight, a great tool has gotten even better, many thanks!

Thanks Michael - I am happy you find GHS useful.
mastermerlin avatar
I will use Version 2 in my current project and I already like the new Preview behaviour and the Update function!

Thanks for the contribution!
Well Written Respectful
Dale Penkala avatar
I’ll download and give it a try.

Thanks Mike!

Dale
Well Written Respectful
Mike Cranfield avatar
I will use Version 2 in my current project and I already like the new Preview behaviour and the Update function!

Thanks for the contribution!

Thanks, you are welcome - I hope it works well for you.
Well Written Respectful
Mike Cranfield avatar
Dale Penkala:
I’ll download and give it a try.

Thanks Mike!

Dale

Thanks Dale, I hope you find it helpful.
Mike Cranfield avatar
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.
Well Written Concise
Roger Nichol avatar
Fantastic - this has made a great tool much more easily useable
Dale Penkala avatar
Mike Cranfield:
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.

Great I’ll have to check it out!  Thanks Mike for the heads up!

Dale
Jeff Ridder avatar
Installed and been playing with this. Very impressed with the Arcsinhstretch-like color (using “col”) without the artifacts. And the ability to blend with other stretches directly in the script with preview is also very powerful. So far so good. Nicely done!
Mike Cranfield avatar
Jeff Ridder:
Installed and been playing with this. Very impressed with the Arcsinhstretch-like color (using “col”) without the artifacts. And the ability to blend with other stretches directly in the script with preview is also very powerful. So far so good. Nicely done!

Thanks Jeff. I am pleased it is working well for you so far!
Well Written Respectful
Lorenzo Siciliano avatar
Mike, sorry, I tried to install the new version of GHS but in PI, under Script, Utilities, I see only the old version (v1).
Is it mandatory to uninstall the previous version before installing the new version?
Could be this the issue?
Thanks in advance.
Ciao
Lorenzo.
Michael Timm avatar
Lorenzo Siciliano:
Is it mandatory to uninstall the previous version before installing the new version?


Hi Lorenzo,

you need to delete the old version, it is mandatory.
Thanks guys for this really helpful script, the new version is incredible :-)

CS
Michael
kuechlew avatar
Michael Timm:
Lorenzo Siciliano:
Is it mandatory to uninstall the previous version before installing the new version?


Hi Lorenzo,

you need to delete the old version, it is mandatory.
Thanks guys for this really helpful script, the new version is incredible :-)

CS
Michael

Actually I managed to keep both by having them in folders with different name (in my case GHS_v1 for the first version). It comes at the price of having two entries with the same name in the dropdown menu. so you have to remember which is which. 


As soon as the much appreciated version 2 - a nice improvement on an already great product - turns out to be robust when I use it the next weeks, there is no more reason to keep the old one.

I really like the introduction videos. even using the script regularly over the last weeks I still got some additional ideas out of them.

Clear skies
Wolfgang
Helpful Respectful Supportive
Lorenzo Siciliano avatar
Michael Timm:
Lorenzo Siciliano:
Is it mandatory to uninstall the previous version before installing the new version?


Hi Lorenzo,

you need to delete the old version, it is mandatory.
Thanks guys for this really helpful script, the new version is incredible :-)

CS
Michael

Ok, thank you
Ciao.
Lorenzo
Lorenzo Siciliano avatar
Michael Timm:
Lorenzo Siciliano:
Is it mandatory to uninstall the previous version before installing the new version?


Hi Lorenzo,

you need to delete the old version, it is mandatory.
Thanks guys for this really helpful script, the new version is incredible :-)

CS
Michael

Actually I managed to keep both by having them in folders with different name (in my case GHS_v1 for the first version). It comes at the price of having two entries with the same name in the dropdown menu. so you have to remember which is which. 


As soon as the much appreciated version 2 - a nice improvement on an already great product - turns out to be robust when I use it the next weeks, there is no more reason to keep the old one.

I really like the introduction videos. even using the script regularly over the last weeks I still got some additional ideas out of them.

Clear skies
Wolfgang

Hi Wolfgang.
How did you do that?
For what I know, the automated update doesn't give any folder choice...
David Payne avatar
Mike Cranfield:
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.

I have to apologize ahead of time for the quality of video tutorial - particularly the sound (caused by my laptop fan).   I will invest in a microphone asap to improve the qualtiy of the follow-ups, so there is a slight delay.

Just to comment on what Mike has done with the script - my actual favourite new v2 feature is the "Col" option on the image stretch.   This option uses close to the same methodology as the arcsinh process (AP)  to enhance the saturation of the image - only now you can get this "AP" effect but use the hyperbolic equations to perform the stretch itself.   In my opinion, this yields the best of both!  (To be demo'd in number 3).
Maojin avatar
Just saw this post on the front page and tried it for the first time. To be honest I don't particularly like to strongly disrupt the light/dark relationship, so I got similar results with it to PI's histogram stretching (though better). I think the one of the best things is that it prevents the dark areas from being stretched violently and amplifying the noise. It gets the dark areas are very clean! Excellent script!
kuechlew avatar
Lorenzo Siciliano:
Michael Timm:
Lorenzo Siciliano:
Is it mandatory to uninstall the previous version before installing the new version?


Hi Lorenzo,

you need to delete the old version, it is mandatory.
Thanks guys for this really helpful script, the new version is incredible :-)

CS
Michael

Actually I managed to keep both by having them in folders with different name (in my case GHS_v1 for the first version). It comes at the price of having two entries with the same name in the dropdown menu. so you have to remember which is which. 


As soon as the much appreciated version 2 - a nice improvement on an already great product - turns out to be robust when I use it the next weeks, there is no more reason to keep the old one.

I really like the introduction videos. even using the script regularly over the last weeks I still got some additional ideas out of them.

Clear skies
Wolfgang

Hi Wolfgang.
How did you do that?
For what I know, the automated update doesn't give any folder choice...

Hi Lorenzo,

you can't influence the folder name of the upgrade indeed but you can rename the folder of Version 1 instead of deleting it.

You find the folder in PixInsight/src/scripts. Rename it to your liking. Then you can add it in PixInsight via SCRIPT>Feature Scripts...
Just click on "Add" and point to your folder.

I actually discovered this by accident because my initial installation was already in a folder GHS_v1. So the automatic upgrade just created the second entry.

Hope this helps
Wolfgang
Helpful
Lorenzo Siciliano avatar
Lorenzo Siciliano:
Michael Timm:
Lorenzo Siciliano:
Is it mandatory to uninstall the previous version before installing the new version?


Hi Lorenzo,

you need to delete the old version, it is mandatory.
Thanks guys for this really helpful script, the new version is incredible :-)

CS
Michael

Actually I managed to keep both by having them in folders with different name (in my case GHS_v1 for the first version). It comes at the price of having two entries with the same name in the dropdown menu. so you have to remember which is which. 


As soon as the much appreciated version 2 - a nice improvement on an already great product - turns out to be robust when I use it the next weeks, there is no more reason to keep the old one.

I really like the introduction videos. even using the script regularly over the last weeks I still got some additional ideas out of them.

Clear skies
Wolfgang

Hi Wolfgang.
How did you do that?
For what I know, the automated update doesn't give any folder choice...

Hi Lorenzo,

you can't influence the folder name of the upgrade indeed but you can rename the folder of Version 1 instead of deleting it.

You find the folder in PixInsight/src/scripts. Rename it to your liking. Then you can add it in PixInsight via SCRIPT>Feature Scripts...
Just click on "Add" and point to your folder.

I actually discovered this by accident because my initial installation was already in a folder GHS_v1. So the automatic upgrade just created the second entry.

Hope this helps
Wolfgang

That did the trick! 
Thank you so much, Wolfgang.
Ciao.
Lorenzo
Well Written Respectful
Bernard DELATTRE avatar
Incredible - It's a great tool, much more intuitive than the first version, thanks to the preview. I still have to work on color and saturation.
Richard avatar
Definitely giving it a go!
Michael Feigenbaum avatar
I just began working with this, very impressive indeed!
Barry Wilson avatar
Mike - thank you very much for your efforts in creating this versatile script.  I have downloaded ver2 this week and following your tutorial I have processed a couple LRGB images and I have been impressed with my results on quite faint tricky targets.

If it's of any interest for performance, I have in the last couple of weeks bought a new Apple 14" MacBook Pro using the M1 Pro chip and GHS works very well.

I am not sure if I have spotted an issue though, after using GHS I had an error message regarding a 'preview' when I was using the Colour Mask script.  When I do not use GHS I do not receive the 'error' message.  I will note more detail if I get a chance tomorrow to process data and will update this thread.  The error message reported by PI did not appear to affect the performance of any process or script.  So it may be trivial if there is indeed some sort of issue.

Regardless of the above, the GHS script will be forming a routine part of my processing workflow.  Thanks once again.

Cheers, Barry
Helpful Respectful Engaging Supportive