Author Topic: How to evaluate calibration frames  (Read 17096 times)

Offline AstroScience

  • PixInsight Addict
  • ***
  • Posts: 169
Re: How to evaluate calibration frames
« Reply #15 on: 2014 November 24 10:29:45 »
Thanks, Mike, I have run the script on all non-debayered frames and got SNR of 37, is that mean that I would need (1000/37)^2 = 730 frames? I'm missing something?

Offline mschuster

  • PTeam Member
  • PixInsight Jedi
  • *****
  • Posts: 1087
Re: How to evaluate calibration frames
« Reply #16 on: 2014 November 24 10:36:12 »
Hi Sergio,

Thanks for trying. It could be that the bayer pattern is not addressed correctly by the script (i.e., seen as noise). SNR should be higher IMO.

Please try debayering first and extracting channels.

Also, please double check that flat exposure level is reasonable.

Mike

Offline mschuster

  • PTeam Member
  • PixInsight Jedi
  • *****
  • Posts: 1087
Re: How to evaluate calibration frames
« Reply #17 on: 2014 November 24 13:46:20 »
Here is a new version of the script.

https://dl.dropboxusercontent.com/u/109232477/PixInsight/Scriptbox/FlatSNREstimator.0.2.zip

It now works with both uncalibrated and calibrated flats. For uncalibrated flats, you need to specify a flat dark or bias. For calibrated flats (i.e, bias or flat dark subtracted subframe or integration), do not specify a flat dark or bias, i.e. leave the field as <No View Selected>. The tooltip at the bottom of the dialog gives more help.

For bayered cameras, for now please debayer everything, extract the three channels, and run the script on each channel separately. This will give you per channel SNR information.

Mike

Update: When I get a chance I will write a DarkBiasNoiseEstimator. It will measure noise (not SNR) in either darks or biases using the same technique and let you double check your frames and integration efficiency.

« Last Edit: 2014 November 24 13:56:57 by mschuster »

Offline mschuster

  • PTeam Member
  • PixInsight Jedi
  • *****
  • Posts: 1087
Re: How to evaluate calibration frames
« Reply #18 on: 2014 November 24 16:01:30 »
Here is a beta DarkBiasNoiseEstimator script. It measures noise in darks or biases by differencing a pair of frames to eliminate fixed pattern noise and then measuring noise (read noise, dark current noise, etc.) using a robust, block-local statistics scheme.

Mike

https://dl.dropboxusercontent.com/u/109232477/PixInsight/Scriptbox/DarkBiasNoiseEstimator.0.1.zip

Here I measure 24 second flat-darks and 128 frame integrations. Noise decreased by a factor of about 11.3x, about equal to square root 128 as expected.





Here I measure 40 minute darks and 64 frame integrations. Noise decreased about 6.1x, less than the 8x expected. Part of the reason for this appears to be fixed pattern noise drift over a month or more. On similar data captured within a few days period, I measure better integration improvements of about 7.7x.





« Last Edit: 2014 November 24 20:13:14 by mschuster »

Offline AstroScience

  • PixInsight Addict
  • ***
  • Posts: 169
Re: How to evaluate calibration frames
« Reply #19 on: 2014 November 25 08:51:11 »
Mike,

I used SNRstimator 0.2 on uncalibrated flats which have been debayered and channels extracted. Same for BIAS frame, debayer and 3 channel extraction.
The script gave me results for channel R - SNR 30, G - SNR 44, B - 35.

Offline mschuster

  • PTeam Member
  • PixInsight Jedi
  • *****
  • Posts: 1087
Re: How to evaluate calibration frames
« Reply #20 on: 2014 November 25 09:58:29 »
Hi Sergio,

Thanks you. The SNRs are self consistent (G the largest of RGB, Unbayered (37) equal roughly to the RGB average), but all seem low.

Please zip the images in Dropbox, I will investigate.

DLSR sensor full well depth should be at least 10k e-. Exposed to 50% is at least 5k e- captured in flat. Square root of 5k is SNR 70. Many of these cameras should be SNR 100+.

Mike



Offline mschuster

  • PTeam Member
  • PixInsight Jedi
  • *****
  • Posts: 1087
Re: How to evaluate calibration frames
« Reply #21 on: 2014 November 25 10:53:38 »
Sergio,

Please also tell me what ISO you are shooting.

If ISO is relatively large, sensor gain is also therefore small (i.e., small e-/DN values). On a flat, DNs may be large but actually will correspond to relatively few electrons due to small gain. So flat exposures will be no where near full well depth and hence SNRs will in fact be low. This could explain your results.

In other words, flat SNRs on high ISO DSLR captures will be relatively low.

What can you do? At high ISO, risk of blooming is likely low. So expose flats as bright as possible, say to 90+% of apparent 64k DN saturation?

Mike
« Last Edit: 2014 November 25 11:06:16 by mschuster »

Offline AstroScience

  • PixInsight Addict
  • ***
  • Posts: 169
