Logarithmic 3-Band Color Encoding: A Robust Method for Display and Comparison of Compositional Maps in Electron Probe X-ray Microanalysis
Electron-excited x-ray maps recorded with the scanning electron microscope (SEM)/electron probe x-ray microanalyzer (EPMA) are a major method of presenting compositional information. Digitally recorded maps are processed in a variety of ways to improve the visibility of features. Scaling of the recorded signal to match the 8-bit gray scale intensity range of a typical computer display system is almost always necessary. Inherent limitations of gray scale displays have led to other intensity encoding methods for x-ray maps, including clipping, histogram normalization, and pseudocolor scales. While feature visibility is improved by applying these scales, comparisons among image sets are difficult. Quantitative comparisons must be based upon standardized intensities corrected for background to produce intensity ratio (k-value) maps. We have developed a new logarithmic multiband color encoding method to view these k-value maps more effectively. Three color bands are defined, starting with a dark primary color and grading to a bright pastel: blue = trace (0.001 to 0.01); green = minor (0.01 to 0.1) and red = major (0.1 to 1.0). Within each band, the color is assigned according to a logarithmic scale which depends on intensity ratio or compositional measurements. Logarithmic multiband color encoding permits direct comparisons of maps, such as maps of different elements in the same field of view or maps of the same element in different areas, because the color scale is identical for all maps.
digital image, compositional map, feature visibility, log color scale, Logarithmic 3-Band Color scale, x-ray map, x-ray microanalysis
Elemental x-ray mapping is one of the most popular forms of data presentation in electron probe x-ray microanalysis and scanning electron microscopy (Goldstein et al., 1992). Under digital beam control, a focused electron beam is directed to a location on a specimen and held there for a specified dwell time, typically 10 ms to 20 s. The emitted characteristic x-ray intensity is measured with an energy dispersive (EDS) or wavelength dispersive (WDS) x-ray spectrometer. Since a complete view of the x-ray spectrum is provided by EDS, or since the instrument may be equipped with multiple WDS, often several elemental constituents are mapped simultaneously. The measured intensity value at each point is used to select the gray or color value for the corresponding picture element (pixel) location in the display. This value also may be stored digitally in computer memory. If the stored or displayed value is derived directly from the raw measured x-ray count, the resulting image is referred to as an "x-ray map."
Generally the analyst wishes to understand quantitatively the significance of intensity changes occurring: a) within an individual x-ray map, b) within collections of x-ray maps of a single element from different areas, or c) between two or more maps of different elements recorded simultaneously from the same area. It would be very useful if the analyst could use the intensities recorded in x-ray maps to recognize major, minor, and trace concentration levels, where these levels are defined (arbitrarily) as (Goldstein et al., 1992):
Major: > 0.1 mass fraction
Minor: 0.01 to 0.1
Trace: < 0.01
There are two distinct problems in establishing a quantitative basis for mapping: (1) the problem of correcting the raw x-ray intensities for the effects of x-ray generation, detection efficiency, and spectral background; and (2) the problem of displaying the suitably processed quantitative data in a visual fashion that is meaningful to an observer. This paper considers the importance of standardization to establish a useful level of quantitative mapping and then proposes a display scheme that permits straightforward interpretation of compositional maps over the major-minor-trace dynamic range. The display scheme does not replace direct on-line reading of the numerical pixel concentration values, but it does provide a uniform color scale that clearly shows the order of magnitude of the values.
I. The X-ray Efficiency Problem
An energy dispersive x-ray spectrometer provides the analyst with a view of the entire x-ray spectrum, so that many elements can be mapped in parallel from the same area and the x-ray maps compared. Unfortunately, the generation and detection of x-rays varies strongly with photon energy, greatly complicating any direct comparison.
The characteristic x-ray intensity, Ich, depends on the overvoltage, U, which is the ratio of the incident beam energy, E0, to the critical excitation energy, Ec, for the atomic shell of interest:
U = E0 /Ec (1)
Ich = d(U-1)n (2)
where d is a constant related to electron dose and the exponent n is in the range 1.5 - 1.7, depending on the shell (Goldstein et al., 1992). A plot of the relative efficiency of K-shell (n = 1.5) x-ray production for pure elements by 15 keV electrons is shown in Figure 1(a). The excitation efficiency changes drastically as the critical excitation energy increases. As an example, for an Al-Cu alloy and an incident beam energy of 15 keV, the aluminum K-shell is excited approximately 45 times more strongly than the copper K-shell. The actual x-ray intensity generated is further modified by the fluorescence yield, w, the fraction of ionization events that lead to photon emission. The fluorescence yield also depends strongly on atomic number, increasing with increasing atomic number. A plot of the product U x w is shown in Figure 1(b), showing complex, non-linear behavior with increasing critical excitation energy. For the L- and M-shells the situation is even more complex, and intensity comparisons between shells are not accurately described by theory.
The detection efficiency of an EDS system also depends strongly on photon energy because of absorption of x-rays in the windows, detector components, and any contamination layers, such as ice, that form on the window or the detector. The general detector efficiency is given by
where r is the density, t is the thickness and (m/r) is the mass absorption coefficient for the photon energy of interest for each material in the detector structure. The detector structure materials include the vacuum isolation window, which itself may have multiple layers, the aluminum coating for light reflection, the gold surface electrode, and the silicon "dead layer". Additionally pathological contamination can occur on the window and on the detector itself, usually in the form of ice. The final bracketed term in equation (3) considers transmission through the semiconductor detector, which becomes significant at photon energies above approximately 12 keV. An example of a detector efficiency curve for a detector with a 400 nm thick diamond window is shown in Figure 2. For the Al-Cu case, the detector efficiency at Al K is approximately 0.84, while for Cu K the efficiency is 0.99.
Figure 2. EDS detector efficiency for a diamond window (400 nm), with Al reflection coating (20 nm), Au electrode (10 nm), Si dead layer (100 nm), Si detector thickness (3 mm), and 100 nm ice contamination.
Variations in x-ray generation and detection efficiencies make it difficult to compare the relative intensities displayed in x-ray maps of different elements from the same area. These effects can be greatly diminished by calculating a "k-value" map, where the k-value is defined as (Castaing, 1951):
k = Iunk/Istd (4)
in which Istd, is the standard intensity and Iunk, is the intensity measured at each pixel in the map of the unknown. In equation (4), the intensities refer to the same x-ray peak measured under the same conditions of beam energy, known dose, angle of beam incidence, spectrometer take-off angle, and spectrometer efficiency. The intensities must also be corrected for background and interferences from other peaks. The critical importance of the k-value is that the major factors that affect relative intensity comparisons between elements cancel or are greatly diminished in the k-ratio. The detector efficiency cancels quantitatively in the intensity ratio, and the strong overvoltage effect seen in Figure 1 (b) is also substantially compensated since the same x-ray peak is involved in the specimen and standard. The standard is typically a pure element, or an equivalent pure element intensity is calculated if a compound standard is used. Moreover, Castaing (1951) noted that, to a first approximation, the k-value is proportional to the ratio of weight (mass) fractions of the constituent in the unknown and the standard:
k = Iunk/Istd ~ Cunk/Cstd (5)
For a pure element standard, Cstd = 1, and the k-value is approximately the weight fraction of the element in question. Thus, by collecting an x-ray map under known conditions of beam energy and dose, a k-value map can be calculated by dividing each pixel by a standard intensity determined under appropriate conditions.
Determining k-value maps eliminates much of the ambiguity associated with raw or autoscaled x-ray maps. In particular, k-value maps permit the analyst to directly compare x-ray maps, because the major artifacts of excitation and detection efficiency have been eliminated. What remains to be established is a sensible display scheme, a candidate for which is described below.
Background correction in mapping
As noted above, the intensities in equation (4) are characteristic peak intensities, which means the measured peak intensities must be corrected for background (Castaing, 1951). For pure elements, the peak-to-background ratio measured by EDS is in the range 25/1 to 50/1, depending on the element, atomic shell, and beam energy. The background correction for major constituents will thus be only a few percent of the peak intensity, but for minor constituents, the background contribution will be a much larger percentage, and for trace constituents, the background will be the dominant fraction of the measured intensity. Typically, EDS background corrections in single point x-ray microanalysis are performed by mathematical filtering (e.g., top-hat digital filtering) or modeling (e.g., Kramer's equation) algorithms, which usually involve the entire spectrum (Goldstein et al., 1992). In mapping, it would be ideal if the entire EDS spectrum could be saved at every picture element so that the same full spectrum procedures could be followed (Myklebust et al., 1989; Ingram et al., 1998). Mapping control software usually allows placing windows across each characteristic peak of interest and defining two or more background windows.
In the current work, the mapping collection software allowed definition of windows for several characteristic peaks of interest and five background windows. The latter were placed above and below each characteristic peak window. First-order background corrections were then made by simple linear interpolation with the background windows closest in energy to, and to either side of the peak of interest. When minor or trace peaks were to be mapped, background windows were assigned as close as possible to the characteristic peak location. A more accurate background correction procedure incorporating background modeling will be discussed in a future paper.
II. The Display Problem
The simplest representation of x-ray intensity information in a digital image is in the form of gray scale encoding. Digital displays generally use an 8-bit intensity range, giving 256 distinct gray levels ranging from full black (level 0) to full white (level 255). Because x-ray production, collection, and detection are relatively inefficient and the dwell time per pixel in mapping is often very short, the actual number of x-ray photons recorded at each pixel may fall below 255, especially if an element is only present as a minor or a trace constituent. The consequence of not filling the full dynamic range of the display can be a severe limitation on the visibility of features in a compositional map. See Figure 3a as an example where only a few features can be detected in an unmodified x-ray map with a limited dynamic range. A solution to this visibility problem is to apply intensity scaling to such a map, so that the input signal range is expanded by first subtracting any background level and then inspecting the remaining "dynamic" portion of the input signal, e.g., 0 - 38 in Figure 3a. This dynamic range is then multiplied by a factor (e.g., 255/38) so that the input (pixel) signal range matches the 0-255 (8 bit) intensity range of the display. When such a scaling operation is applied to the map of Figure 3a, the result, Figure 3b, does indeed show substantially more information. In a similar fashion, for those cases where the input signal is more abundant, such as that obtained from a major constituent or with long pixel dwell times, the actual count may exceed 8 bits, again requiring scaling to bring the input range back into the range of the display.
Such scaling is so powerful and so commonly needed in practical analysis situations that it is usually automatically applied ("autoscaling") and may actually be difficult to defeat in commercial software. Moreover, the autoscaling may be applied with no record kept of the actual scaling factor. While such an autoscaling operation for compositional mapping may be expedient, the loss of true intensity information clearly eliminates any possibility of determining a k-value map or of performing any other mathematical operations that require true counts, such as analyzing the signal-to-noise ratio (Bright et al., 1998). With arbitrarily applied scaling, there is simply no direct way to know if a certain gray level corresponds to a major, minor, or trace constituent in a single map. Similarly, the reproducibility may be poor for the intensity information in maps recorded in different laboratory sessions over an extended period of time. The standardization step to achieve k-value mapping is critical if x-ray maps are to serve more than a purely qualitative purpose.
Another gray scale enhancement technique used to advantage is clipped scaling (Pratt, 1978), where a range of input values which is less than the total input range, is scaled to the full 0 - 255 range of the display. This is useful when the data contains outliers, or a few pixels with markedly higher or lower values than the majority of pixels. These appear as white or black dots, and often do not convey much information, but they do reduce contrast in the rest of the image. To remedy this effect, discard the outlying pixels, or rescale the image as if they were not there. Practically speaking, this is done by determining the intensity range that includes all but a given number of the brightest and darkest pixels, and expanding that range to 0 255. The outlying pixels are displayed as white or black as appropriate. Figure 3c was scaled in this way by clipping 0.5%, or 328 (328 = 256 x 256 x .005) of the pixels in the image at each end of the input intensity range. The 328 darkest pixels were set to 0 or black, the 328 brightest pixels were set to 255 or white, and the remaining pixels were given the intensity range of 0 255. The image enhanced in his way shows more detail, and the any effect of clipping the outliers to white or black is not noticeable.
An even more extreme enhancement method, illustrated in Figure 3d, is histogram equalization (Pratt, 1978; Russ, 1995). With this nonlinear scaling, gray levels are assigned to input so that the histogram of gray levels (i.e., the number of pixels with a specific gray level vs. gray level) is as flat as possible, that is, each gray level is given an equal number of pixels. This operation has the effect of increasing the contrast for large features, and decreasing the contrast for small features. In this case, all the features are large, and made more visible, but it must be remembered that the relative (ratios of) gray levels no longer correspond to those in the original data due to the non-linear nature of the scaling.
Observers can discern many more colors than gray levels, so the use of color scales to enhance x-ray intensity information has become common. Again, scaling is first applied to spread the input signal range over the entire dynamic range of the color display. "Pseudocolor" scales use sequences of colors chosen to maximize the color contrast between adjacent bands (Russ, 1995). This color arrangement, illustrated in Figure 3e, provides sharp differences in the display with small changes in the input signal, thus providing contrast at any level of input intensity. Often however, the "attention value" of such a scale is not arranged in any logical fashion. "Logical" pseudocolor scales such as the thermal color scale (the sequence of black body colors) can effectively improve feature visibility in maps of signals with low inherent contrast while retaining a sense of the progression of the signal. The sequence of the black body colors of the thermal scale is perceived by most observers as having increasing attention value as the input intensity increases. Figure 3f shows the x-ray map presented with thermal scale intensity encoding. Experience has shown that the thermal color scale with prior dynamic signal scaling improves the visibility of features throughout the intensity range while providing a logical sense of the trend in the input intensities. The thermal scale can be augmented with "cold" colors at the low end of the scale to further extend the visibility, as shown in Figure 3g. The thermal scale and its variants are useful for bringing quantitative order to the display of an individual x-ray or k-value map. When maps from different elements in the same area are to be compared, the pseudocolor scales are less useful, unless a uniform intensity range is established in all images. However, a uniform display color range imposed on all images in a set will be likely to render some of the images unusable. In any image with a limited dynamic signal range, feature contrast will be diminished since it will be compressed into a small range of color.
A New Method: Logarithmic Multiband Color Encoding
Logarithmic multiband color encoding is a pseudocolor scale in which three distinct color bands are defined to correspond to major, minor, and trace constituent levels, with a lower threshold of 0.001 used for the trace band since zero must be excluded from a logarithmic scale. Table 1 gives an outline of the scheme for implementing this scale. Each band is based upon a primary color: trace (blue), minor (green), and major (red). Within each band, the intensity is encoded logarithmically, and the color runs from a pure primary color at the low end through pastel colors at the high end, as illustrated in Figure 4. The scheme uses the common display of 256 levels. The 0-255 intensity range (scaled pixel values) is split into three bands of 84 levels each, with three levels (0, 1, and 254) reserved for out-of-range values, and level 255 for exceptions, such as bad data. The individual bands are ramped in intensity in their respective colors according to the formulae in Table 1.
|Regime||Color||K Value Range||Scaled Pixel Value1||R / G / B values3|
|Excess||Yellow||> 1.00||254||255 / 255 / 0|
|Major||Red Pastel Red||0.1 1.00||170 2532||60-255 / 0-200 / 0-200|
|Minor||Green Pastel Green||0.01 0.1-||86 1692||0-200 / 60-255 / 0-200|
|Trace||Blue Pastel Blue||0.001 0.01-||2 852||0-200 / 0-200 / 60-255|
|0-Trace||Black||0 0.001-||1||0 / 0 / 0|
|Negative||Bright Blue||< 0.0||0||0 / 0 / 255|
|no data||Bright Red||N/A||255||255 / 0 / 0|
To enhance visibility and differentiate between bands for low levels (dark colors) we use pastel colors rather than the harsher primary colors. The pure primary color ramp might be, say, black to bright red, while the pastel ramp we use here is dim (but still visible) red to light pink. Other pure colors (e.g., bright red and yellow) are left for exceptions.
Note that the logarithmic 3-band color scale is the only one presented here that uses the same scale for every image, that is, the same pixel value in every image or map is always the same gray level or color. All of the other scaling methods scale each image independently so as not to lose contrast in most of the images, while the logarithmic 3-band method shows good image contrast without independent scaling. The other scaling methods also require manual adjustment of clipping limits or of color ranges to best suit the data in the image, which is time consuming and operator dependent.
Figures 5 and 6 illustrate the utility of logarithmic multiband color encoding, and show three of the other good scaling methods for comparison. Figure 5 shows nickel, aluminum and iron k-value maps, in the left, center and right columns respectively, for a Raney nickel alloy sample. The gray level images in row a) are autoscaled in the standard way, with outlying pixels eliminated. Row b) shows the thermal scale rendition of the images, which are scaled as those in row a). Row c) shows the logarithm of the maps, where the values of the original maps have been clipped to be within ranges that show good contrast in the logarithm images. Row d) is the logarithmic multiband color encoding. While the first three scaling methods do provide adequate feature contrast, only the logarithmic multiband color encoding provides both feature contrast and direct visual access to the relationship of the major, minor, and trace constituents simultaneously in all three images. Thus, the analyst can immediately see that iron is generally present at a trace level except where it is localized as a minor constituent in the narrow, angular phase that is itself embedded in the phase with major aluminum. Further, the nickel is found as a trace constituent in this major aluminum phase, except at the boundaries with the intermediate nickel phase where it is a minor constituent. In this field of view, the major aluminum phase is never found in contact with the major nickel phase but is always separated by the intermediate aluminum-nickel phase. Finally, in the major aluminum phase, the appearance of the yellow pixels denotes the situation where the k-value exceeds unity due to statistical fluctuations.
Figure 6 makes a similar comparison of visual display options for k-value maps for aluminum diffusion into brass that occurred during high temperature failure of a household electrical junction with aluminum wire (Newbury, 1984). The diffusion zone is clearly seen in all four display options of the aluminum k-value map, but the logarithmic multiband color encoding allows the analyst to immediately recognize that at the point where the aluminum enters the brass (left side), it is present over a large semicircular area at a relatively uniform level at the upper end of the minor constituent range. The aluminum concentration decreases abruptly at the radial interface of this semicircular region. From this boundary, a continuously decreasing aluminum distribution ranging through minor and trace levels extends radially outward across nearly the entire field of view. The aluminum concentration decreases radially, passing through the minor to trace level, and finally reaching an abrupt radial interface which is only visible at the corners of the map (extreme right). Note that the continuous gradient does not produce any artifact at the minor/trace transition in the color scale. Comparison of the logarithmic multiband color of the zinc and copper k-value maps reveals that the aluminum selectively displaced the zinc, reducing it to a minor constituent in the first diffusion zone, while the copper has actually increased in this region relative to its level in the unaffected brass. Some of these details can also be deduced from the other color and gray scale renderings, but only the logarithmic multiband color permits quantitative interpretation.
Extending the scale
Logarithmic multiband color encoding achieves a strong and easily recognizable color contrast between the classifications, and since no color repeats within the scale, there is never an ambiguity as to which class is depicted at any pixel. Additional bands could be added if needed to extend the range of the depiction of trace constituents below 0.001 mass fraction, in which case the secondary colors of yellow, magenta, and cyan could be used with their pastels to encode additional decades of k-value or concentration. This would be valuable for a mapping technique such as secondary ion mass spectrometry, which has a wider concentration dynamic range.
Although we have not seen this to occur in real data, the limited number of colors in our eight-bit color-mapped scheme could cause banding or artificial boundaries being seen at the boundary between two adjacent colors, for very low-noise images. This Mach Band illusion (Russ 1995, p. 228) can be avoided by having the colors or gray levels spaced closely enough, using a true RGB color scheme rather than the eight-bit color-mapped scheme. The RGB color displays now commonly available allow eight bits each for red, green and blue, so that each of the three or more color bands could have 256 levels in a true RGB color scheme. This scheme would make banding almost indiscernible even under artificial conditions most favorable to banding, and would allow more than four reserved colors for special use. We should note that our color scheme has two abrupt transitions -- from blue to green and from green to red -- at the boundaries of each decade. While these transitions help to discern one concentration regime from another, they might be misinterpreted as showing morphological features where there are none, but where the concentration gradient happens to cross a decade boundary. We note again that for the example if Fig. 6, such artifact boundaries do not appear, but more examples must be tested to look for artifacts. To avoid this problem, color schemes might be devised which do not have such transitions, but which do have distinct decade ranges and an intuitive or monotonic relationship to the underlying concentration values.
The k-value is not exactly equal to the ratio of concentrations because of these compositionally dependent effects on electron scattering and x-ray interactions: electron backscattering and stopping power (the "Z" factor); x-ray absorption ("A"); and secondary x-ray fluorescence ("F").
Cunk/Cstd = Z A F k (6)
All of these matrix effects depend upon the local compositional environment in which the x-rays are generated, so to derive actual concentrations, one must do a full quantitative analysis with complete matrix corrections at each pixel. A set of k-values is needed for all constituents (at least all major constituents), although oxygen can be calculated by the method of assumed stoichiometry if necessary. The NIST FRAME C comprehensive matrix correction procedure for EDS spectra incorporates background corrections based upon physical modeling with Kramer's equation constrained by actual background measurements (Myklebust et al., 1979). Peak overlap corrections as well as the matrix corrections described by equation (6) are performed. FRAME C mapping will be implemented in future work to establish a general compositional mapping algorithm. Logarithmic multiband color encoding will be ideal for the visual display and interpretation of such maps.
Establishing a quantitative basis for electron-excited x-ray mapping requires standardization and background correction of the measured x-ray counts at each picture element. The resulting intensity ratio or k-value maps are thus inherently corrected for the major artifacts that influence relative x-ray intensities when maps for different elements are to be compared. To overcome limitations of the visual display, logarithmic multiband color encoding of k-value maps enables sensible, quantitative visual comparisons to be made among image sets representing a single element at different locations or different times or several elements from the same field of view. Constituents present at major, minor, and trace levels can be readily distinguished and compared.
Bright, DS (1995) "MacLispix: A Special Purpose Public Domain Image Analysis Program for the Macintosh.", Microbeam Analysis 4, 151-163
Bright, DS, Newbury, DE, and Steel, EB (1998) "Visibility of objects in computer simulations of noisy micrographs", J. Micros. 189, 25-42.
Castaing, R (1951) "Application of electron probes to metallographic analysis", Ph.D. dissertation, University of Paris.
Goldstein, JI, Newbury, DE, Echlin, P, Joy, DC, Romig, AD, Jr., Lyman, CE, Fiori, C, and Lifshin, E (1992) Scanning Electron Microscopy and X-ray Microanalysis, 2nd edition (Plenum Press, New York).
Ingram, P, Kopf, DA, LeFurgey, A. (1998) "Quantitative Analytical Imaging in Biology", Scanning 20, 190-191.
Myklebust, RL, Fiori, CE, and Heinrich, KFJ (1979) FRAME C: A Compact Procedure for Quantitative Energy-Dispersive Electron Probe X-ray Analysis, National Institute of Standards and Technology Technical Note 1106, U.S. Government Printing Office, Washington, DC.
Myklebust, RL, Newbury, DE, and Marinenko, RB (1989) "Strategies for Background Subtraction in Electron Probe Microanalysis/X-ray Compositional Mapping", Anal. Chem., 61, 1612 - 1618.
Newbury, DE (1982) "What is Causing Failures of Aluminum Wire Connections in Residential Circuits?", Anal. Chem., 54 ,1059A-1064A.
Pratt, WK (1975) Digital Image Processing (John Wiley & Sons, New York)
Rasband, WS and Bright, DS (1995) "NIH Image: A Public Domain Image Processing Program for the Macintosh", Microbeam Analysis 4, 137-149.
Russ, JC (1995) The Image Processing Handbook, 2nd Ed. (CRC Press, Boca Raton).
Figure 3g was rendered with NIH Image (Rasband, 1995). NIH Image is available from http://rsb.info.nih.gov/nih-image/ .
Scaling of all images, and generation of color bands other than Fig. 3g was done using MacLispix. (Bright, 1995). MacLispix, an image processing system for the Power Macintosh* is in the public domain, and available along with the K-Ratio / 3Band log Widget in the current version, Lispix.
* Certain commercial equipment, instruments, or materials are identified in this paper in order to specify the experimental procedure adequately. Such identification is not intended to imply recommendation or endorsement by the National Institute of Standards and Technology, nor is it intended to imply that the materials or equipment identified are necessarily the best available for the purpose.