Author Topic: MaskedStretch artifact with larger stars  (Read 5759 times)

Offline mwilliams

  • Newcomer
  • Posts: 12
MaskedStretch artifact with larger stars
« on: 2014 January 23 06:46:29 »
Hello, I really like the MaskedStretch script, but always end up with a very bright white core in the larger stars.
I've tried every setting I can think of, and used a number of different star masks (my own and using starmask).
Anyone have any advice on how to avoid this?  Thanks!    matt


Offline mwilliams

  • Newcomer
  • Posts: 12
Re: MaskedStretch artifact with larger stars
« Reply #1 on: 2014 January 23 06:48:50 »
Hmmm....looks like my image didn't attach.  here is a dropbox link.

https://www.dropbox.com/s/095irhdstjt8o87/star.jpg

Silly question, but how do you attach images?  I clicked the "insert image", but then what?

Offline Juan Conejero

  • PTeam Member
  • PixInsight Jedi Grand Master
  • ********
  • Posts: 7111
    • http://pixinsight.com/
Re: MaskedStretch artifact with larger stars
« Reply #2 on: 2014 January 23 06:59:19 »
There is no artifact in this image; it is just a saturated star core. You cannot fix saturated star cores because there are no data on these areas (well, saturated areas can be replaced with invented or fake data, but we are not interested in retouching or painting practices here).

To fix saturated stars, you should acquire short-exposure data and merge them with the HDRComposition tool.
Juan Conejero
PixInsight Development Team
http://pixinsight.com/

Offline pfile

  • PTeam Member
  • PixInsight Jedi Grand Master
  • ********
  • Posts: 4729
Re: MaskedStretch artifact with larger stars
« Reply #3 on: 2014 January 23 08:55:53 »
note also this can happen to a star that's not terribly saturated to start with, but becomes saturated in the core due to deconvolution.

sometimes you need to protect the cores of bright stars during deconvolution to avoid this problem.

rob

Offline mwilliams

  • Newcomer
  • Posts: 12
Re: MaskedStretch artifact with larger stars
« Reply #4 on: 2014 January 23 09:08:48 »
Sounds good.  Thanks Juan and Rob.

Offline Phil Leigh

  • PixInsight Addict
  • ***
  • Posts: 220
Re: MaskedStretch artifact with larger stars
« Reply #5 on: 2014 January 23 09:56:42 »
This might be a stupid question, but why doesn't the masked stretch mask FULLY protect the saturated core? If the core is saturated it cannot be increased in value any more but its surrounding pixels can...?

(I do agreet hat HDRComposition is the solution - I'm just trying to understand what exactly is going on).

Offline dgbarar

  • PixInsight Enthusiast
  • **
  • Posts: 91
Re: MaskedStretch artifact with larger stars
« Reply #6 on: 2014 January 23 10:21:53 »
Hi Phil,

I have also asked myself this question.  Hope we get a good answer.

Don
AP 155 EDF
Paramount ME
ST10 XME/CFW 8A

Offline Carlos Milovic

  • PTeam Member
  • PixInsight Jedi Master
  • ******
  • Posts: 2172
  • Join the dark side... we have cookies
    • http://www.astrophoto.cl
Re: MaskedStretch artifact with larger stars
« Reply #7 on: 2014 January 23 11:26:49 »
Hi Phil
This happens only if you previously set the white point of the image so the star cores are a pure 1.0. Star cores may be saturated by the sensor's limited capability, but it doesn't mean that they'll have to be white. For example, raw Canon data is stored in the least meaningfull bits, so since the ADC is only 12 or 14 bits, we end with the saturated data around 0.125 (or a quarted of this). Add to this the use of calibration frames, color calibration, etc... at the end of the linear stage, the values of the star cores may be anything.

Regards,

Carlos Milovic F.
--------------------------------
PixInsight Project Developer
http://www.pixinsight.com

Offline Juan Conejero

  • PTeam Member
  • PixInsight Jedi Grand Master
  • ********
  • Posts: 7111
    • http://pixinsight.com/
Re: MaskedStretch artifact with larger stars
« Reply #8 on: 2014 January 23 11:59:38 »
Quote
why doesn't the masked stretch mask FULLY protect the saturated core?

Once one pixel has been saturated, there is no solution: the data have been lost forever—and if someone tells you a different story, you can bet he or she is lying. In the example image posted above, the star cores are already saturated *before* applying MaskedStretch.
Juan Conejero
PixInsight Development Team
http://pixinsight.com/

Offline Phil Leigh

  • PixInsight Addict
  • ***
  • Posts: 220
Re: MaskedStretch artifact with larger stars
« Reply #9 on: 2014 January 24 01:46:13 »
OK - I think I understand. This example is why I asked the question - in this crop of the Horsehead, Alnitak is very bright... but the linked STF on the right show a nice white (saturated?) core, whereas the masked stretch (on the left) leaves behind an unstretched (pink) core...

I like what STF does, but not what masked stretch does :-)

