Odd photon transfer curve behavior

JimKasson

Community Leader
Forum Moderator
Messages
52,278
Solutions
52
Reaction score
59,062
Location
Monterey, CA, US
When I plot a set of photon transfer curves for the Sony alpha 7S, I get this:

e8ac577f18274d19bb0712cb7b5df435.jpg.png

The horizontal axis is the mean value -- aka the mu -- in a 100x800 pixel region of interest (ROI). The axis is a log scale in stops below full scale. The Sony has at best a 13-bit ADC. The horizontal axis is the standard deviation -- aka the sigma-- in the ROI. The axis is also a log scale in stops below full scale. I've only plotted the whole-stop ISOs for clarity. You can see the bottoms of the ISO 3200 and ISO 1600 curves mash together because the a7S changes conversion gain at the ISO 1600 to ISO 2000 transition.

The ISO 100 and ISO 200 curves have an odd "ringing" at low mu's. Let's look a little closer:



7081eed0575441d2ae0fdbf2be68a6bb.jpg.png







357081fedb4f424593a0fca3748029ef.jpg.png

Normally, I have the analysis program throw out low SNR data points, so I don't see much of this. I told it not to do that for these curves. The a7S, like the other alpha 7 cameras, does not truncate the low-signal histogram. I've seen this effect in other cameras, but not in all cameras.

What causes the "ringing" in the measured sigmas? And why does it occur only at low ISO?

I have a guess, but it's only a guess, and I'd appreciate any input from you all. My guess is that when the read noise is small compared the the LSB voltage spacing of the ADC, small variations in mean values can cause the read noise to be quantized differently.

What's your opinion?

Thanks,

Jim

--
 
If the above is indicative of actual camera behavior, and not some artifact -- and I've seen it in several cameras with at least three different capture setups -- it has implications for measurement of read noise by looking at dark-field images at low ISOs, even in cameras that do no black point subtraction.

In these graphs, I'm measuring RN by modeling. The RN is the value approached asymptotically by the modeled camera -- orange -- lines.

Jim

--
http://blog.kasson.com
 
Last edited:
So, the vertical axis value of -13 is more or less one LSB? And the "analog" value you plot is really just an average of a bunch of 1's an 0's only?

If yes, or even close to yes, then sure, you could be measuring something like that. Basically one avoids measurements down in that region because they are too hard to think about. You could get zero noise if the noise was substantially less than an LSB, for example. It is not reallly averaging anymore, it is more like a complementary error function response, assuming the noise before the ADC is still Gaussian.

The ringing is still strange though and probably depends a lot on what is in the analog signal chain and how the ADC is operating.

Just a guess. Like I said, one usually avoids this range of measurement. In fact, I am surprised the signal looks so clean.
 
So, the vertical axis value of -13 is more or less one LSB? And the "analog" value you plot is really just an average of a bunch of 1's an 0's only?
Yes, indeed. Well, sort of. This camera has a black point of 512 if you call it a 14-bit camera. The points are calculated by operating on pairs of images. Mu is half the mean of the sum. Sigma is the standard deviation of the difference divided by 1.414.

Here's a histogram of the ROI of a sample image (not a difference image) in the area where the curve "rings":



2776b12a90fd41b792d65f696d31c5ca.jpg.png

The gaps are because the a7S advertises itself to the raw converter as 14 bits, but the 14th bit never changes. The histogram actually looks broad enough to provide reasonable dithering. I've done some dithering simulations, and I've never seen anything like this.
If yes, or even close to yes, then sure, you could be measuring something like that. Basically one avoids measurements down in that region because they are too hard to think about. You could get zero noise if the noise was substantially less than an LSB, for example. It is not reallly averaging anymore, it is more like a complementary error function response, assuming the noise before the ADC is still Gaussian.

The ringing is still strange though and probably depends a lot on what is in the analog signal chain and how the ADC is operating.

Just a guess. Like I said, one usually avoids this range of measurement. In fact, I am surprised the signal looks so clean.
Me, too.

As I said in the original post, I usually throw out this data, but I decided to look at it here, and was surprised by what I saw.

Thanks for your insights on this, Eric.

Jim



--
 
Here's the histogram of an ISO200 image in the region where there's ringing:



e5fbe04834ab40f3b15493f56fe527a0.jpg.png

Note that it's not symmetrical.

