How to read or interpret the mean and medium statistic values on my flat?

rtemen

Well-known member
What is the definitive way to read the statistics data on one of my flats?
I have found at least two articles describing how the mean and medium numbers on a raw flat should be targeted.
One is to be in the 7,000 to 8,000 range.
Another is to be in the 20,000 to 30,000 range.
They seem to indicate that these values are like the ADU number that they reference.
Question 1. My camera is a 14 bit, so if I use the Statistics process do I change the tool to 14 bit or leave it at 16 bit?
Question 2. Is there an up to date tutorial to step me through how to get the proper exposure on my flats?

Currently, when I try to take an exposure to get to the 20 to 30 thousand range, it is totally overexposed.

Thanks.
 
you can leave it at 16-bit but just know that a fully overexposed flat would read out as 0.25 (or 16383 ADU) in this mode. switching modes generally confuses things.

the overriding idea with flats is to make them as bright as possible without departing the "linear response" zone of the sensor. all these sensors behave linearly up to a point (meaning some number of photoelectrons received maps linearly to an ADU value, so if you generated 1000 e- the ADU would be, say, 250, and if you generated 2000e-, the ADU would be 500.) past a certain # of electrons, the ADUs no longer track the electrons in a linear fashion. this ruins the flat as it no longer represents the sensor performance of your light exposures.

as for tutorials, i dont know... but a shortcut rule of thumb that people have come up with is to expose the brightest part of the flat to no more than 1/2 well depth. so for instance if you have a camera with a 14-bit ADU then the brightest part of the flat should read 8192 ADUs. more than likely you can make the flat brighter than this, but the 1/2 well depth is considered "safe" (that is, in the linear response zone of almost every single sensor out there.) the tradeoff is that you need more flat subs to boost the master flat SNR to acceptable levels.

rob
 
Thanks for this great info.
I am still confused about some of these numbers. For example, ADU.
I understand the word means Analog to Digital Unit. And your example of the two cases where you indicate a 250 or 500 I think I kinda get.
Where I get lost at this point is that none of my various software tools use the name ADU. When I use the PixInsight Statistics process the values that I think I have been told to use is the Mean and/or Median. Is this the same as the ADU? If so, how do I get from ADU to mean of 8,000 or so?
I use BackyarkEOS to capture my pics. When I take a flat, I can hover over the pic with my right mouse button held down and it shows the data of each pixel that I hover over. It shows the well, and it shows a mean and median number. These numbers have a range of 0 to 255.
So, how do we get to 8,000 or so in the PI Statistics? Any pic that is over exposed is clamped off at 255.
I have also read that using the camera's back end histogram is not preferred due to the camera changing some things to make the display.
I thank you for any guidance you might have.
 
yeah ADU means "analog-digital unit" and you sometimes see DN (for "data number"). of course the signal received by the sensor is analog in nature (a voltage is created as photons knock electrons off of atoms in the sensor). that analog voltage is measured with an analog-digital converter. this is where the number of bits come in, since the output of the A/D converter is a binary number. some sensors have 12-bit A/D converters, some 14, and some 16. incidentally the gain of the sensor is the relationship between the number of electrons need to tick the A/D converter by 1 ADU. so if you see that a sensor has a gain of 0.33 then you need 3 electrons to register 1 ADU. on a DSLR the ISO setting is essentially the analog gain we're talking about here.

since 16 bits is a very convenient size for computers (2 bytes), almost all capture programs output frames as 16-bit integer samples. so then the topmost bits of the 16-bit integers are 0 when the A/D converter width is less than 16 bits. that's the origin of the math above. a 14 bit sensor can only output numbers between 0 and 16383 because the two topmost bits of the 16 bit words are always 0.

internally, PI represents all numerical data as floating point numbers in the 0.0-1.0 range. so if you fully exposed a flat the ADU value everywhere in the flat would be 16383 and thus since the file format is 16-bit integer, the corresponding value in PI will be 0.25 (the biggest 16-bit number is 65535.) if you forget about trying to display 16-bit statistics in PI, a good "brightest" value for a DSLR flat would be 0.125, which is 1/2 the "full-well" (saturated) value of 0.25 (or 16383 ADUs). the 0.125 value equates to 8192 ADU.

as for mean vs. median, those are exactly the same as the mean and median in math. half the pixels are brighter than the median and half are dimmer. the mean value is the average value of all the pixels in the image. note that if you go for a median value of 8192 then the brightest parts of the flat are going to be greater than 8192 ADU. this is probably OK but it is worth checking that the brightest part (usually the center of the flat) is not too bright.

BYE does a virtual "back of camera" stretch on the data and the histogram it shows is therefore as though the data has been stretched. BYE doesn't actually stretch the data; it's really just the same as PI's STF ("screen transfer function", aka a "screen stretch") additionally BYE is normalizing the histogram to 8-bits per channel, maybe because that's what a JPEG image is. you actually have 14-bits per channel in the canon sensors. bottom line is that for flats i wouldn't try to measure them with BYE's histogram. a good flat is going to look overexposed for sure. just take some test flat exposures of varying lengths and go into PI and find the one where the brightest part is near 0.125, then use that exposure length. when i used a DSLR i'd just set it for Av and +2EV and that seemed to be about right.

note that with any OSC (one-shot color) camera you will sometimes get color casts in the flats. this is not a problem, unless your dim channel is underexposed compared to the brighter ones. in this case you need to take more flats than otherwise necessary to make sure the SNR of the dim channel is sufficient. or, you can try to fix the cast with a colored T-shirt, assuming you are doing T-shirt flats. these casts can be pretty significant when you use LP filters like the CLS or IDAS LP filters...

rob
 
So, let me know if I interpret this properly.
So if I take my flats such that the mean and median in the PI Statistics is in the 7,000 to 8,000 range that I am good to go?
I do take a lot of flats and then process them to a master flat.
 
yes, that should be good enough (but like i said it will read out as 0.125 in the [0-1] range in statistics...)

rob
 
Back
Top