Author Topic: Using STF for permanent stretches  (Read 4446 times)

Offline rdryfoos

  • PixInsight Old Hand
  • ****
  • Posts: 377
Using STF for permanent stretches
« on: 2016 September 29 03:05:53 »
This is a big issue out here.  I have been getting ALLOT of advice never to use the STF for permanent stretches.  Experienced PI users recommend using curves and manual Histogram manipulations for stretching  NEVER THE STF.  I was taught by Vicent at a seminar to use the STF--so I need to hear it from the PI team--Does the STF try to use the whole dynamic range for an image, not leaving any room at the high end for such things as star reduction or stretching tweeks?  That was one of the issues mentioned--among others.  Please, what is the truth?  I have been having trouble getting excellent data (everyone says my data is very good when they process it) to look decent, and one of the primary reasons THEY say is my use of the STF.  Are they correct?

Thanks,

Rodd

Offline msmythers

  • PTeam Member
  • PixInsight Jedi
  • *****
  • Posts: 1178
    • astrobin
Re: Using STF for permanent stretches
« Reply #1 on: 2016 September 29 06:27:15 »
Rodd

This is only my opinion but there is no absolute only one way to 'stretch' an image. It depends on the image and exactly what you want from that image. I don't know how repeatable your imaging cessions are but mine are not repeatable over the course of a night let alone a week. Could it be that what Vicent was saying was use STF for that one exact type of image with that quality. Also quality cannot be totally judged by looking at an image either. Was Vicent saying from a science stand point. Remember when people say use this method or that method they may be looking for only a pretty picture or they have totally different equipment that may not lend itself to using STF. Also the STF auto feature can be an aggressive stretch for those who have less then idea(noisy) images. Like most PI tools it is possible to change the parameters that STF uses to determine how it will stretch the image.

Myself I use what ever tool works. Some images I use masked stretch, some pixelmath, some histogram transformation, some autohistogram, some STF(with changed parameters) and some a combination of these tools. Why? Because I process images for myself. I always have very noisy images and no 2 imaging cessions produce the same quality of image. If I was doing science I would probably lock into a method I could properly document but I'm not.

Using STF will always get you a certain amount of repeatably. It works great for beginners because the auto function removes the possibility of doing something wrong and not knowing why. Does it always do the best job, depends on the user requirements. That's why we have tools we can manually set parameters. One thing I will say, If STF was intended on being the absolute preferred way by PixInsight to stretch an image I would think it would have the ability to be used without Histogram Transformation. 

Just my opinion.



Mike

Offline rdryfoos

  • PixInsight Old Hand
  • ****
  • Posts: 377
Re: Using STF for permanent stretches
« Reply #2 on: 2016 September 29 06:42:12 »
Thanks for the input.....So from what you said I take the following....STF is for beginners, more advanced people would probably use STF with modified settings, and even more advanced people would probably not use STF for permanent results.  Kind of a mixed bag.  Remember--the people that have been giving me advise are experts in both PI and processing--some of the best images on the web.  They are adamant against using STF.  As far as repeatability--if I use Calibration, Cosmetic correction, alignment, integration, DBE (or ABE), BN, CC and STF to Histogram--in that order-it is immanently repeatable every time--for every image.  But non linear processing is the opposite--not repeatable unless I do exactly the same thing in exactly the same order-which I never do because I am always looking to improve the results......So--PI team....please chime in.  I respect your assessment Mike....lord knows your images make mine look like garbage.  But I really want to hear from the PI designers.  Juan wrote a lengthy article regarding the misconceptions of....can't recall what at this point....but he set the record straight. 

Offline vicent_peris

  • PTeam Member
  • PixInsight Padawan
  • ****
  • Posts: 988
    • http://www.astrofoto.es/
Re: Using STF for permanent stretches
« Reply #3 on: 2016 September 29 14:41:16 »
Hi Rodd,

This is a big issue out here.  I have been getting ALLOT of advice never to use the STF for permanent stretches.  Experienced PI users recommend using curves and manual Histogram manipulations for stretching  NEVER THE STF.

Never say never. And I would recommend to be cautious when somebody says never if strong arguments are not provided. Being said this, as we told in the intensive workshop, there are strong reasons to use STF to stretch the image, specially when we follow an LRGB workflow:

