Author Topic: Using Starnet++ at linear stage.  (Read 7067 times)

Offline astroedo

  • PixInsight Addict
  • ***
  • Posts: 171
  • Io ne ho viste... cose che voi umani...
    • L'arciere celeste
Using Starnet++ at linear stage.
« on: 2019 December 29 08:29:24 »
Dear all, I've published a microtutorial on YouTube on using Starnet++ at linear stage.

The tutorial, unfortunately, is only in italian, but i suppose you can easily follow it with the automatic subtitle translation.

here the link
https://www.youtube.com/watch?v=GboQWoRovJs&t

Clear skies

Offline dld

  • PixInsight Addict
  • ***
  • Posts: 132
Re: Using Starnet++ at linear stage.
« Reply #1 on: 2019 December 29 09:48:41 »
Thank you Edoardo, a long time ago, I had the same idea, but you have implemented it and created a tutorial about it! Kudos!

Offline astroedo

  • PixInsight Addict
  • ***
  • Posts: 171
  • Io ne ho viste... cose che voi umani...
    • L'arciere celeste
Re: Using Starnet++ at linear stage.
« Reply #2 on: 2019 December 29 10:04:52 »
 :D :D
Yes we had the same (really simple) idea.
« Last Edit: 2019 December 30 06:08:58 by astroedo »

Offline Sterntaucher

  • Newcomer
  • Posts: 3
Re: Using Starnet++ at linear stage.
« Reply #3 on: 2020 January 12 23:12:35 »
Hi Edoardo,

a very helpful description.

Thank you
Stephan

Offline jtaylor9

  • Newcomer
  • Posts: 4
Re: Using Starnet++ at linear stage.
« Reply #4 on: 2020 January 16 16:31:49 »
Fantastic, and thanks!  I just created a set of icons to run the process and it works like a charm.  Translation on the video was a bit rough to deal with but the pictures are all you really need to follow along.

JT

Offline aworonow

  • PixInsight Addict
  • ***
  • Posts: 258
    • Faint Light Photography
Re: Using Starnet++ at linear stage.
« Reply #5 on: 2020 January 18 14:14:26 »
Removing Stars from Linear, Unstretched Images
v 1.0                                                                                                                     Alex Woronow, Jan. 18, ’20

Here is my version of the work-around for removing stars from linear (unstretched) images. It is based on a video to do the same thing by Edoardo Luca Radice: https://www.youtube.com/watch?v=GboQWoRovJs&t . Unfortunately, the video is in Italian, but you can play it with “translated” subtitles. Basically, the steps are
Stretch the image using either the HistogramTransform (HT) (perhaps with parameters determined through the ScreenTransferFunction( STF))
Remove the stars from the stretched image
Transform the starless image back to its original linear form
Subtract that reversed-transform from the original image to obtain the unstretched stars
Celebrate, or whatever

Now, the video does not include the fact that the black-point is adjusted by STF, or can be adjusted manually in the HT. So I went back to the HT documentation, https://pixinsight.com/doc/tools/HistogramTransformation/HistogramTransformation.html and started from the transfer equation given there. It also does not reveal the way to handle the black point, but otherwise is what I needed.

Now HT has three parameters: Shadows (s), Hightlights (h) , and Midtones (m). We need not adjust h, so there is no additional use for it. The value of s is the black-point. Values < s become zero and CANNOT BE RECOVERED from the stretched image. Tread lightly and keep this value fairly low. (Often it is <.005 or so, unless your images have a pedestal.) Usually, for our faint astro-imges, the midtones have a value of around m= .001. (It is actually an rightward offset from s.) Don’t worry about setting these values too well, whatever values we use we will undo them later anyway.

We can manipulate our linear image directly in HT using the preview function and moving the 2 left-most sliders, or by entering values for s and m. Alternatively, we can start with STF. Let’s do that.
Open your linear image in the workspace
If you have already applied a screen stretch to your linear image, REMOVE IT
Open STF and click the yellow & black circle on the left column of tools...this does a temporary screen stretch
Open HT
Back in the STF, at the left bottom is a blue triangle. Grab it and drop it on the bottom icon bar of the HT instance
Remove the STF from the image
Adjust the shadows and midtones values if you like, it should not matter in the end.
Again, remove the STF from the image and apply the HT...Your Image Is now stretched.
Remove the stars using StarTools (inside PI, if you installed it) or use StarTools++ from a command line, in which case you will have to export the stretched image, operate on that exported version, then bringing the starless version back into PI.)

We pause for a moment and look at my PixelMath (PM) icon for removing the stretch on the starless image. (The icon is attached to this article.)

We need two values from HT to enter into the PM icon: s and m, or the value from the Shadows and Midtones boxes in the lower left of the HT window. So, copy and paste over the text now in the icon. You can also change the destination, but DO NOT CHECK THE RESCALE RESULTS BOX!

image attached


We are back with a starless linear image exactly comparable to our star-filled linear image. Therefore we can subtract the former from the latter (PixelMath again) and obtain a linear image containing only the stars. If this image of the stars also contains significant other stuff, something is not right. Try again or contact me through this site. However, remember the value of s could cause some fraction of the darker pixels to be set to zero and become unrecoverable--that’s usually somewhere near the round-off error anyway and not really visible. But if you set s too high, artifacts could become visible.

Hope this works for you!