However, a dark field image at ISO 200 is symmetrical (note that this isn't apples to apples; the dark field image was made with the camera in a shutter mode that turns it into a 12-bit camera):



7ecd287116bd4f8693defc5644367b08.jpg.png



While I'm on the subject of a7S dark-field histograms, there's quite a shift in black point when the camera goes from ISO 1600 (low conversion gain):



09ca8cbe65ba4aad870c93f37ae31862.jpg.png



to ISO 2000 (high conversion gain):



a5e885d8ae41474e9a21fe20d20bb5ea.jpg.png

Jim



--
 
If the above is indicative of actual camera behavior, and not some artifact -- and I've seen it in several cameras with at least three different capture setups -- it has implications for measurement of read noise by looking at dark-field images at low ISOs, even in cameras that do no black point subtraction.

In these graphs, I'm measuring RN by modeling. The RN is the value approached asymptotically by the modeled camera -- orange -- lines.

Jim

--
http://blog.kasson.com
Hi Jim,

Maybe this has to do with the ADC as you suspect. J. Janesick shows this cyclic behavior in his Photon Transfer book, Fig. 11.15, when he shows photon transfer curves both with and without ADC quantizing noise/error. Maybe the parameters of your A7S measurements are such that this part of the read noise is not insignificant at these ISOs. Have to think about this some more, but the curves look similar...

Chris
 
If the above is indicative of actual camera behavior, and not some artifact -- and I've seen it in several cameras with at least three different capture setups -- it has implications for measurement of read noise by looking at dark-field images at low ISOs, even in cameras that do no black point subtraction.

In these graphs, I'm measuring RN by modeling. The RN is the value approached asymptotically by the modeled camera -- orange -- lines.

Jim

--
http://blog.kasson.com
Hi Jim,

Maybe this has to do with the ADC as you suspect. J. Janesick shows this cyclic behavior in his Photon Transfer book, Fig. 11.15, when he shows photon transfer curves both with and without ADC quantizing noise/error. Maybe the parameters of your A7S measurements are such that this part of the read noise is not insignificant at these ISOs. Have to think about this some more, but the curves look similar...
Thanks, Chris. I think that's it. I never noticed that graph, and I appreciate your pointing it out. Janesick says that the cyclic quantizing noise is quenched when the other noise sources get above half an LSB. I found that to be true when I did this simulation:

http://blog.kasson.com/?p=6513

However, the single-image histograms look like the noise is greater than that, at least on the high side. Maybe the histograms have a lot of pattern noise in them, so, when the pairs of images are subtracted, there's a lot less noise.

Yep, that's it. Here's a histogram of the document mode raw difference image:

edb51949b4754f13a002a21a1025b447.jpg.png

Interestingly, the histogram of just the ROI looks the same.

The asymmetry of the single-image histogram is confusing to me; maybe the pattern noise is asymmetric.

Thanks,

Jim

--
http://blog.kasson.com
 
Last edited:
If the above is indicative of actual camera behavior, and not some artifact -- and I've seen it in several cameras with at least three different capture setups -- it has implications for measurement of read noise by looking at dark-field images at low ISOs, even in cameras that do no black point subtraction.

In these graphs, I'm measuring RN by modeling. The RN is the value approached asymptotically by the modeled camera -- orange -- lines.

Jim

--
http://blog.kasson.com
Hi Jim,

Maybe this has to do with the ADC as you suspect. J. Janesick shows this cyclic behavior in his Photon Transfer book, Fig. 11.15, when he shows photon transfer curves both with and without ADC quantizing noise/error. Maybe the parameters of your A7S measurements are such that this part of the read noise is not insignificant at these ISOs. Have to think about this some more, but the curves look similar...
Thanks, Chris. I think that's it. I never noticed that graph, and I appreciate your pointing it out. Janesick says that the cyclic quantizing noise is quenched when the other noise sources get above half an LSB. I found that to be true when I did this simulation:

http://blog.kasson.com/?p=6513

However, the single-image histograms look like the noise is greater than that, at least on the high side. Maybe the histograms have a lot of pattern noise in them, so, when the pairs of images are subtracted, there's a lot less noise.

Yep, that's it. Here's a histogram of the document mode raw difference image:

edb51949b4754f13a002a21a1025b447.jpg.png

Interestingly, the histogram of just the ROI looks the same.

The asymmetry of the single-image histogram is confusing to me; maybe the pattern noise is asymmetric.
Hi Jim,

It seems to me that the examples in your post show decent random noise dithering (say > 1/3 LSB to be safe) and sample size (say > 20k pixels). If the ringing were caused by quantization, wouldn't increasing the ROI attenuate it? Does it?

Building on Eric's and Chris' posts assuming zero signal (i.e. two dark field captures with the cap on at f/22+ and 1/8000s, camera in a drawer:-), enough dithering and a large enough sample size, the individual image histogram should be representative of unwanted signal (aka 'noise'). If you subtract two dark frames the resulting image histogram should in theory be gaussian and now representative of random noise only (aka 'read noise'), with standard deviation calculations relatively accurate for the purpose at hand.

If the individual dark image data/histograms are normally distributed, so will be the difference data/histogram by definition. If the individual histograms are not gaussian that means that there is some residual signal or non-random noise present. Given how skewed the individual ISO200 histogram is in your earlier post one would guess both.

If the difference image is not gaussian, it would point to some form of improper processing or non-space dependent 'noise', because if it were space dependent (e.g. FPN) it should mostly cancel out. If a little signal were present the relative shot noise would need to be subtracted in quadrature as usual of course.

Question: why does the difference histogram above only show positive values and appear clipped at zero?

Jack
(Happy New Year y'all)
 
Last edited:
Question: why does the difference histogram above only show positive values and appear clipped at zero?
You caught me, Jack. It looks that way because I forgot to convert the images from uint16 to double before subtracting them. I'll do it right and repost.

Jim

--
http://blog.kasson.com
 
Last edited:
You caught me, Jack. It looks that way because I forgot to convert the images from uint16 to double before subtracting them. I'll do it right and repost.
Here's the corrected code:



fccead1c319d45bf81147da3fabd7c16.jpg.png

Here's the corrected histogram:



bba8ea5958894de29e82cbde33674279.jpg.png



Here's what the ROI looks like:



010a0f30b0df4820bea5b6f7f91b870d.jpg.png

Sorry,

Jim



--
 
When I plot a set of photon transfer curves for the Sony alpha 7S, I get this:

e8ac577f18274d19bb0712cb7b5df435.jpg.png

The horizontal axis is the mean value -- aka the mu -- in a 100x800 pixel region of interest (ROI). The axis is a log scale in stops below full scale. The Sony has at best a 13-bit ADC. The horizontal axis is the standard deviation -- aka the sigma-- in the ROI. The axis is also a log scale in stops below full scale. I've only plotted the whole-stop ISOs for clarity. You can see the bottoms of the ISO 3200 and ISO 1600 curves mash together because the a7S changes conversion gain at the ISO 1600 to ISO 2000 transition.

The ISO 100 and ISO 200 curves have an odd "ringing" at low mu's. Let's look a little closer:

7081eed0575441d2ae0fdbf2be68a6bb.jpg.png

357081fedb4f424593a0fca3748029ef.jpg.png

Normally, I have the analysis program throw out low SNR data points, so I don't see much of this. I told it not to do that for these curves. The a7S, like the other alpha 7 cameras, does not truncate the low-signal histogram. I've seen this effect in other cameras, but not in all cameras.

What causes the "ringing" in the measured sigmas? And why does it occur only at low ISO?

I have a guess, but it's only a guess, and I'd appreciate any input from you all. My guess is that when the read noise is small compared the the LSB voltage spacing of the ADC, small variations in mean values can cause the read noise to be quantized differently.

What's your opinion?

Thanks,

Jim

--
http://blog.kasson.com
Looking at it from a purely analytical PoV, it sure looks like value quantization aliasing. SOMETHING in the chain quantizes data that has an average deviation that's less than 1/1 LSB. This gives ringing in the output analysis, a ringing that has a frequency of 1 and an amplitude of approximately AD/LSB.

The reason for this is the attenuation of the average deviation you get when most of the AD spread falls within one LSB value range. When the actual signal level is at exactly half LSB level, almost all of the possible analysis result falls to one datapoint. When the actual signal is exactly at an LSB crossover, you have maximum amplification of the AD - 50% will be at one quantized datapoint, 50% will be at the adjoining datapoint.

This very often happens (all the time, actually...) when you look at what happens to the signal further down the DSP chain. It's one of the things that you always try to keep low enough compared to usable signal no matter what stage you're at...

One very common (and actually in some cases very visible!) case of this is when you do color space transforms on 8-bit data. In some directions, in some regions of the target space you can get "skips" of data points. Here, no numerical transform of the original data will result in exactly that point - you get a "value hole". Very noiseless (noise-reduced!) blue skies with slow slopes can show this effect very visibly as posterization.

Lots of text to get to the point - look at the graph anomaly (analysis anomaly) as a sort of posterization. :)
 
-You CAN adjust the analysis to include a back-of-envelope compensation for this behavior, but I honestly don't think that it's worth it in this case. Knowing that as the analysis approaches 1 LSB levels you probably have to mentally include a correction of (max) sqrt(2) to the lowest levels when you see this behavior is enough. If you do a curve fit, do a median filter on the data first. Use a width of what would visibly be about 1/2 the ringing period in datapoints, that would lower the error to (max) sqrt(1.4), and I would consider that more than good enough for what we're doing here.

But if you're doing base research seriously, I could relay a contact that handle this type of analysis problem daily. It's fairly common in particle physics. But then you'd have to either know exact quantization levels for all steps of the processing chain, OR you'd have to fit a theoretical model of quantization error to what you're seeing.

It's a numerical analysis problem in this case, not a "real" problem... :)
 
The_Suede wrote: Looking at it from a purely analytical PoV, it sure looks like value quantization aliasing. SOMETHING in the chain quantizes data that has an average deviation that's less than 1/1 LSB. This gives ringing in the output analysis, a ringing that has a frequency of 1 and an amplitude of approximately AD/LSB.
I hear what you are saying The_Suede. But why 1/1LSB? Empirical simulations (my own, or those in Jim's link) seem to show that with about 80k samples as long as random noise is above about 1/3 LSB it provides enough dithering to measure the signal as if it were of floating point class. In the example above the effect starts being visible somewhere 10 bits below saturation, well above 1 LSB.
 
But why 1/1LSB? Empirical simulations (my own, or those in Jim's link) seem to show that with about 80k samples as long as random noise is above about 1/3 LSB it provides enough dithering to measure the signal as if it were of floating point class. In the example above the effect starts being visible somewhere 10 bits below saturation, well above 1 LSB.
I'd say half an LSB, but let's not quibble. Your point about the effect starting well above that is apt.

If it were a successive approximation ADC I'd say there was a problem at a major carry making a bit transition too wide. But it's (I believe), a comparator/ramp ADC, which shouldn't have such problems, right? I wonder if the counters on those ADCs count in Gray Code so that the counter itself can't feed back to the comparator and cause problems at major carries.

Naw, that doesn't make any sense, since we're talking about lots of ADCs, not just one.

Eric, help!

Jim

--
http://blog.kasson.com
 
Last edited:
Empirical simulations (my own, or those in Jim's link) seem to show that with about 80k samples as long as random noise is above about 1/3 LSB
Do you think it's a coincidence that 1/sqrt(12) = 0.289 ~= 1/3 ?
Huh? Your brain is working faster than mine this afternoon, Bill. Can you fill in the details of what you're thinking?

Jim
 
Empirical simulations (my own, or those in Jim's link) seem to show that with about 80k samples as long as random noise is above about 1/3 LSB
Do you think it's a coincidence that 1/sqrt(12) = 0.289 ~= 1/3 ?
Huh? Your brain is working faster than mine this afternoon, Bill. Can you fill in the details of what you're thinking?
I'm wondering about Quantization Error.
I got that far. But how's the square root of 12 figure in?

Jim
 
Empirical simulations (my own, or those in Jim's link) seem to show that with about 80k samples as long as random noise is above about 1/3 LSB
Do you think it's a coincidence that 1/sqrt(12) = 0.289 ~= 1/3 ?
Huh? Your brain is working faster than mine this afternoon, Bill. Can you fill in the details of what you're thinking?
I'm wondering about Quantization Error.
I got that far. But how's the square root of 12 figure in?

Jim
 
But why 1/1LSB? Empirical simulations (my own, or those in Jim's link) seem to show that with about 80k samples as long as random noise is above about 1/3 LSB it provides enough dithering to measure the signal as if it were of floating point class. In the example above the effect starts being visible somewhere 10 bits below saturation, well above 1 LSB.
I'd say half an LSB, but let's not quibble. Your point about the effect starting well above that is apt.

If it were a successive approximation ADC I'd say there was a problem at a major carry making a bit transition too wide. But it's (I believe), a comparator/ramp ADC, which shouldn't have such problems, right? I wonder if the counters on those ADCs count in Gray Code so that the counter itself can't feed back to the comparator and cause problems at major carries.

Naw, that doesn't make any sense, since we're talking about lots of ADCs, not just one.

Eric, help!

Jim
 

Keyboard shortcuts

Back
Top