Author Topic: SubframeSelector  (Read 4328 times)

Offline bulrichl

  • PixInsight Guru
  • ****
  • Posts: 524
Re: SubframeSelector
« Reply #15 on: 2018 February 08 01:30:25 »
Hi Rick,

yes, you are repeating your preconception but don't give reasons. You are not responsive to the cited explanation of the author of Subframe Selector about how SNR is evaluated by PI. Where are your arguments for your point of view?

SNR is the quotient of signal and noise:

SNR = Signal / Noise

So a higher background level (= higher noise) will result in lower SNR. Simple arithmetic.

Up to now I haven't got the hang of why a higher background level (e.g. increased light pollution or sky glow) would make for a higher SNR. Please, explain to me how this could happen.

Bernd

Offline RickS

  • PTeam Member
  • PixInsight Jedi
  • *****
  • Posts: 1298
Re: SubframeSelector
« Reply #16 on: 2018 February 08 02:10:12 »
Hi Bernd,

Let's ignore all the sources of noise apart from shot noise.  It's the one form of noise that we can't escape.  The shot noise for a pixel is sqrt(n) if we capture n photons.  SNR is n/sqrt(n).  It doesn't matter whether the photon you captured is the signal from an astronomical object or from light pollution.  The more photons you capture, the higher the SNR.  Unwanted signal is still signal.  Attached is a graph that shows how SNR increases with the number of pixels captured.

There are plenty of places you can read about this if you don't believe me.  Try Craig Stark's articles on Signal to Noise: http://www.stark-labs.com/craig/articles/articles.html

Cheers,
Rick.

Offline bulrichl

  • PixInsight Guru
  • ****
  • Posts: 524
Re: SubframeSelector
« Reply #17 on: 2018 February 08 07:47:26 »
Hi Rick,

> It doesn't matter whether the photon you captured is the signal from an astronomical object or from light pollution.  The more photons you capture, the higher the SNR.  Unwanted signal is still signal.  Attached is a graph that shows how SNR increases with the number of pixels captured.

I premised that you inspect subframes that show the astronomical target (and not only a cloud). One has to sort out previously those subframes that went completely wrong - but doing this preselection before beginning a calibration and deeper inspection with Subframe Selector is a matter of course for me. And naturally it is a requirement in order to get meaningful SNR values.

When this coarse preselection has been done previously, Subframe Selector will evaluate SNR reliably. It seems to me that you didn't read carefully what I cited. Please read what Mike Schuster, the author of Subframe Selector, explained (see citation in my post above). PI is very well able to differentiate between noise and signal: for each frame, noise and signal are estimated separately:

1) noise is estimated from the frame's background,
2) signal is estimated from the frame's contrast,
3) then the quotient of estimated signal and estimated noise is calculated - this is the SNR.

I provide here two examples of my data (the Median is given in electrons):

Example 1
149 light frames of 3 nights (14., 18. and 21. December 2017), exposure time of 5 min each, were taken with a Canon EOS 600D (Baader Corrector Filter BCF-1) at ISO 800 and a Takahashi FSQ 106N from my terrace in Tijarafe, La Palma, Canary Islands. The inspected images were calibrated, CosmeticCorrected and debayered.
The resulting image is shown here: https://pixinsight.com/forum/index.php?topic=12140.0

Example 2
43 light frames (22. January 2018), exposure time 5 min each as well, were taken with a ZWO ASI294MC Pro (Astronomik L Filter Typ 2c) at unity gain, same refractor, same site. These inspected images were calibrated and debayered.

With both cameras Subframe Selector's result is: declining Median parallels rising SNR and vice versa.

Bernd

Offline mschuster

  • PTeam Member
  • PixInsight Jedi
  • *****
  • Posts: 1087
Re: SubframeSelector
« Reply #18 on: 2018 February 09 21:41:14 »
A higher median (background) often implies lower SNR but not always.

Consider a more transparent sky. More photos in both target and background. Higher median. Higher SNR.

Also consider a longer exposure. Higher median. Higher SNR.

More typically though, yes, higher median is due to additive background (more sky glow). Lower SNR.

Offline bulrichl

  • PixInsight Guru
  • ****
  • Posts: 524
Re: SubframeSelector
« Reply #19 on: 2018 February 10 03:25:14 »
Hi Mike,

I insisted because the reason that Rick gave seemed wrong to me.