- The auto-stretch settings are based on perceptual properties of the image that, at the same time, rely on robust statistics of the image. First, we can set up a sky background level with the target background parameter. Then, we can choose the aggressiveness of the stretching with the shadows clipping parameter. These two perceptual factors drive the stretching process of any image, even if you do it manually without any automation tool. This way, when we have an RGB image and an L image, we can apply a stretching with the same target background and the same aggressiveness to both images. This means that the histogram stretching parameters will be different for each image, but the perceptual settings of the stretching will be the same for both.

- The key problem of the LRGB workflow, and a general rule applicable to other techniques, is that both images should be compatible before trying to assemble the composite. Applying the same auto-stretch parameters for both the RGB and the L images is way more accurate than performing a manual stretching because that compatibility relies on robust statistics of both images. The images stretched with this technique will have the same sky background level and will have a similar noise level, so the LRGB composite will run smoothly.

Apply processes manually does not mean necessarily to apply a more advanced technique. What I propose is a workflow that combines automation -required to reach a precision level difficult to reach manually- with a manual check of the key points. In this workflow, what's really important is to check the stretching that's being applied by STF in the HistogramTransformation tool; you should always check if you're clipping significative data in the shadows. There are images where a small amount of clipping is not important (let's say you clip 0.1% of the pixels) just because they come from noise uncertainty. There are other images where that 0.1% can be very significative, like a small dark nebula that's actually darker than the sky background; in that case you should modify the auto-stretch settings to avoid clipping that nebula. These are details that you should learn from your experience.

On the other hand, this workflow is not more "scientific" at all. I would say it's more artistic, since the art work is partially based on perceptual facts. Any art requires a technique; by making that technique more objective you don't give it a scientific meaning.

Does the STF try to use the whole dynamic range for an image, not leaving any room at the high end for such things as star reduction or stretching tweeks?

Yes, it uses the whole dynamic range, in exactly the same way as you would do with a manual histogram stretching, basically because you never clip the highlights. So that reasoning doesn't make any sense.


Best regards,
Vicent.

PS: Of course, this workflow is not the only good way to stretch your images; there are many other techniques that yield to different results; but this workflow has its unique advantages, properties and goals.

Offline rdryfoos

  • PixInsight Old Hand
  • ****
  • Posts: 377
Re: Using STF for permanent stretches
« Reply #4 on: 2016 September 29 15:40:24 »
Hi Rodd,

This is a big issue out here.  I have been getting ALLOT of advice never to use the STF for permanent stretches.  Experienced PI users recommend using curves and manual Histogram manipulations for stretching  NEVER THE STF.

Never say never. And I would recommend to be cautious when somebody says never if strong arguments are not provided. Being said this, as we told in the intensive workshop, there are strong reasons to use STF to stretch the image, specially when we follow an LRGB workflow:

- The auto-stretch settings are based on perceptual properties of the image that, at the same time, rely on robust statistics of the image. First, we can set up a sky background level with the target background parameter. Then, we can choose the aggressiveness of the stretching with the shadows clipping parameter. These two perceptual factors drive the stretching process of any image, even if you do it manually without any automation tool. This way, when we have an RGB image and an L image, we can apply a stretching with the same target background and the same aggressiveness to both images. This means that the histogram stretching parameters will be different for each image, but the perceptual settings of the stretching will be the same for both.

- The key problem of the LRGB workflow, and a general rule applicable to other techniques, is that both images should be compatible before trying to assemble the composite. Applying the same auto-stretch parameters for both the RGB and the L images is way more accurate than performing a manual stretching because that compatibility relies on robust statistics of both images. The images stretched with this technique will have the same sky background level and will have a similar noise level, so the LRGB composite will run smoothly.

Apply processes manually does not mean necessarily to apply a more advanced technique. What I propose is a workflow that combines automation -required to reach a precision level difficult to reach manually- with a manual check of the key points. In this workflow, what's really important is to check the stretching that's being applied by STF in the HistogramTransformation tool; you should always check if you're clipping significative data in the shadows. There are images where a small amount of clipping is not important (let's say you clip 0.1% of the pixels) just because they come from noise uncertainty. There are other images where that 0.1% can be very significative, like a small dark nebula that's actually darker than the sky background; in that case you should modify the auto-stretch settings to avoid clipping that nebula. These are details that you should learn from your experience.

