# Flatfield correction (differences of distributions)

In imaging, one often does flat-field and dark-current correction. The dark current is assumed to be some fixed value and has a Poisson-like shot-noise. Therefore, the value of any pixel follows to be $P(n)$, where $n$ is the amount of dark-current.

My question now is, when I correct an image for this dark-current, I measure the dark-current for some time (exposure time). I usually measure my Signal for the same exposure time and finally subtract the dark-current measurement from the signal. In the resulting, corrected image, what does the noise look like?

For simplicity, assume, that I have no signal and measure two distinct dark-frames and subtract them from each other.

On a further note: I understand that the relative error decreases, when measuring the signal over a longer time (as $n$ increases and the error goes like $\sqrt{n}$. It therefore makes sense to take the dark-current image for a longer time and normalize it afterwards to the exposure time of the signal. I would also be interested in the resulting distribution in that case.

For the further note, let's say that you are measuring your signal over time $t_s$, you calibrate dark current estimate over time $t_c$, and the true dark current distribution over unit time is distributed according to $P(\lambda)$. Then, abusing the notation a little, the noise will be distributed according to
$$P(\lambda t_s) - \frac{t_s}{t_c} P(\lambda t_c).$$
I believe this distribution does not have a simplified representation (you can check this question). On the positive side, given the independence, it is easy to compute its mean ($=0$) and variance ($=\lambda (t_s + t_s / t_c)$), which might be enough for you.