jleuschn / lodopab_tech_ref

Technical reference for the LoDoPaB-CT dataset
MIT License
14 stars 3 forks source link

Why the observation data has negative values? #2

Closed gaopinghai closed 3 years ago

gaopinghai commented 3 years ago

As the create_dataset.py, I think the value of the observation data should always be positive. But I find there are negative values in observation data. I wonder why this can happen? Please help, sir, thanks!

jleuschn commented 3 years ago

The expectation value of the observation data is always positive, but due to the Poisson noise, the individual observation samples can be negative. This happens where the attenuation is very weak: there we sample from a Poisson distribution with a mean value of approximately 4096 photons. Samples from this distribution also take values above 4096 photons, leading to an intensity ratio larger than 1., so -log of it is negative.

Just in case it may help, here are some more details about the Poisson assumption: The number of photons emitted at the X-ray source is assumed to be Poisson distributed. After the attenuation, the numbers of photons are again modeled as Poisson distributions, but with mean values that are lower according to Beer-Lambert's law, which involves the integral of linear attenuation coefficients along the path of the photons. Finally, the detection at the detector is assumed to be Bernoulli-distributed, again leading to Poisson distributions with mean values lowered by a constant factor. The expected value of the whole emission and detection process is set to 4096 photons, in the case of no attenuation (i.e. if the photons do not travel through absorbing materials). Thus, due to the nature of the Poisson distribution, it is possible to observe higher photon counts than 4096, but it becomes increasingly unlikely with higher absorption rates, because of the lower mean values of the Poisson distributions.