GHS top notch stretching GHS Made a Substantial Difference · jacquesdeacon · ... · 15 · 338 · 0

jacquesdeacon 3.05
...
· 
·  5 likes
Hi Everybody,

I am  a huge fan of GHS, it is now central to my workflow, in my mind nothing comes close to the level of control GHS gives during the critical process of stretching. 

Here was my comments from an earlier cloudy nights forum thread:

https://www.cloudynights.com/topic/814932-pixinsight-image-stretching-–-ghs-version-2/?fromsearch=1

I urge everybody to give it a good look. You will be amazed at the details you can stretch out of your images with GHS, in combination with good background modelling and star-removal.
It takes practice and patience, but well worth mastering the tool - stretching is a very important step in astro-processing, and GHS give you master-level control over this process.

I also want to thank the developers for the continued development and point this out to other people; GHS evolved quite a bit since release, so if you tried it early on, and maybe struggled, give the latest version a go again. Many features was introduced to make it more user friendly and even give more control!

If I can wish for anything, I would love to see some kind ‘matched stretching’, where one can say, match a colour image stretch to that of a luminance image stretch, to make the L-RGB combination process a little easier.

Also, I think GHS deserves to be migrated from the scripts section to the process section in PI. I think it is mature enough for that. That way, I believe the user base will also increase.

Regards and thanks again for a brilliant innovation!

Regards,
Jacques
Like
Jolivetj 0.00
...
· 
·  1 like
Hi!
I also use GHS and enjoy the precise stretching it can deliver. 
my only issue is that StarExterminator performs poorly on GHS stretched images with many larger stars not removed. I contacted Russ Cronin and send him a GHS stretched image and he confirmed my findings. He wrote that ‘GHS can produce star profiles that are nearly indistinguishable from many small elliptical galaxies and may not be removed by StarXTerminator’. 
I wonder if the GHS creators can create a workaround. 
Merci
Jacques Jolivet
Like
p088gll 2.15
...
· 
·  2 likes
Jacques Jolivet:
Hi!
I also use GHS and enjoy the precise stretching it can deliver. 
my only issue is that StarExterminator performs poorly on GHS stretched images with many larger stars not removed. I contacted Russ Cronin and send him a GHS stretched image and he confirmed my findings. He wrote that ‘GHS can produce star profiles that are nearly indistinguishable from many small elliptical galaxies and may not be removed by StarXTerminator’. 
I wonder if the GHS creators can create a workaround. 
Merci
Jacques Jolivet

Hello Jacques,
I would think that you normally remove the stars before you apply any GHS - and put them in afterwards. I cant think of any reason to remove the stars after a GHS.
Regards
Götz
Like
Jolivetj 0.00
...
· 
·  1 like
Yes, that is my new workflow. I previously used to do a simple STF-HT stretch of an RBG image and could use StarExterminator on the stretched image with no issue before further processing.
Like
Gunshy61 10.10
...
· 
·  1 like
Hi Everybody,

I am  a huge fan of GHS, it is now central to my workflow, in my mind nothing comes close to the level of control GHS gives during the critical process of stretching. 

Here was my comments from an earlier cloudy nights forum thread:

https://www.cloudynights.com/topic/814932-pixinsight-image-stretching-–-ghs-version-2/?fromsearch=1

I urge everybody to give it a good look. You will be amazed at the details you can stretch out of your images with GHS, in combination with good background modelling and star-removal.
It takes practice and patience, but well worth mastering the tool - stretching is a very important step in astro-processing, and GHS give you master-level control over this process.

I also want to thank the developers for the continued development and point this out to other people; GHS evolved quite a bit since release, so if you tried it early on, and maybe struggled, give the latest version a go again. Many features was introduced to make it more user friendly and even give more control!

If I can wish for anything, I would love to see some kind ‘matched stretching’, where one can say, match a colour image stretch to that of a luminance image stretch, to make the L-RGB combination process a little easier.

Also, I think GHS deserves to be migrated from the scripts section to the process section in PI. I think it is mature enough for that. That way, I believe the user base will also increase.

Regards and thanks again for a brilliant innovation!

Regards,
Jacques

Thanks Jacques,

Especially for the suggestions/wishes.   

