ABSTRACT:

USING NIH-IMAGE TO CONVERT POWDER X-RAY DIFFRACTION CAMERA FILMS TO DIGITAL DIFFRACTOGRAMS

BARWOOD,Henry L., Indiana Geological Survey, 611 N. Walnut Grove,

Bloomington,IN 47405

hbarwood@indiana.edu

X-ray powder diffraction (XRD) cameras of Debye-Scherrer configuration are rarely used today, except for analysis and identification of very small samples. The data that can be collected from such film-based diffraction techniques is considerable; however, time consumed in reading and interpreting the films is a limiting factor. Low cost optical image scanners and scanning services are now available that can be used to convert XRD films into digital image files with 400 dpi or better resolution. The freeware program NIH-Image can then be used to convert the XRD film images into a digital diffractogram. The diffractogram can then be exported from NIH-Image as either a TIFF image or as an ASCII file of X,Y datapoints giving angular position (X) and intensity (Y). The output data or image may be manipulated using spreadsheet, word processing, curve fitting or digitization software to prepare it for import into other XRD analysis programs. Accuracy of the scanned and digitized films is equal to, or better than, that obtained using visual measurement with a vernier scale and light box. Even older films of unknown precision can generally be used for search/match operations to identify unknowns. With careful film preparation, the precision of the technique is sufficient that the data can be used with indexing and cell refinement programs.

 

DATA COLLECTION:

The Debye-Scherrer (DS) powder camera is considered the least accurate of the powder X-ray diffraction (XRD) techniques with overall accuracy two to three times worse than comparable diffractometer data. Consequently, most powder diffraction work is performed using a diffractometer or a focusing camera such as the Guinier configuration (Jenkins, 1989). Sources of inaccuracy with the DS configuration include: specimen absorption, specimen size, centering errors, rotation eccentricity, beam divergence, film shrinkage and errors in reading the film. Many of the errors are controllable with careful specimen preparation and centering, proper choice of X-ray wavelength and use of an internal standard such as silicon to compensate for film shrinkage. Inaccuracy can also come from visual reading of the diffraction lines on the film. While the eye is capable of detecting quite faint lines, it is not very good at determining the central point of a dense, diffuse or asymmetrical diffraction line. This leads to variability in the measurement of the lines on a powder diffraction film.

The advantages of the DS XRD technique include:

1. The ability to use very small amounts of sample

2. Reduced sample orientation effects

3. With proper wavelength choice, low sample absorption

 

The disadvantages include:

1. Poor accuracy of data

2. Inability to digitally process the data

 

Probably the most critical step in reducing inaccuracies is the sample preparation phase. The following technique gives excellent results:

1. Place 1-10 milligrams of finely ground sample on a clean glass slide and add 0.5 to 3 milligrams of silicon powder.

2. Using the tip of dissecting needle place a comparable volume of rubber cement with the sample.

3. Invert a glass slide and mix the sample and binder.

4. Place one drop of solvent (hexanes work well) on the sample and homogenize sample and binder by grinding between the two slides until the solvent begins to evaporate.

5. When the solvent has evaporated the sample and binder will "roll" into a sphere, or spheres.

6. Select a sphere that is between 0.1 and 0.5 millimeter in diameter and perfectly round (0.1 mm is best, but will require extensive exposure time for some samples).

7. Using a glass fiber (0.1 mm or less diameter) in a pin mount, touch the glass fiber to the rubber cement.

8. Touch the rubber cement coated glass fiber to the sample sphere.

9. Mount the pin with the fiber and sample in the camera and carefully center the sample in the beam.


Digitization of DS XRD films allows the comparison of data collected from a powder camera with data collected from a diffractometer. Silicon (a=5.43088 Angstrom degrees) internal standard allows the exact peak positions to be determined and any positional corrections made. Examples of diffractometer traces compared to a digitized film images are found in

Fig.1-7:

 

PREPARING AN IMAGE OF THE DEBYE-SCHERRER XRD FILM:

Essentially any high quality flat bed scanner equipped with a transparency adapter can be used to scan the XRD film (Fig. 8). Adjustment of the grayscale range or post image adjustment of the density/gamma histogram can be used to enhance the image (Palmer, 1997). Care must be taken not to saturate the densest lines as this will result in clipped peaks when the diffractogram is generated. A standard XRD film reader will measure to 0.1 mm. For comparison, the resolution of scanned images is:

dpi           pixels/millimeter     resolution (millimeters)

100                  3.94                       0.254

200                  7.87                       0.127

400                15.75                       0.064

600                23.62                       0.042

1000              39.37                       0.025

In practical terms, any optical resolution of 400 dpi or better has greater accuracy than a film reader.

The type of image file will depend on the image processing software that will be used to generate the diffractogram. For NIH-Image, an uncompressed TIF format should be used for transfer between a PC and a Mac; however, if a Mac compatible scanner is used, other formats can be selected. The file size will increase dramatically depending on the resolution selected and can be 10-20 M at 1000 dpi. For ease of data transfer, the image is usually cropped to a manageable region-of-interest with a file size of 500-1000 K.

 

XRD FILM TO DIFFRACTOGRAM CONVERSION:

