Author Topic: Noise vs. subs question  (Read 2328 times)

Offline MineralMike

  • Member
  • *
  • Posts: 60
Noise vs. subs question
« on: 2018 October 09 19:49:54 »
I'm having a discussion with a friend about now many subs to shoot. He says I should get dozens, if not hundreds, to minimize noise, because PI's algorithms are so much better than traditional processing software. He doesn't understand the math, so suggested I ask here.

I'm trying to wrap my mind around this. I'm using a ZWO ASI1600MC Pro one-shot color camera. The sensor's read noise is specified as 1.2e @ 30 dB gain. I operate at the lowest gain setting for maximum well capacity. I subtract a master dark from all light frames

QUESTION: Is there any other kind of noise besides read noise that more subs will reduce?

Now for the biggie: How does the number of light subs correlate to noise reduction in the final integrated image? I know this is hard to answer in general, but are there any rules of thumb that indicate that, for example, 50 light subs will reduce noise XX% more than 15 light subs?

I don't mind spending the time to collect many subs if they will yield a significant benefit.

Also, should iI be thinking in terms of many DARK subs to make the master dark?

How do I decide how many light/dark subs are enough?

Thanks for any advice.

--- Mike

Offline ngc1535

  • PixInsight Old Hand
  • ****
  • Posts: 326
Re: Noise vs. subs question
« Reply #1 on: 2018 October 09 20:24:37 »
Hi MM,

I look forward to an in depth real answer. This isn't an entirely easy set of questions.
For a given exposure time you do get an SNR improvement with more measurements. See Figure 3 in the Image Integration documentation which answers some of your questions:

https://pixinsight.com/doc/tools/ImageIntegration/ImageIntegration.html

There are quite a few sources of noise - some instrumental such as readnoise, noise added by calibrating data, and even natural sources such as the photon noise from your source and from the sky. For a given signal from an object (say your star is 1,000 counts) the photon noise is the square root of this number (+/- 31 counts). So the actual number you measure in multiple exposures is going to fluctuate around 1,000 plus or minus 30. This isn't a readnoise issue. Taking more exposures will improve the S/N here as well. For bright sources... maybe not critical... but for faint ones- very important. Even the sky has a signal (airglow) which has its own noise term.

Anyway, just little bits to consider while waiting on a good answer!
-adam


Offline Niall Saunders

  • PTeam Member
  • PixInsight Jedi Knight
  • *****
  • Posts: 1456
  • We have cookies? Where ?
Re: Noise vs. subs question
« Reply #2 on: 2018 October 10 03:26:25 »
Hi Mike,

Whilst I don't have time to dig up the background on the statistical calculations, the one 'rule of thumb' that I have always gone by is that ten subs are better than one - so take ten. The next 'step' to aim for is around the thirty-sub mark - much less than that, and you might as well only have teken ten. After thirty subs, you are probably looking to jump to one hundred subs in order to see any significant improvement.

And, it might be worth noting that these are the number of subs that you would actually be integrating - you may then want to take a few extra to allow for any 'masties' to be picked out of the mix before starting.

However, perhaps unlike many other programs, PixInsight was conceived out of the statistical approach to noise reduction. There is nothing 'simplistic' in the number-crunching power that PI can bring to bear - consequently therefore, apart from some of the 'trivial' math routines, many of the others do actually require some pretty decent knowledge about statistics and how they can improve noise reduction.

