Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Let's say we measured the following ADUs on our detector. "adu_per_photon" is user-defined, but for this example let's set it to 1:

Code Block
ADUs (adu_per_photon=1):
0.0 3.5 0.1 0.2    
0.2 0.4 0.0 1.2
0.1 4.7 3.4 0.0
0.5 0.4 0.4 0.1    

...

To see how we get from ADUs to Photons, we split the ADUs into whole photons and fractional photons.

Code Block
ADUs               =  Whole photons   +    Fractional photons
 
Whole photons0.0 3.5 0.1 0.2     +    Fractional photons
0 3 0 0                0.0 0.5 0.1 0.2   
0.2 0.4 0.0 1.2    =     0 0 0 1      +       0.2 0.4 0.0 0.2
0.1 4.7 3.4 0.0          0 4 3 0              0.1 0.7 0.4 0.0
0.5 0.4 0.4 0.1          0 0 0 0              0.5 0.4 0.4 0.1

Assuming the photons are only split by two adjacent pixels, we search for a pixel that has at least 0.5 photons with an adjacent pixel that sum up to above 0.9 photons. In cases where a pixel has multiple adjacent pixels which sum up to above 0.9 photons, we take the largest adjacent pixel. If such an adjacent pair of pixels is found, then the adjacent pixel values are merged into one pixel. It is merged into the pixel with the larger value. (See "After merging adjacent pixels" example below).

...