After an image is acquired and the image has been processed to obtain a work image file, a line intensity profile must be generated. there are several freeware programs that can do this with the best being NIH-Image for Mac's (http://rsb.info.nih.gov/nih-image/) and IT for PC's(http://ddsdx.uthscsa.edu/dig/itdesc.html). There is a PC version of NIH-Image, but the beta version is not fully functional at this time. The diffractograms illustrated in this paper were generated using NIH-Image because it can produce a line profile of a selected region-of-interest (ROI) that averages columns of pixels in the Y direction. This function is very useful for reducing noise and bringing out faint diffraction lines.

Before the image can be converted into a diffractogram, the center of the diffraction arcs must be determined and start and end boundaries marked. The zero point of the diffraction arcs is chosen in a way similar to manual reading of a film. The cursor is used to read the pixel position and intensity as a dark (strong) diffraction line is approached. The point where the pixel density increases over the background is considered to be the edge of the diffraction arc. The inner and outer edges of the left and right hand arc segments are averaged to obtain the center of the diffraction line. The left-hand center is subtracted from the right-hand center, divided by two and added to the left hand value. This value is the center of the diffraction arc. A second line at a different diffraction spacing is also checked to confirm the center position (and a third, if there is a discrepancy). An example of the centering accuracy is illustrated in Figure 9.

Peak Center distance left Center distance right

1            135 pixels              135 pixels

2            157 pixels              156 pixels

3            192 pixels              192 pixels

From the zero point at the center of the arc, a starting and ending boundary must be determined. To eliminate the portion of the image that contains the collimator hole and low angle scatter a starting point of 5-6 degrees two theta is normally chosen, but this can be lowered to capture low-angle reflections. As an example, a starting point 6 degrees from the zero point would be measured 94.49 pixels (6 mm) from the starting point (using a 400 dpi scan). Since a fractional pixel is an impossibility, the starting point would be 94 pixels from the zero point. A vertical line of 3-5 pixels is made along the Y-axis at this point.

Using the same technique an ending point is chosen. For example at 100 degrees a Y-axis mark would be made at 1575 pixels from the zero point (1574.80 pixels rounded to 1575). The vertical Y-axis marks will serve as a reference point for digitization.

After the start/end points are chosen the X-axis must be checked for linearity and an ROI marked. The diffraction arcs should be centered along a horizontal X-axis. If they are not, most image processing programs allow rotation of the image to bring the arc center into registration with the X-axis. The centerpoint of the arcs can be determined by using a vertical line or an overlay grid to find the tangent to the arc. At the point where the tangent touches, an ROI can be marked off +/- 5 pixels from the center. A spread of 10 pixels is optimal for line profile generation, although greater or fewer pixels may be used to compensate for arc curvature. NIH-Image has a rectangle tool that can then be used to mark the ROI.

Once the end points and ROI have been marked and selected, the next operation is to subtract the background. With NIH-Image, there is a background subtraction routine: Process -- Subtract Background -- 1D Horizontal that flattens the background without significantly altering the size and shape of the diffraction peaks. The last step is to use the Plot Profile Macro to generate a diffractogram.

The diffractogram can be exported from NIH-Image in two forms. The image of the diffractogram may be exported as a .TIF file, or the (X,Y) datapoints of the diffractogram may be exported as a .DAT file. To export the .TIF image use Save As and select TIFF as the option. To save the (X,Y) file, use export and select the x,y option. The .TIF image will be compressed to fit the Mac screen while the (X,Y) file will consist of all the datapoints. The compression of the .TIF file may be a problem for older Macs with a small monitor. The (X,Y) files will have to be converted before digitization to increase the Y values so that they resemble a diffractogram (the output values would be a maximum 255 scale, and typically are in the range 0-50)

DIGITIZATION:

Manipulation of either the .TIF or the .DAT files will be necessary before conversion to a digital format. For the .TIF file this will consist of opening the file in an image processing program and removing unwanted elements of the file (Fig. 10). For the (X,Y) file the data can be imported into a curve-fitting/curve-plotting routine and the X and Y data manipulated to convert it so that end values are equivalent to degrees two-theta and the Y values are multiplied to make them simulate a diffraction pattern (usually 10-100X). For the (X,Y) data it may not be possible to completely compensate for irregular X-axis step intervals; however, some diffraction programs will accept non-regular steps.

The easiest way to digitize the diffractogram is by using a program like Un-Scan-It®. The .TIF image is automatically digitized by the program and scale and step size can be manipulated (Fig. 11). The output file is an ASCII (X,Y) file that can be used in most diffraction programs. For programs that require headers and use only a list of intensities and step size, the output file can be converted easily using Excel® or any similar spreadsheet program. The converted output can be brought up in any word processing program and file headers modified to be compatible with the diffraction program (Fig. 12).

MANIPULATION OF THE DIGITIZED DATA:

Programs for generation of d/I and search/match files that have proven compatible with this type of data file include JADE® by MDI, Macdiff (for Macs) and Winfit (for PCs). Many other programs exist both freeware, shareware and commercial versions (Gorter and Smith, 1995).

REFERENCES:

Gorter, S. and D.K. Smith. 1995. World Directory of Powder diffraction Programs Release 2.2 (1995). Privately printed. Available from the authors.

Jenkins, R. 1989. Instrumentation. In: Modern Powder Diffraction. D.L.Bish and J.E.Post, Eds. MSA Reviews in Mineralogy. Vol. 20. pp. 19-45.

Palmer, D.C. 1997. Digital analysis of X-ray films. Min. Mag. 61:453-461



BACK