Author Topic: Eliminate Satellite Streak  (Read 10867 times)

Offline sreilly

  • PixInsight Padawan
  • ****
  • Posts: 791
    • Imaging at Dogwood Ridge Observatory
Eliminate Satellite Streak
« on: 2015 March 17 10:23:32 »
I have a group of images that in that group has one frame that has a very light satellite track going through the galaxy. I can't seem to figure out the right setting in combining the images, 6 of them, to eliminate the streak. Do I raise/lower the high or low amount? I'm using Sigma Combine and average. I used the default setting of 4 for low and 2 for high. Played with each and didn't see a difference. I thought trying to combine using Median would eliminate it but not to be. Suggestions welcomed. Clone stamp is not an option.

Steve
www.astral-imaging.com
AP1200
OGS 12.5" RC
Tak FSQ-106ED
ST10XME/CFW8/AO8
STL-11000M/FW8/AO-L
Pyxis 3" Rotator
Baader LRGBHa Filters
PixInsight/MaxIm/ACP/Registar/Mira AP/PS CS5

Offline pfile

  • PTeam Member
  • PixInsight Jedi Grand Master
  • ********
  • Posts: 4729
Re: Eliminate Satellite Streak
« Reply #1 on: 2015 March 17 10:58:50 »
you lower the high amount... however with only 6 images you may find that in order to reject the sat trail, the high sigma has to be so narrow (small) that you end up rejecting real data as well.

rob

Offline oldwexi

  • PixInsight Guru
  • ****
  • Posts: 627
    • Astronomy Pages G.W.
Re: Eliminate Satellite Streak
« Reply #2 on: 2015 March 17 11:32:57 »
Hi Steve!
PixelMath has some new functions.
One of them is the "d2seg" function.
This can create a line from x1,y1 to x2,y2.

With the Readout Cursor you find the start of the satellite trail, note the x,y for example 427,350
than find the end of the trail and note the x,y,  for example 154,297

With the PixelMath expression ~d2seg(427,350,154,297)
you get a black image with a white line in it exactly where the satellite trail sits in the original image.
(you have to tag "Create new Image!)
Use this black image with the line as a mask over the "trailed" image.
Now you simply create another PixelMath with only the name of one of the 6 images without trail in it.
(Everything only with registered images)

Drag and drop this PixelMath triangle over the image with the trail gets you correct data
where the satellite trail was. Everything else stays unchanged.

Could be that you have to adapt the giving image temporary with LinearFit to the receiving image before you
Exchange the trail with real data.



Gerald


Offline sreilly

  • PixInsight Padawan
  • ****
  • Posts: 791
    • Imaging at Dogwood Ridge Observatory
Re: Eliminate Satellite Streak
« Reply #3 on: 2015 March 17 11:51:17 »
Gerald,

I see the power of Pixel Math but I'm a complete dummy when it comes to using it. I need to see if there is a crash course on its usage lurking out there on the web. I have followed along in some examples but never really understood fully the operation. Some things are simple, more very complex.

Thanks for the advice and I'll certainly look at it.

Steve
Steve
www.astral-imaging.com
AP1200
OGS 12.5" RC
Tak FSQ-106ED
ST10XME/CFW8/AO8
STL-11000M/FW8/AO-L
Pyxis 3" Rotator
Baader LRGBHa Filters
PixInsight/MaxIm/ACP/Registar/Mira AP/PS CS5

Offline sreilly

  • PixInsight Padawan
  • ****
  • Posts: 791
    • Imaging at Dogwood Ridge Observatory
Re: Eliminate Satellite Streak
« Reply #4 on: 2015 March 17 11:53:43 »
Rob,

I agree. Usually I have a larger number of usable images but mostly in the luminance. I try for 4-6 hours minimum of rgb but wanted to work with what I have so far. I think in the end the streak will be so far back in the background that it won't be noticed. Some frames I had to eliminate altogether because of plane trails and the extremely bright lights.

Thanks,
Steve
www.astral-imaging.com
AP1200
OGS 12.5" RC
Tak FSQ-106ED
ST10XME/CFW8/AO8
STL-11000M/FW8/AO-L
Pyxis 3" Rotator
Baader LRGBHa Filters
PixInsight/MaxIm/ACP/Registar/Mira AP/PS CS5

Offline pfile

  • PTeam Member
  • PixInsight Jedi Grand Master
  • ********
  • Posts: 4729
Re: Eliminate Satellite Streak
« Reply #5 on: 2015 March 17 14:10:41 »
i think Gerald's solution is pretty good. pixelmath requires a little bit of "parallel" thinking - its sort of like writing code for a vector machine like a cray. you have some operations which take their operands from every x,y position in the input images and put the result in the same x,y position in the output image, all simultaneously in parallel. but then there are operations that seemingly break that paradigm, as the output pixel values can sometimes depend on the input pixel *location*. for instance you can think of d2seg as a function that returns 0 everywhere the current x,y position of the output is not on the line and returns 1 whenever it is on the line.

rob

Offline RickS

  • PTeam Member
  • PixInsight Jedi
  • *****
  • Posts: 1298
Re: Eliminate Satellite Streak
« Reply #6 on: 2015 March 17 20:12:53 »
I've used a variant of Gerald's technique that's possibly a little simpler.  I use d2seg() to set the pixels in the satellite trail to 1 and then they reject out with ease.  For example, with a trail between coordinates 367,259 and 978,721 that's 5 pixels wide at most:

iif(d2seg(367,259,978,721)<=2,1,$T)

Cheers,
Rick.

Offline Herbert_W

  • PixInsight Addict
  • ***
  • Posts: 204
    • Skypixels - Astrophotography by Herbert Walter
Re: Eliminate Satellite Streak
« Reply #7 on: 2015 March 18 03:44:21 »
Hi Gerald and Rick!

These are tricky solutions - its astonishing, what you can do if you understand PI ;-)