On the first one - if you are using an "extracted lum", of course the same parameters applied to the luminance channel should result in the same brightness as an RGB or colour stretch on the RGB image.   I agree with you that it would be helpful to be able to stretch to the same "brightness" end result when the starting luminance channel is different from the luminance of the colour image.   One option is to do a linear scaling (LinearFit in PI) in linear mode and then duplicate the stretch - but this may not give the desired histogram distribution that you like even if the brightness is the same.  The issue is that the answer is non-unique, but the potential does exist to at least give an answer as a starting point, and as I mentioned in the introduction, development of an algorithim to generate a set of stretching parameters to yield a desired histogram distribution is being thought about.

As for your second wish, and I don't want to @Mike1685 's thunder too much, a module/process version will be available shortly, and I have been testing this implementation lately.    Not only does this eliminate all the issues associated with scripts, it opens up the possibility of calling GHS itself from within another script.   This means that anyone (with more coding skills than me) with a solution to your first wish, can write a script to solve your first wish.   

In addition to be a module/process Mike has implemented some additional features that make optimizing the stretch way easier, but it now time for me to shut-up.

Cheers,
Dave
Like
Gunshy61 10.10
...
· 
Jacques Jolivet:
Hi!
I also use GHS and enjoy the precise stretching it can deliver. 
my only issue is that StarExterminator performs poorly on GHS stretched images with many larger stars not removed. I contacted Russ Cronin and send him a GHS stretched image and he confirmed my findings. He wrote that ‘GHS can produce star profiles that are nearly indistinguishable from many small elliptical galaxies and may not be removed by StarXTerminator’. 
I wonder if the GHS creators can create a workaround. 
Merci
Jacques Jolivet

Like
Gunshy61 10.10
...
· 
·  1 like
Hi Jacques
Yes, I have noticed the same thing too.  On a couple of occasions (in linear mode) I have been so impressed that both Starnet2 and StarExterminator have removed all the stars in a very star-rich image, yet left only a couple of small galaxies behind.  Not only that, but these AI programs have to also ensure they don't remove any nebulosity that may have some star-like attributes too - I guess there is an area somewhere where the binary decision between star and not star becomes very difficult.
One workaround that I have used is to take the starry image - overstretch the stars (not too much - no clipping!) using a b=0 and and a modest D and record the parameters used to make this stretch.   This stretch will be much less gentle on the stars, making them less gaussian, and brighter - making them more recognizable as stars to the AI.  Then do the star extraction.   Finally, back into GHS to do the inverse stretch (note -  this is a mathematical inverted stretch, not the stretch of an inverted image) and apply to both the overstretched starless image and the associated star mask.
Hope this helps,
Dave
Like
msadkd 0.90
...
· 
·  3 likes
I really like the GHS tool and I am really liking the results that I am getting.

If I could request one feature it would be to have the capability to read in a previously saved GHS log file to repeat the same stretches (R, G, and B all having the same stretch) or to act as a starting point for a totally new stretch, or to provide a path for removing previously applied stretches.

I really appreciate the work that has gone into developing this tool and would like to thank Dave and Mike.

Mike
Like
Gunshy61 10.10
...
· 
·  2 likes
Michael McGowan:
I really like the GHS tool and I am really liking the results that I am getting.

If I could request one feature it would be to have the capability to read in a previously saved GHS log file to repeat the same stretches (R, G, and B all having the same stretch) or to act as a starting point for a totally new stretch, or to provide a path for removing previously applied stretches.

I really appreciate the work that has gone into developing this tool and would like to thank Dave and Mike.

Hi Michael,

I believe the parameters are also saved in the Pixinsight history panel of an image.   Otherwise, if you iconify the script, it will retain its parameters.   THis isn't exactly what you are asking for, but maybe it helps.

Cheers,
Dave
Like
jacquesdeacon 3.05
...
· 
David Payne:
Hi Everybody,

I am  a huge fan of GHS, it is now central to my workflow, in my mind nothing comes close to the level of control GHS gives during the critical process of stretching. 

Here was my comments from an earlier cloudy nights forum thread:

https://www.cloudynights.com/topic/814932-pixinsight-image-stretching-–-ghs-version-2/?fromsearch=1

I urge everybody to give it a good look. You will be amazed at the details you can stretch out of your images with GHS, in combination with good background modelling and star-removal.
It takes practice and patience, but well worth mastering the tool - stretching is a very important step in astro-processing, and GHS give you master-level control over this process.