At my site there is a weak light pollution at low elevation in the southeast. Typically the strongly changing observation condition (epecially at the beginning of the imaging) is not transparency but LP as the target moves away from this affected area of sky.

I admit that when changing transparency due to thin clouds is the main factor, things might come out differently - I don't know, I have not yet observed that.

As well I took it for granted that we don't compare apples and oranges: i.e. that we only compare frames with identical exposure time.

Bernd

Offline RickS

  • PTeam Member
  • PixInsight Jedi
  • *****
  • Posts: 1298
Re: SubframeSelector
« Reply #20 on: 2018 February 11 19:14:14 »
Hi Bernd,

The SNRWeight calculation is more sophisticated than just measuring SNR but as I said, in my experience it doesn't always work reliably to filter out poor quality subs.  Hence my recommendation to vet subs visually as well.  Maybe we even agree on that!

Note that SNRWeight is not exactly the same as SNR.  Also, light pollution is not noise in the mathematical sense (though it does have shot noise associated with it.)  I think that loose terminology might be the reason we are talking at cross purposes.

Cheers,
Rick.

Offline bulrichl

  • PixInsight Guru
  • ****
  • Posts: 524
Re: SubframeSelector
« Reply #21 on: 2018 February 13 03:01:29 »
Hi Rick,

The SNRWeight calculation is more sophisticated than just measuring SNR but as I said, in my experience it doesn't always work reliably to filter out poor quality subs.  Hence my recommendation to vet subs visually as well.  Maybe we even agree on that!

Of course we are agreed that it is advisable to inspect the subs visually (and reject the obviously bad ones) before applying Subframe Selector, and I confirmed that in post #17.

Quote
Note that SNRWeight is not exactly the same as SNR.

Yes, my guess is that Subframe Selector calculates SNRWeight similar to CBNR in the script ContrastBackgroundNoiseRatio of the same author. Perhaps Mike Schuster can comment on it.

Quote
Also, light pollution is not noise in the mathematical sense (though it does have shot noise associated with it.)

No, I don't take light pollution for noise. But LP is not desired signal as well. If LP was uniform all across the field of view, it would be irrelevant with regard to signal as long as it does not limit dynamic range. If LP was not uniform, it would be undesired signal making things even worse. Somehow or other: the shot noise of the LP is contributing to the overall noise - thus lowering SNR.

Quote
I think that loose terminology might be the reason we are talking at cross purposes.

Yes, I think this is the case. For me SNR is (Signal generated by target / Overall noise) - this is the value that we really are interested in. Let's take a qualitative look at a (hypothetical) example where light pollution is uniform all across the field of view:
Let frame 1 be affected by this uniform light pollution. This adds a uniform LP level + the corresponding shot noise to all pixels. However, the LP level is NOT a signal. Assume we knew its amount and subtracted it. By this operation we are not loosing any information.
Let frame 2 NOT be affected by this light pollution.
When we compare the LP-level subtracted frame 1 with frame 2, the difference is the shot noise emerging from the LP level in frame 1. Obviously the overall noise of frame 1 is higher by this value, thus the SNR of frame 1 will be lower than that of frame 2.
---

As a matter of fact I see that pattern (SNRWeight and Median of the frames changing in opposite direction) consistently in every night. Comparing the calibrated, debayered frames from the plots above, I can even detect visually that the first frames have lower SNR than the frames at the end of the imaging session. In my consideration I tried (in a simplified way) to account for this observation.

I would like to learn which trends do you observe inspecting the frames of one night. Can you please show a plot (SNRWeight and Median) of your own?

Bernd


Offline mschuster

  • PTeam Member
  • PixInsight Jedi
  • *****
  • Posts: 1087
Re: SubframeSelector
« Reply #22 on: 2018 February 13 08:14:29 »
SNRWeight definition is documented. It matches ImageIntegration weight assignment when configured with noise evaluation and average absolute deviation scale. I agree these types of metrics are not always reliable.

Predominate noise sources are target shot noise, background shot noise, and detector noise. If the exposure is sky limited, detector noise contribution is negligible. For targets brighter than the background, background shot noise contribution is negligible. For targets dimmer than the background (a typical "deep" image), background shot noise and detector noise (if not sky limited) are the primary contributors.

Signal contributions are primarily the target itself (of course) and atmospheric transparency.