This formula creates a line with a width of 1px.

I would need a line with (for example) 50px - how can I do that?



Here you can download my 'problem' - is it possible to create a mask with PixelMath for the reflection beam in the image.

http://endor.uv.es/files/data/public/f77fa6.php?lang=de

Thank you and best regards.
Herbert, Austria

Offline Geoff

  • PixInsight Padawan
  • ****
  • Posts: 908
Re: Eliminate Satellite Streak
« Reply #8 on: 2015 March 18 03:57:18 »
Hi Gerald and Rick!

This formula creates a line with a width of 1px.

I would need a line with (for example) 50px - how can I do that
No, Rick's formula (which I also use and find very effective) creates a line of width 4 pixels. The 2 denotes the maximum distance from the line and it can be above or below, so its width is 4=2 + 2. You would never need a line of 50pixels width. Are you confusing width with length? Anyway, change the 2 to any other number and the width of the line will be twice that number.
More clarification: the 1 denotes the brightness of the line on a scale of 0 to 1, ie it is saturated so any rejection method will get rid of it.
What the formula is doing is setting the pixel values to 1 if they are no more than 2 pixels from the line and leaving them as in the target image ($T) if they are more than 2 pixels from the line.
« Last Edit: 2015 March 18 04:03:21 by Geoff »
Don't panic! (Douglas Adams)
Astrobin page at http://www.astrobin.com/users/Geoff/
Webpage (under construction) http://geoffsastro.smugmug.com/

Offline Herbert_W

  • PixInsight Addict
  • ***
  • Posts: 204
    • Skypixels - Astrophotography by Herbert Walter
Re: Eliminate Satellite Streak
« Reply #9 on: 2015 March 18 04:17:28 »
Hi Geoff!

Thank you for the quick response and the explanation of the formula.

Quote
You would never need a line of 50pixels width. Are you confusing width with length?
No - not 50px but some times a little bit more then a 1px line - but now I understand it.

Thank you for your help and best regrads.
Herbert, Austria

Offline Juan Conejero

  • PTeam Member
  • PixInsight Jedi Grand Master
  • ********
  • Posts: 7111
    • http://pixinsight.com/
