Author Topic: Which image is the best one just by looking at the noise evaluation.  (Read 5328 times)

Offline MikeOates

  • PixInsight Addict
  • ***
  • Posts: 278
Which image is the best one just by looking at the noise evaluation. By best, I mean the lowest noise. Visually, both images look the same, but later in processing any extra noise may start to degrade the quality.

* Channel #0
sK = 2.734e-004, N = 12625690 (34.35%), J = 4

* Channel #0
sK = 2.474e-004, N = 18730079 (50.96%), J = 4

I thought the lowest noise was the one with the smallest sK number, but I am confused as to why N is larger.

The difference between these two images is just the settings used in Drizzle Integration and I want to know which settings to go with.

Thanks,

Mike

Offline Juan Conejero

  • PTeam Member
  • PixInsight Jedi Grand Master
  • ********
  • Posts: 7111
    • http://pixinsight.com/
Hi Mike,

Comparisons between unscaled noise estimates from different images are generally meaningless. To compare noise values, they must be scaled first to make them statistically compatible. You can use the following procedure with simple JavaScript sentences executed from the Process Console window.

- Open the two images and, for the sake of simplicity, rename them to "A" and "B".

- Run the following commands from the console:

j var imageA = View.viewById( "A" ).image
j var imageB = View.viewById( "B" ).image

Now we can access the images directly through the imageA and imageB variables.

- Execute these commands to get the scaled noise estimates:

j imageA.noiseMRS()[0]/Math.sqrt( imageA.BWMV() )/0.991
j imageB.noiseMRS()[0]/Math.sqrt( imageB.BWMV() )/0.991

The estimates will be written to the console, expressed in units of statistical dispersion. Compare them with about three significant digits.

In the last two expressions above, I have used the square root of the biweight midvariance as a scale estimate. You can use other robust estimates such as MAD, Qn or Sn, with similar results. Avoid using non-robust estimators such as the standard deviation, which may lead to wrong results.

Quote
I thought the lowest noise was the one with the smallest sK number, but I am confused as to why N is larger.

N is the number of pixels detected as pertaining to the noise by the MRS noise evaluation algorithm. The differences are not significant (they just indicate how the noise is distributed in each image), unless one of the images shows a very low value of N, say well below a 1%, in which case the noise estimate should be questioned.

Quote
The difference between these two images is just the settings used in Drizzle Integration and I want to know which settings to go with.

Comparison of (scaled) noise estimates can be one of the elements to guide your decisions. However, in the case of drizzle (and also in general image integrations) you should compare also PSF estimates with the DynamicPSF tool.
Juan Conejero
PixInsight Development Team
http://pixinsight.com/

Offline MikeOates

  • PixInsight Addict
  • ***
  • Posts: 278
Juan,

Many thanks for your detailed reply, this now leads to further questions.

Firstly when I used: j var imageA = View.viewById( "A" ).image

the console reply was "undefined" is that correct? Assuming it is I proceeded to the next stage:

j imageA.noiseMRS()[0]/Math.sqrt( imageA.BWMV() )/0.991

Which gave: 0.4630009584969679

I did this for three images the results are:

A = 0.463
B = 0.569
C = 0.773


From that I conclude A has the least noise.

I then used DynamicPSF for each. I used the same stars for better comparison:

Code: [Select]
PSF A
=====
Average Moffat PSF
N ....... 23 stars
B .......   0.058898
A .......   0.256776
sx ......   5.41 px
sy ......   4.85 px
FWHMx ...   4.81 px
FWHMy ...   4.31 px
r .......   0.897
theta ...  -1.28 deg
beta ....   3.85
MAD ..... 3.239e-003

PSF B
=====
Average Moffat PSF
N ....... 23 stars
B .......   0.040898
A .......   0.182699
sx ......   5.25 px
sy ......   4.69 px
FWHMx ...   4.74 px
FWHMy ...   4.24 px
r .......   0.894
theta ...  -1.25 deg
beta ....   3.74
MAD ..... 3.499e-003

PSF C
=====
Average Moffat PSF
N ....... 23 stars
B .......   0.026174
A .......   0.119202
sx ......   5.14 px
sy ......   4.58 px
FWHMx ...   4.69 px
FWHMy ...   4.17 px
r .......   0.891
theta ...  -1.20 deg
beta ....   3.67
MAD ..... 3.825e-003


From this I conclude there has to be a compromise, noise against definition i.e. improved FWHM and of the three go for B ? If I conclude wrong, please say.

For your information the three images are:

A = 2x drizzle, 0.90 Drop shrink
B = 2x drizzle, 0.75 Drop shrink
C = 2x drizzle, 0.6 Drop shrink


Mike

Offline Juan Conejero

  • PTeam Member
  • PixInsight Jedi Grand Master
  • ********
  • Posts: 7111
    • http://pixinsight.com/
Mike,

Quote
From this I conclude there has to be a compromise, noise against definition i.e. improved FWHM and of the three go for B ? If I conclude wrong, please say.

Your conclusion is absolutely right, both as a general remark and in this particular case. I would choose also B as the best compromise, as it is the most logical choice from the noise and PSF estimates obtained.

This is the kind of quantitative analysis and understanding for which we are working so hard in the development of PixInsight.

Quote
the console reply was "undefined" is that correct?

Yes, this is no problem. The result of that variable assignment is undefined as per JavaScript syntactical rules.
Juan Conejero
PixInsight Development Team
http://pixinsight.com/

Offline jerryyyyy

  • PixInsight Old Hand
  • ****
  • Posts: 425
    • Astrobin Images
I just used these calculations and found them vary helpful trying to determine the optimal number of subs to add into an image... should I keep shooting or have I gotten to asymptote in the quality of the image.

One thing I ask if there is a way to enshrine these calculations into a script or something I can use in other images.  I had to copy in the calculations to the console.

Also on the PSF I cannot seem to find an automatic way to get the same (20-25) stars registered in one image registered in a second image.

Any tricks would be appreciated. 
Takahashi 180ED
Astrophysics Mach1
SBIG STT-8300M and Nikon D800
PixInsight Maxim DL 6 CCDComander TheSkyX FocusMax

Offline MikeOates

  • PixInsight Addict
  • ***
  • Posts: 278
Also on the PSF I cannot seem to find an automatic way to get the same (20-25) stars registered in one image registered in a second image.

Any tricks would be appreciated.

Hi Jerry,

Selecting the same stars for the above test was rather laborious. What I did was after selecting the stars with the dynamic PSF I took a screen shot and then using the screen shot as a reference, I selected the same stars in the other images I was testing. It helps if you have dual monitors.

If someone knows a better way, it would speed the process up a great deal. Plus a script to do the noise evaluation using those calculations as Jerry asks would be fantastic.

Mike