I also want to thank the developers for the continued development and point this out to other people; GHS evolved quite a bit since release, so if you tried it early on, and maybe struggled, give the latest version a go again. Many features was introduced to make it more user friendly and even give more control!

If I can wish for anything, I would love to see some kind ‘matched stretching’, where one can say, match a colour image stretch to that of a luminance image stretch, to make the L-RGB combination process a little easier.

Also, I think GHS deserves to be migrated from the scripts section to the process section in PI. I think it is mature enough for that. That way, I believe the user base will also increase.

Regards and thanks again for a brilliant innovation!

Regards,
Jacques

Thanks Jacques,

Especially for the suggestions/wishes.   

On the first one - if you are using an "extracted lum", of course the same parameters applied to the luminance channel should result in the same brightness as an RGB or colour stretch on the RGB image.   I agree with you that it would be helpful to be able to stretch to the same "brightness" end result when the starting luminance channel is different from the luminance of the colour image.   One option is to do a linear scaling (LinearFit in PI) in linear mode and then duplicate the stretch - but this may not give the desired histogram distribution that you like even if the brightness is the same.  The issue is that the answer is non-unique, but the potential does exist to at least give an answer as a starting point, and as I mentioned in the introduction, development of an algorithim to generate a set of stretching parameters to yield a desired histogram distribution is being thought about.

As for your second wish, and I don't want to @Mike1685 's thunder too much, a module/process version will be available shortly, and I have been testing this implementation lately.    Not only does this eliminate all the issues associated with scripts, it opens up the possibility of calling GHS itself from within another script.   This means that anyone (with more coding skills than me) with a solution to your first wish, can write a script to solve your first wish.   

In addition to be a module/process Mike has implemented some additional features that make optimizing the stretch way easier, but it now time for me to shut-up.

Cheers,
Dave

Thanks Dave,

Looking forward seeing the new developments!

Regards,
Jacques
Like
mike1485 23.42
...
· 
·  1 like
Hi Everybody,

I am  a huge fan of GHS, it is now central to my workflow, in my mind nothing comes close to the level of control GHS gives during the critical process of stretching. 

Here was my comments from an earlier cloudy nights forum thread:

https://www.cloudynights.com/topic/814932-pixinsight-image-stretching-–-ghs-version-2/?fromsearch=1

I urge everybody to give it a good look. You will be amazed at the details you can stretch out of your images with GHS, in combination with good background modelling and star-removal.
It takes practice and patience, but well worth mastering the tool - stretching is a very important step in astro-processing, and GHS give you master-level control over this process.

I also want to thank the developers for the continued development and point this out to other people; GHS evolved quite a bit since release, so if you tried it early on, and maybe struggled, give the latest version a go again. Many features was introduced to make it more user friendly and even give more control!

If I can wish for anything, I would love to see some kind ‘matched stretching’, where one can say, match a colour image stretch to that of a luminance image stretch, to make the L-RGB combination process a little easier.

Also, I think GHS deserves to be migrated from the scripts section to the process section in PI. I think it is mature enough for that. That way, I believe the user base will also increase.

Regards and thanks again for a brilliant innovation!

Regards,
Jacques

Hi Jacques

Thanks for these comments/suggestions. One observation on the Lum stretch issue - it is worth noting that once you have combined the Lum and RGB you can then fine tune the luminance stretch by selecting the L* stretch mode. This mode essentially extracts the luminance channel, stretches it, then recombines. Note, what we often refer to as the luminance channel is actually the L*, lightness channel - if you use LRGBCombination, for example, the "Luminance" image you specify actually replaces the CIEL* channel in your RGB image! So, using the L* mode in GHS is precisely equivalent to extracting the luminance tweaking the stretch and then recombining but with the benefit of this happening in one movement and with the real-time preview to help fine tune.

As for the process module, as Dave has said we are in the final stages of development and testing and we expect to be releasing it during the Autumn.

CS, Mike
Like
mike1485 23.42
...
· 
·  1 like
David Payne:
Hi Jacques
Yes, I have noticed the same thing too.  On a couple of occasions (in linear mode) I have been so impressed that both Starnet2 and StarExterminator have removed all the stars in a very star-rich image, yet left only a couple of small galaxies behind.  Not only that, but these AI programs have to also ensure they don't remove any nebulosity that may have some star-like attributes too - I guess there is an area somewhere where the binary decision between star and not star becomes very difficult.
One workaround that I have used is to take the starry image - overstretch the stars (not too much - no clipping!) using a b=0 and and a modest D and record the parameters used to make this stretch.   This stretch will be much less gentle on the stars, making them less gaussian, and brighter - making them more recognizable as stars to the AI.  Then do the star extraction.   Finally, back into GHS to do the inverse stretch (note -  this is a mathematical inverted stretch, not the stretch of an inverted image) and apply to both the overstretched starless image and the associated star mask.
Hope this helps,
Dave

