Monday, August 17, 2020

First Light

 Let's start by learning a little about our images. The first thing I'd like to know is -- how dark are the dark areas between the stars?  A gray16 image has 65536 possible gray values in it, and it's quite possible that the areas that look like black background could be hundreds of gray values above zero.  Also, how uniform are the dark areas? That will have a lot to say about our ability to find faint objects later.

So, first thing to do is take a histogram and see what we see.

Using the  Histogram_gray16() function from my v6 library, and a little gnuplot, we see this:


Which is perhaps not very helpful.

It does look as expected: a huge spike of pixel-count far to the left, because a picture of the night sky is always going to be mostly very dark pixels, and a nice even smattering of brighter pixels all across the rest of the range, because the myriad stars come in all brightnesses.

But let's zoom in on the dark pixels -- see what it will take to separate foreground from background reliably. See if we can do that while still finding very faint objects.

Tell gnuplot to only plot ... let's say the bottom 500 gray values, and we get this:


And that is a beautiful normal curve.

It's not all the way down at zero, because the dark sky is never perfectly dark, and this sensor is quite sensitive enough to pick up any kind of skyglow. 

Make a new tool in v6 to just list out the pixel values as ASCII, modify it to only list values at 300 or below, run those numbers through a statistics program, and we see that the mean of that curve is at 182 and its standard deviation is 29.

So I wonder: what if we were to threshold this image only 2 sigma above the mean of that dark-pixel distribution. That should leave only about 1% of the background pixels. Will that be thin enough?

Threshold at 240...

 


That looks really good.

Oh, and thanks for the satellite, Elon. You better bring me some good internet with those things, because they're going to be pretty hard on my astronomy hobby.

 

Let's zoom in on the central star...

 

Yes, that's glorious.

The 1% or so of background pixels that we let through are randomly scattered all over -- so if you see a substantial clump of them -- like we do right near the bottom of this image -- that has real good odds of being an actual object -- just very faint. And one which we would have lost if we had thresholded at 2.5 or 3 sigma.

 

We will never actually binarize the image, oh no, that would throw away practically all the lovely data. But this looks like a good way of deciding which pixels we can safely ignore.

 

 


No comments:

Post a Comment