On the other hand, this workflow is not more "scientific" at all. I would say it's more artistic, since the art work is partially based on perceptual facts. Any art requires a technique; by making that technique more objective you don't give it a scientific meaning.

Does the STF try to use the whole dynamic range for an image, not leaving any room at the high end for such things as star reduction or stretching tweeks?

Yes, it uses the whole dynamic range, in exactly the same way as you would do with a manual histogram stretching, basically because you never clip the highlights. So that reasoning doesn't make any sense.


Best regards,
Vicent.

PS: Of course, this workflow is not the only good way to stretch your images; there are many other techniques that yield to different results; but this workflow has its unique advantages, properties and goals.
Thank you--I suspected as much.  I guess I need to take any advice with a grain of salt, and find my way.  I have found that using the changeable STF levels in the hidden menu that you mention is essential--otherwise the image can get overstretched and stars get bloated.  I was just using STF without any modifications to the sliders--purely automatic, and I was overstretching.  When I reduced the shadows clipping slider and then used curves and/or masked stretch the image came out better.  I like the STF because it is easy and repeatable--but maybe it should be used as one element of an initial stretch and not as the only element relied upon.  Make sense?

Offline vicent_peris

  • PTeam Member
  • PixInsight Padawan
  • ****
  • Posts: 988
    • http://www.astrofoto.es/
Re: Using STF for permanent stretches
« Reply #5 on: 2016 September 29 15:43:00 »
Absolutely. Very good.

V.

Offline eganz

  • Member
  • *
  • Posts: 50
    • Eric Ganz Flickr
Re: Using STF for permanent stretches
« Reply #6 on: 2016 October 01 06:29:33 »
Rodd,

I'm sure that Juan would tell you that the STF is specifically designed to show the linear images during processing. For example, it often shows quite a bit of noise and stretches strongly to aid in processing.
He would encourage you to use the tools that are specifically designed for stretching for stretching.

It sounds like the experts know what they're talking about…

You've already found out that there are many ways to carry out these tasks.
I'm sure that PixInsight Padawan Vicent is also giving you good advice, a modified way to use the STF for stretching. Now that you found the sliders and hidden menus,, this should work better.

Be sure that you achieve great image quality before you go for repeatability.

I encourage you to experiment with the histogram transformation tool. You will find that this gives you great control and visibility into the process. I think you will also find that it stretches your images more gently and carefully. (And be sure to learn about all the  elements of this tool including the previews and high range extension etc.). As you develop your skills, you can use the different tools in different situations, or start to mix the tools.

Eric
« Last Edit: 2016 October 01 07:07:57 by eganz »

Offline vicent_peris

  • PTeam Member
  • PixInsight Padawan
  • ****
  • Posts: 988
    • http://www.astrofoto.es/
Re: Using STF for permanent stretches
« Reply #7 on: 2016 October 01 06:59:40 »
Hi Eric,

Yes, the STF tool has been designed for inspection purposes. But there is something much more important in my workflow. You could think that my workflow is a "tricky" use of the STF; that "tricky" part is very important, since it comes from experimentation. And experimentation is seed of creativity. You could think PixInsight is a cutting edge tool; my contribution to the platform has been to be continuously playing on that cutting edge: one should always try to be on the forehead of the already existent tools. This has been always necessary, and it has been key to the development of many tools in PixInsight, since every time I work on a new image I need new functionalities at software level.

In fact, we are going to release a new stretching tool based on this technique.


Best regards,
Vicent.

Offline eganz

  • Member
  • *
  • Posts: 50
    • Eric Ganz Flickr
Re: Using STF for permanent stretches
« Reply #8 on: 2016 October 01 08:22:45 »
Vicent,

The original poster inquired why not to use STF, so I wanted to add some explanation on that point.
I certainly defer to your greater experience.

I also wanted to encourage him to spend some time with the histogram transformation tool so that he can improve his stretching skills.

I'm not familiar with your method, but I'm glad to hear that you are making this available as a new tool, and that it is "tricky"… We can certainly use new, better, more reliable, and easier stretching methods.

Perhaps you could outline your workflow in more detail for us…

Eric