Re: How to evaluate calibration frames
« Reply #22 on: 2014 November 26 12:17:10 »
Mike,
yes I thought that ISO may play a role here. I do expose my flats properly but at ISO1600.

Here is the link to the files so you can examine them : https://www.dropbox.com/sh/wa58045894g64xj/AACclgP2fZ9Y5-CrN1nxjnYPa?dl=0

To determine my flat exposure I took one overexposed frame, measuring it, it was around 15600, a bit more. My 14 bit camera have in total 16383 range.

So to get half well for the flats I aimed for 8000. Not sure how to wrap my head around it.

Offline mschuster

  • PTeam Member
  • PixInsight Jedi
  • *****
  • Posts: 1087
Re: How to evaluate calibration frames
« Reply #23 on: 2014 November 26 18:35:26 »
Sergio,

Thank you.

Raw Bayer CFA SNR estimate is 46. Debayer Process RGGB VNG SNR estimates are 39, 69, 45. Bilinear Debayer SNR estimates are larger.

These estimate are reasonable given the amount of noise in the flats. Low SNRs are due to high ISO (relatively few photons per DN).

For input to the script, my preference now for OSC is to use CFA images (i.e. don't debayer).

All DNs reported by the scripts are 16-bit, which is confusing on your 14-bit data.

For OSC, is it valid to use low ISO flats to calibrate high ISO lights? Maybe the OSC experts know? This might be a way to improve flat SNR.

There are a lot of noise sources. These scripts focus on noise that can be reduced by integration (e.g. read noise, dark current noise, and shot noise) and ignore both noise reduced by calibration (e.g. fixed pattern noise) and noise reduced by rejection (e.g. cosmic rays).

Vignetting in the flats results in lower SNR near the edges and corners. The script reports a median estimate across the frame. One way to measure SNR near the edges and corners: Run AberrationInspector on each frame, and then run the script on the resulting mosaics.

Mike
« Last Edit: 2014 November 26 20:00:00 by mschuster »

Offline mschuster

  • PTeam Member
  • PixInsight Jedi
  • *****
  • Posts: 1087
Re: How to evaluate calibration frames
« Reply #24 on: 2014 November 26 21:46:42 »
Sergio,

This plot shows vignetting in one of the flats.

The peak value is about 0.23 (normalized). Does this imply that the peak was nearly staturated (in the original 14-bit data, where 14-bit peak of 16k would be 25% in 16-bit data), or does it mean that the peak was only 23% intensity (in the original 14-bit data)? I am not sure how 14-bit data gets normalized when raw Bayer CFA is read.

Mike


Offline AstroScience

  • PixInsight Addict
  • ***
  • Posts: 169
Re: How to evaluate calibration frames
« Reply #25 on: 2014 November 26 21:56:20 »
Yes Mike, the peak was nearly saturated in the original 14 bit data. (Histogram about 90-95%). When this represents in 16 bit in PI it gets to around 23%.

Offline mschuster

  • PTeam Member
  • PixInsight Jedi
  • *****
  • Posts: 1087
Re: How to evaluate calibration frames
« Reply #26 on: 2014 November 26 22:14:52 »
Ok, thanks.

I may have made a mistake here:

I estimate a gain of 0.2 e-/DN for your ISO 1600 captures.

Assuming a nearly saturated 14-bit flat, SNR would be (16k DN * 0.2 e-/DN)^0.5 or about 60.

This is best to hope for. SNR 1000 is not feasible. A feasible flat master may be adding annoying noise to your calibrations.

Mike
« Last Edit: 2014 November 26 22:59:08 by mschuster »

Offline mschuster

  • PTeam Member
  • PixInsight Jedi
  • *****
  • Posts: 1087
Re: How to evaluate calibration frames
« Reply #27 on: 2014 November 27 03:18:55 »
Sergio,

I forgot to mention, the G channel is likely overexposed. The de-Bayered G channel's histogram appears clipped on the brighter, right hand side. The clipping may affect the script's measurements, and of course may compromise your calibrations.

Mike

Offline AstroScience

  • PixInsight Addict
  • ***
  • Posts: 169
Re: How to evaluate calibration frames
« Reply #28 on: 2014 November 27 09:28:11 »
Mike,

you are right, how did I missed that ... thank you for bringing this to my attention.

As for improving flat SNR, I think I used too fast exposures. I'll try next time to make them longer as 1-2 seconds.

How did you estimated gain of 0.2 e- for ISO1600?

Offline mschuster

  • PTeam Member
  • PixInsight Jedi
  • *****
  • Posts: 1087
Re: How to evaluate calibration frames
« Reply #29 on: 2014 November 27 16:11:08 »
How did you estimated gain of 0.2 e- for ISO1600?

Signal / (Noise * Noise)

Signal in e- equals Signal * Gain. Noise in e- equals Noise * Gain.
Photon statistics says noise in e- equals square root of signal in e-, hence
Noise * Gain = (Signal * Gain) ^ 0.5.
Solving for Gain gives Signal / (Noise * Noise). Ignore the second solution Gain 0.

« Last Edit: 2014 November 27 23:40:52 by mschuster »