Dave's method outlined here works really well - keeping b=0 is key, this leaves the stars in a more recognisable form so that the star removal software can work its magic! One word of warning: make sure you use the RGB/K stretch not a Col stretch.  The latter can clip data, especially in brighter stars, so when you apply the inverse transformation you don't quite get back to where you started. The RGB/K stretch is precisely analytically invertible so avoids any such issues.

CS, Mike
Like
jacquesdeacon 3.05
...
· 
Mike Cranfield:
Hi Everybody,

I am  a huge fan of GHS, it is now central to my workflow, in my mind nothing comes close to the level of control GHS gives during the critical process of stretching. 

Here was my comments from an earlier cloudy nights forum thread:

https://www.cloudynights.com/topic/814932-pixinsight-image-stretching-–-ghs-version-2/?fromsearch=1

I urge everybody to give it a good look. You will be amazed at the details you can stretch out of your images with GHS, in combination with good background modelling and star-removal.
It takes practice and patience, but well worth mastering the tool - stretching is a very important step in astro-processing, and GHS give you master-level control over this process.

I also want to thank the developers for the continued development and point this out to other people; GHS evolved quite a bit since release, so if you tried it early on, and maybe struggled, give the latest version a go again. Many features was introduced to make it more user friendly and even give more control!

If I can wish for anything, I would love to see some kind ‘matched stretching’, where one can say, match a colour image stretch to that of a luminance image stretch, to make the L-RGB combination process a little easier.

Also, I think GHS deserves to be migrated from the scripts section to the process section in PI. I think it is mature enough for that. That way, I believe the user base will also increase.

Regards and thanks again for a brilliant innovation!

Regards,
Jacques

Hi Jacques

Thanks for these comments/suggestions. One observation on the Lum stretch issue - it is worth noting that once you have combined the Lum and RGB you can then fine tune the luminance stretch by selecting the L* stretch mode. This mode essentially extracts the luminance channel, stretches it, then recombines. Note, what we often refer to as the luminance channel is actually the L*, lightness channel - if you use LRGBCombination, for example, the "Luminance" image you specify actually replaces the CIEL* channel in your RGB image! So, using the L* mode in GHS is precisely equivalent to extracting the luminance tweaking the stretch and then recombining but with the benefit of this happening in one movement and with the real-time preview to help fine tune.

As for the process module, as Dave has said we are in the final stages of development and testing and we expect to be releasing it during the Autumn.

CS, Mike

Thanks Mike,

I will keep that in mind, thats very neat.

Best regards,
Jacques
Like
StuartT 4.69
...
· 
·  1 like
Hi Everybody,

I am  a huge fan of GHS, it is now central to my workflow, in my mind nothing comes close to the level of control GHS gives during the critical process of stretching. 

Here was my comments from an earlier cloudy nights forum thread:

https://www.cloudynights.com/topic/814932-pixinsight-image-stretching-–-ghs-version-2/?fromsearch=1

I urge everybody to give it a good look. You will be amazed at the details you can stretch out of your images with GHS, in combination with good background modelling and star-removal.
It takes practice and patience, but well worth mastering the tool - stretching is a very important step in astro-processing, and GHS give you master-level control over this process.

I also want to thank the developers for the continued development and point this out to other people; GHS evolved quite a bit since release, so if you tried it early on, and maybe struggled, give the latest version a go again. Many features was introduced to make it more user friendly and even give more control!

If I can wish for anything, I would love to see some kind ‘matched stretching’, where one can say, match a colour image stretch to that of a luminance image stretch, to make the L-RGB combination process a little easier.

Also, I think GHS deserves to be migrated from the scripts section to the process section in PI. I think it is mature enough for that. That way, I believe the user base will also increase.

Regards and thanks again for a brilliant innovation!

Regards,
Jacques