Re: Eliminate Satellite Streak
« Reply #10 on: 2015 March 18 06:15:07 »
Very nice application of PixelMath. Just in case it can be useful, here is a small variation of Rick's expression to draw an antialiased segment:

d = d2seg( 367, 259, 978, 721 );
iif( d <= r, $T*d/r + ~(d/r), $T )


with declared symbols:

d, r = 2

Antialiasing can be useful to generate masks with soft borders, which often are more efficient. If necessary, the same PixelMath instance can be applied twice to generate a stronger mask.
Juan Conejero
PixInsight Development Team
http://pixinsight.com/

Offline vicent_peris

  • PTeam Member
  • PixInsight Padawan
  • ****
  • Posts: 988
    • http://www.astrofoto.es/
Re: Eliminate Satellite Streak
« Reply #11 on: 2015 March 18 06:31:48 »
Hi,

It would be nice to have a blink version that lets you select for each image some streaks and it fills them with zero values. Of course, this is not an elegant solution, but while we look for a good solution, this can be a workaround. The optimal solution would be to automatically detect lines and completely reject them, including a feather area. The problem we have now is that the rejection algorithms cannot reject completely the outer areas of the streaks, unless you reject too much data in the rest of the image.


Best regards,
Vicent.

Offline oldwexi

  • PixInsight Guru
  • ****
  • Posts: 627
    • Astronomy Pages G.W.
Re: Eliminate Satellite Streak
« Reply #12 on: 2015 March 18 12:03:26 »
Hallo Herbert!
If you want a wider line the PixelMath expression is very simple:
8 Lines wide:
8-d2seg(40,600,800,670)

50 lines wide:
50-d2seg(40,600,800,670)

etc...
You can solve your issue with 2 lines as the light beam is conic. Coordinates for your Image:
max(8-d2seg(429,0,455,1656),8-d2seg(429,0,464,1656))
to remove the beam correctly i need a second image without beam or the beam at another Location.
Yes, the beam can be removed also with Curves - just tried it -  but thats already somehow painting....
so...

Have planned to show the new PixelMath functions at our PI Austria Meeting in May 2015 in Schlierbach .
if you want?

Gerald
« Last Edit: 2015 March 18 12:20:34 by oldwexi »

Offline Herbert_W

  • PixInsight Addict
  • ***
  • Posts: 204
    • Skypixels - Astrophotography by Herbert Walter
Re: Eliminate Satellite Streak
« Reply #13 on: 2015 March 19 06:32:27 »
Hello Gerald!

Thank you for the explanation to get a wider line.
Why do you know that? That is not declared in PixelMath Expression Editor  :-[

Quote
Have planned to show the new PixelMath functions at our PI Austria Meeting in May 2015 in Schlierbach .
if you want?
That would be perfect!!!!  If it is possible, each formula should be associated with a practical example - like our example in this topic.
You are our PixInsight guru in Austria  :smiley:

Best regards.
Herbert, Austria

Offline oldwexi

  • PixInsight Guru
  • ****
  • Posts: 627
    • Astronomy Pages G.W.
Re: Eliminate Satellite Streak
« Reply #14 on: 2015 March 19 12:53:34 »
Hi Herbert!
The official PixelMath Editor description says:
d2seg(x1,x2,y1,y2)
Returns the distance of the current position to the defined line segment.

Therefore:
If the current position is on the defined line segment the distance is Zero !
So it will deliver on the defined but still not existing line a black point.
Outside the defined line segment the distance is in minimum 1, so a white point is delivered.

d2seg(427,250,154,250)-10
means up to 10 pixel distance the expression is true and the distance is within 10 Pixel.
It will deliver a white picture with black line segment

Please note that for example a 50 pixel thick line the expression needs to use 1/2 distance
which equals 25   so -
d2seg(427,250,154,250)-25   returns a nearly 50 pixel thick line.

To create the inverse version:
10-d2seg(427,250,154,250) is correct to create a black picture with a 20 Pixel wide white line.
Because if the actual position is 8 points from the defined line the d2seg will
return 8.
So,  10 - 8 = 2
2 is brighter as 1 therefore white will be returned.

This is my logical explanation after i got the result by an accidental typo...

Gerald