Chemistry Reference
In-Depth Information
Bresenham algorithm. The pixels are represented by circles on the nodes of the grid.
The conic line at a 2u value is approximated by a series of pixels labeled with a dark
dot inside the circle. The integration is a simple sum of all pixels approximating the
conic line within the g interval.
Ið2uÞ¼ X
n
p i
2u 1 2u 2u 2
ð6
:
20Þ
i¼1
where p i is the counts of the ith pixel, and n is the total number of pixels integrated at
the 2u position. The intensity can be normalized by the number of pixels to average
pixel count.
Ið2uÞ¼ X
n
p i =
n
2u 1 2u 2u 2
ð6
:
21Þ
i¼1
The integrated intensity can be normalized by the arc length by a Siemens modified
algorithm [17]. Figure 6.9(b) gives a schematic of this modified algorithm. This
modified algorithmmust consider both the previously chosen pixel and the following
chosen pixel by the Bresenham algorithm. The arc length is approximated by the two
half distances to both the previous and the next pixel. For pixel P 2 , the arc length is
a 2 þ b 2 and a i þ b i for pixel P i . The arc normalized integration is then given by
P
n
p i ða i þb i Þ
P
i¼1
Ið2uÞ¼
2u 1 2u 2u 2
ð6
:
22Þ
n
i¼1 ða i þb i Þ
The integrated intensity can also be normalized by the solid angle of each pixel.
P
n
p i DW i
i¼1
Ið2uÞ¼
2u 1 2u 2u 2
ð6
:
23Þ
P
n
i¼1 DW i
where DW i is the corresponding solid angle of the pixel P i given by Eq. (6.2). The
Bresenham algorithm uses only simple addition, which can be done very fast. This
was critical when computer power was very limited. However, satisfactory results can
be achieved only if the pixel size is smaller than the D2u step. When the D2u step is
only a fraction of the pixel size, it may generate a stair-like profile due to the same
group of pixel being used to approximate adjacent conic lines.
With the availability of tremendous computer power today, the Bresenham
algorithm and its modified versions have lost its advantages. Due to the way the
Bresenham algorithm treats pixels as discrete points in the grid and the approximation
of conic lines, it is hard to generate a smooth and accurate diffraction profile,
especially when the integration step is smaller than the pixel size or the counts are
low. A relatively new method is the bin method, which treats pixels as having a
continuous distribution in the detector. It demands more computer power, but delivers
 
Search WWH ::




Custom Search