I absolutely echo Jacques here. GHS is a fantastic tool! I do it after PCC and tend to do it in three stages (not too much each time). First time I use a high value of b (6-8), then a mid value (say 4), then lastly a low value (1). This gives me very subtle control. Each time I place the symmetry point just fractionally to the right of the histo peak

I notice some people are saying you should remove your stars first, but I've not tried that. I always do it on the starry image and then only remove stars for the processes like deconv, LHE etc.

Thank you to the creators for giving us such a marvellous addition to PI
Edited ...
Like
StuartT 4.69
...
· 
·  1 like
I have a question on doing star removal pre-stretching. 

Obviously this will mean that the extracted star map is also unstretched, so it presumably it also needs to be stretched prior to adding the stars back in to the final image.

So my question is how do you stretch the star map? Do you save the GHS settings used to stretch the starless image and run exactly the same stretch? Or do you do a stretch from scratch?
Like
Gunshy61 10.10
...
· 
Hi Stuart.

I'll give you my answer, but my take is that in theory, I am the best astro-image processor there is, butin practice I am only OK.

For an emission, NB image (without Lum channel), I will carefully DBE the image as best as I can, and then create the following 4 images to work with..

Working images

1) I use a clone of the channel combination as my starry image.  I will try and duplicate correct RGB star colour with PCC.  If I have monochrome data I might used an HOO image to accomplish this - but the focus on this exercise is to get pretty good star colour.
2) In linear mode, I use a clone of  image 1 - remove the stars and create a star mask, the star mask will be used later to put the stars into the starless image.  From the linear, coloured star  mask, I extract the luminance.  This luminance star_mask is my image 2.
3) From the starless clone of 1, I first manually calibrate the colours on the background and nebulosity.   You can do this any way you like - but I use GHS to stretch, individually, the lower to colour past the highest colour and then bring it back with HP.   Note that this method was illustrated using GHS in the @Paul Hancock  youtube video.   Admittedly, I have been using a beta module/process version of GHS that @Mike Cranfield  has created from the script.  This starless image colour calibration is dead simple using the module/process version because you can keep the STF (screen transfer function with colours linked) active on the image/preview and adjust GHS parameters using this in addition to the histogram.   Anyways, I am digressing a bit.
4) From the colour calibrated starless image, I first use the RGB working space to equalize colour weighting, and then extract the luminance of the starless image.   I will obtain the PSF from image 1 and then perform deconvolution on the starless luminance.   Best results are generally obtained by turning off deringing completely, but still using the FT noise reduction thingy with 5 layers and strong parameters.   The nice thing here is that deconvolution is very rapid and yields great results when there are no star artifacts to worry about!

NR and Stretching.

I generally do NR at this stage on image 3 and 4 only.  Then I stretch the images using GHS. 

I typically try and use almost the full histogram for the images. 

For image 1, I try an focus my stretches on preserving/enhancing star colour and getting them the right brightness.  I don't care really what is happening with the nebulosity  I am stretching this for the stars.

I also stretch image 2 (the star mask).  Here also I am only concerned with the star brightness, but I also what to make sure that star halo are what I want them to be .  I generally stretch this image somewhat less than image 1 as it will form the mask to re-introduce the stars.  THe important thing is that its value remain 0 where there aren't stars and that you get the "tightness versus halos", or "circles vs gaussian" where you want it.

Images 3 and 4 I try to stretch almost equally.  This can be done side by side.   I try and put as much contrast as I can within the nebulosity / background and will even over-do it to some extend if the starfield I am going to put back in is rich and will distract from the nebulosity details.

Additional Processing for starless image(s).

HDRMT, LHE, additional stretching, and sharpening I generally reserve for image 4.  When then I use LRGB combination to recombine with image 3 with some NR (prior to combination often).  Then I make adjustments on the combined image if I want.

Add back in the stars.

Finally, I mask the final starless image with the somewhat-mildly-stretched star mask (image 2).   Then I use Pixelmath, setting the modification/equation to the starry image (image 2) and set to "modify the existing image" and apply to the starless image.   Poof, the stars will appear on the starless image.   If the stars are too dim, then reapply Pixelmath until the desired star brightness appears.

So in this methodology, there is no need to do star extraction in non-linear mode.   This avoids the missed stars issue, when routines that are gentle on stars during the stretch aren't recognized by the star removal AI.

Hope this helps.
Dave
Like
 
Register or login to create to post a reply.