It seems to me that  the mask is too strong on the cores of very bright objects.

I understand you will say I need to use HDRComposition to replace the star cores...
many thanks
Phil

Offline georg.viehoever

  • PTeam Member
  • PixInsight Jedi Master
  • ******
  • Posts: 2132
Re: MaskedStretch artifact with larger stars
« Reply #10 on: 2014 January 24 05:16:25 »
I would think that probably not all of the color channels are saturated in the core that gets pink. So masked stretch probably stretches the other channels, but not the saturated ones.
A possible way to avoid this:
- either change MaskedStretch is changed to avoid regions that have at least one saturated channel
- or you do a MaskedStretch using an additional mask that protects the (partially) saturated region.

Georg
Georg (6 inch Newton, unmodified Canon EOS40D+80D, unguided EQ5 mount)

Offline Phil Leigh

  • PixInsight Addict
  • ***
  • Posts: 220
Re: MaskedStretch artifact with larger stars
« Reply #11 on: 2014 January 24 06:12:53 »
Thank you Georg - that sparked an idea... I created a range mask that picked out only the (pink) cores - then I did a Histogram Stretch on the linear image so the cores become "white" - then invert the range mask so the cores are protected and apply Masked Stretch.

That worked perfectly :-)

Thank You.

The problem on this image was the red channel which was twice as high as the green and blue on the core of these "bright" stars.

Phil

Offline pfile

  • PTeam Member
  • PixInsight Jedi Grand Master
  • ********
  • Posts: 4729
Re: MaskedStretch artifact with larger stars
« Reply #12 on: 2014 January 24 08:46:54 »
this also happens with saturated and near-saturated data when doing HDRMultiscaleTransform - such as with M42 when you don't have short exposures for the trapezium - and there you can just mask the trap with a range mask to prevent the odd colors from showing up.

rob

Offline Phil Leigh

  • PixInsight Addict
  • ***
  • Posts: 220
Re: MaskedStretch artifact with larger stars
« Reply #13 on: 2014 May 02 07:38:40 »
Reviving this because I've had some success with a new approach...
I've discovered that if you have an RGB linear image with saturated stars, you can split the channels, apply a masked stretch to each channel then recombine. This stops the appearance of pink/purple cores that happens if you just apply masked stretch to the RGB image.

You do have to redo background neutralisation and colour calibration after the recombine.

Offline jkmorse

  • PixInsight Padawan
  • ****
  • Posts: 931
  • Two questions, Mitch . .
    • Jim Morse Astronomy
Re: MaskedStretch artifact with larger stars
« Reply #14 on: 2014 May 02 07:48:22 »
Just a question for the group.  I saw the same artifacts that Phil mentions and so went back to using HistogramTransformation instead of Masked Stretch.  Given the hoops you need to go through because of this issue, what is the advantage of using Masked Stretch that you can't just as easily duplicate by careful use of HT?

Thanks,

Jim
Really, are clear skies, low wind and no moon that much to ask for? 

New Mexico Skies Observatory
Apogee Aspen 16803
Planewave CDK17 - Paramount MEII
Planewave IFR90 - Astrodon LRGB & NB filters
SkyX - MaximDL - ACP

http://www.jimmorse-astronomy.com
http://www.astrobin.com/users/JimMorse