I know that this may only partly answer your question - but I would certainly not bother with taking 'hundreds' of subs (the next stage after '100' is big enough that I can't even be bothered to remember it  ;) ). And, you can also apply the same thought to the acquisition of all of your subs (including calibration subs as well). I do tend to shoor 100 darks - but that is only because I can, after closing up the observatory for the night). Even then, my darks are so consistent, and have so little signal in them any way, I'm probably just wasting energy and contributing to global warming by acquiring them - even though I only tend to bother once a season. In fact, I have tried using a 'synthetic' Master Dark (created by PI, with the whole image only having a fixed 'Pedestal' ADU) and it more or less gives me the same image quality as a processed collection of 30 'real' Darks.

I haven't ever looked up the technical specs of my camera - after all, now that it has been purchased, there is very little that can be done to change things. I followed a Stark Labs procedure (once, a long time ago) to supposedly optimise the Gain and Offset figures - I got an answer (sort of), tried it and it seemed to work, wrote it down, and have never changed it since.

However, with all this said and done, you won't find many (if any) published/posted astro images from me anywhere. I really just take them for my own satisfaction - not for others to critique.

But, hopefully some of what I way will help either you, or someone else reading this.
Cheers,
Niall Saunders
Clinterty Observatories
Aberdeen, UK

Altair Astro GSO 10" f/8 Ritchey Chrétien CF OTA on EQ8 mount with homebrew 3D Balance and Pier
Moonfish ED80 APO & Celestron Omni XLT 120
QHY10 CCD & QHY5L-II Colour
9mm TS-OAG and Meade DSI-IIC

Offline Rich Bamford

  • Newcomer
  • Posts: 5
Re: Noise vs. subs question
« Reply #3 on: 2018 October 10 05:48:56 »
Hi Mike,

The very simplistic answer is that it's an exponential scale.
Each doubling of the sub count may, for example, half the noise but you rapidly run into the law of diminishing returns.
You start off having a significant impact for each sub added but the gains soon drop off to near zero.

The other factor is how much noise is in the subs in the first place of course.
If like me :( your subs are mostly noise then you're going to need a phenomenal amount to reduce it to zero.

I'd agree with Niall in that I've found that 30 subs tends to be worth while but beyond that the effort rapidly starts of outweigh the gains.
A test would be to take say 60 subs, make quick stacks out of say 15, 30, 45, 60 and see how much SNR improvement there is each time.
Obviously if 60 turns out in your case to be significantly better then 45 then perhaps see what 120 looks like but if it isn't then you'll have an idea where the cutoff point is.

Rich.


Offline MineralMike

  • Member
  • *
  • Posts: 60
Re: Noise vs. subs question
« Reply #4 on: 2018 October 10 06:16:48 »
...I have always gone by is that ten subs are better than one - so take ten. The next 'step' to aim for is around the thirty-sub mark - much less than that, and you might as well only have taken ten.

Thanks, Niall. This raises another question: Is there a process or script in PI that can read the value of every pixel in a dark frame, then present a statistical report showing the average value and the deviation?

It seems to me that would be a way to quantify now the number of subs affects noise for a particular camera. Suppose I make a master dark from 10 5-minute subs exposed at 0C, and the average pixel value is 35. Then I make another dark from 30 5-minute subs again exposed at 0C, and find the average pixel value is 22.

Wouldn't that be valuable information on a specific camera's noise? I'd be eager to have such definitive information, and would be willing to put in the time to characterize my camera at several sensor temperatures and number of subs.

So: Does PI have a way to report statistics of a master dark frame?

--- Mike

Offline MineralMike

  • Member
  • *
  • Posts: 60
Re: Noise vs. subs question
« Reply #5 on: 2018 October 10 08:31:25 »
Does PI have a way to report statistics of a master dark frame?

Ah-ha! I found Scripts -> Image Analysis -> NoiseEvaluation.

I ran this on several master darks and several dark subs that contributed to those master darks. The script displays "calculating standard deviation" while processing the open image. It then displays the standard deviation of the pixel values, the number of pixels sampled (and the percent of the total pixels in the image), and a value for J, whatever that is.

The average of pixel values is not displayed.

The standard deviation for a single 10-minute dark sub is 8.421 x 10e-4, an for an 8-sub master dark is 7.796 x 10e-4. I don't know what a "good standard deviation might be, but I will test to see how low i can make it with my camera.

I already have eight 10-minute darks. Tonight I will make 42 more. Then I will make dark masters from 10, 20, 30, 40, and 50 of these subs, and plot the results in a spreadsheet. As I understand it, I'm looking for where the curve levels-off. Tha number of subs is the point of diminishing returns. I think.  :smiley:

--- Mike

Offline MineralMike

  • Member
  • *
  • Posts: 60
Re: Noise vs. subs question
« Reply #6 on: 2018 October 11 16:51:19 »
Scripts -> Image Analysis -> NoiseEvaluation.

The script calculates standard deviation while processing the open image

I think I've collected some valuable data on the number of subs my ASI1600MC Pro OSC camera needs to bring noise down to a "reasonable" level. Last night I made 42 10-minute dark frames @ 0C, and today integrated various selections of these into master darks, then ran the NoiseEvaluation script on each master.

I entered the standard deviation result for each master from this script into a spreadsheet, then graphed the results. I have attached a PDF copy of the spreadsheet with the graph.

The first plot of 1 sub up to 42 subs showed large deviation with few subs. But using the evening's later subs for the "few" end resulted in much smaller deviation. I also made a couple of masters from subs in the center of the batch, omitting those from the beginning and end.

I conclude that my camera's sensor was not thoroughly cooled when I started the run last night. Even though it reported 0C, it probably was warmer than that, and required another 45 minutes to cool thoroughly. This appears evident in the close deviations in masters made with 10 and more subs.

I also conclude that for my camera, taking more than 10 or 15 subs doesn't give me much additional noise reduction.

I am not a statistician, and will appreciate any comments on my analysis. If I've gone astray, please tell me.

--- Mike
http://astronomy.mdodd.com
 

Offline RickS

  • PTeam Member
  • PixInsight Jedi
  • *****
  • Posts: 1298
Re: Noise vs. subs question
« Reply #7 on: 2018 October 11 18:02:03 »
NoiseEvaluation can be a bit tricky to use.  I'd suggest you start with the BasicCCDParameters script or DarkBiasNoiseEstimator to characterise your camera. If you want to compare estimated noise in light frames and integrations then Subframeselector will calculate a SNRWeight factor that you can use for comparison.

I have a problem with comments like "any more than 30 subs results in diminishing returns."  This made some sense back when cameras all had high read noise and subs generally needed to be quite long to get shot noise from the signal to swamp the read noise.  Now that we have low read noise cameras, like the ZWO CMOS cameras, it makes a lot more sense to think about total integration time instead of number of subs.  Taking a few hundred very short subs can actually produce a great result with the right camera and settings.

The "how many subs" question has been asked too many times to count and I don't know that it is helpful to write another detailed exposition.  If you really want to know the answer, do some reading.  The Signal to Noise articles by Craig Stark would be a good place to start:

http://www.stark-labs.com/craig/articles/articles.html

If you have a bit more time, here's a good book:

http://www.willbell.com/aip/Index.htm

Cheers,
Rick.

Offline MineralMike

  • Member
  • *
  • Posts: 60
Re: Noise vs. subs question
« Reply #8 on: 2018 October 12 06:55:08 »
... Now that we have low read noise cameras, like the ZWO CMOS cameras, it makes a lot more sense to think about total integration time instead of number of subs.

I agree, Rick, and that is precisely the reason I wanted to characterize my camera. The specs and the few images I've taken indicate noise shouldn't be an issue. My standard deviation plots indicate that five or more subs ought to give me reasonably low noise.

Thank you for suggesting the PI scripts. I will run them on individual dark frames and also on master darks.

--- Mike

Offline MineralMike

  • Member
  • *
  • Posts: 60
Re: Noise vs. subs question
« Reply #9 on: 2018 October 12 11:37:01 »
I'd suggest you start with the BasicCCDParameters script or DarkBiasNoiseEstimator to characterise your camera. If you want to compare estimated noise in light frames and integrations then Subframeselector will calculate a SNRWeight factor that you can use for comparison.

I ran DarkBiasNoiseEstimator and Subframeselector, and have some questions.

1. DarkBiasNoiseEstimator reports:
* Dark #1 (worst) & Dark #42 (best): Offset=840 DN, Noise=26 DN
* Dark #1 & 42-sub master dark: Offset=845 DN, Noise=14 DN

QUESTION: What is the Offset? Is this like a pedestal? Is it also present in light frames, and thus will be removed from a light frame when a dark is subtracted from it?

QUESTION: What does Noise apply to? The script needs two darks. Noise is much smaller with the #1 dark & master dark than with the #1 dark & #42 dark. This sounds good because the master is integrated from 42 subs. But what does it mean?

The Subframeselector script reports:
* Dark #1: Noise=60 DN, Std. Dev.=50
* Dark #42: Noise=54 DN, Std. Dev.=55
* 42-sub master dark (subs 1-42): Noise=56 DN, Std. Dev.=52
* 24-sub master dark (subs 19-42): Noise=51 DN, Std. Dev.=48

QUESTION: How do I quantify how much "better" the 24-sub master dark is than the 42-sub master, which includes the first 10-15 subs taken when the camera hadn't cooled completely?

I assume that 51 DN is better than 56, and a standard deviation of 48 means fewer random pixels than a deviation of 52.

Can I think, "of courseI should use the 24-sub master," or are these numbers so close that I could use the #1 dark frame by itself, and not notice much difference?

Thanks for any further information. I'm trying to get a handle on my low-noise camera's characteristics.

--- Mike

Offline RickS

  • PTeam Member
  • PixInsight Jedi
  • *****
  • Posts: 1298
Re: Noise vs. subs question
« Reply #10 on: 2018 October 13 16:23:53 »
Hi Mike,

The documentation for DarkBiasNoiseEstimator gives some examples of how to use it.  If you give it two bias frames then it will calculate the bias offset (and, yes it is a pedestal that is present in all frames) and the read noise in DN.  If you know the gain of the camera then you can convert the read noise from DN to electrons by multiplying the two numbers.  Note that "camera gain" is not the same as the gain you set in the ZWO driver which is a setting for an internal amplifier.  You can get an estimate of the camera gain from the graphs that ZWO provide, but it would be better to calculate the actual gain for your camera with the BasicCCDParameters script.  Note that camera gain will vary depending on the driver gain so you'll need to do separate test subs and calculations for each driver gain that you want to use.

You can also use DarkBiasNoiseEstimator with a pair of darks of different length to estimate dark current and compare noise in pairs of master bias and master dark frames.  See the examples in the documentation for details.

I think that you need to develop a basic understanding of the concepts before you'll be able to make sense of this stuff.  In particular, it would be helpful to understand read noise, dark current/dark noise, shot noise, signal to noise ratio and how noise adds in quadrature.  The Stark Labs link I provided earlier has a series of articles about signal to noise which are an easy to understand introduction.

Cheers,
Rick.