Scientific Tools

Energy-dispersive X-ray Diffraction (EDXRD) is a powerful technique used for the study of materials. EDXRD is especially useful for studying dynamic material processes in-situ. I used EDXRD extensively during my graduate studies at Brookhaven National Laboratory. Below are some tools that were written in order to help with the processing and analysis of EDXRD data.

CNF Converter

Data files from the NSLS X17B1 beamline prior to year 2013 are encoded in a proprietary format from Canberra. These files have a .CNF extension and are un-openable by any common software. A script was adapted in python to extract the data from the CNF files and convert them to a single column .CSV file.

Download CNF Converter

Peak Fitting: Fityk

The program, fityk, was used extensively for the analysis of EDXRD data. It has the capability to view the files in their native *.xy format and transform the dataset from channel number to energy and to d-spacing. It is suggested to do all peak fitting in channel number or energy space. The process of peak fitting involves the following:

  • Loading of data and conversion to energy space
  • Identification of the peaks present in the spectra
  • Selection of the part of the spectrum to be fit (Note: whole pattern fitting is possible but it is time consuming and often not necessary.)
  • Removal of background
  • Initial marking of peak locations (Note: It is important to give the computer a good first estimate as to where the peaks are.)
  • Check the residual difference plot for quality of fit and repeat
  • Export peak parameters

The fityk software can be downloaded at http:/fityk.nieto.pl. There is an older free version and an up-to-date version which one must pay for. The most up-to-date software is recommended.

Batch Peak Fitting Script

For large data sets it is possible to automate the peak fitting process. For this purpose, a script was written in the Lua language and can be run in the fityk GUI and in the fityk command line program (cfityk.exe).

Download Batch Peak Fitting Script

Lattice Parameter Calculator

The lattice parameter calculator was developed in MATLAB using the fsolve function. It is able to compute the lattice parameters and angles for cubic, tetragonal, orthorhombic, rhombohedral, monoclinic, triclinic, and hexagonal structures. The calculation is a non-linear least squares method employing the Levenberg-Marquardt algorithm. Calculations can be computed in a high throughput fashion by preparing a file of the following format:

  hkl  hkl  hkl  hkl  hkl  hkl
  eVA  eVA  eVA  eVA  eVA  eVA
1 data data data data data data
2 data data data data data data
...................................
n data data data data data data

where the first row is the miller index of the reflection, the second row represents the unit of the data, each subsequent row is a collection of peak centers for a given spectra n.

Download Lattice Parameter Calculator

Time Stamp Extractor

For time-resolved studies it is important to know the exact times at which each spectra was collected. When setting up an experiment, the operator choses a time interval and total number for spectra collected. However, the actual collection time is less than each time interval. Additionally, there is an additional time for computer processing and motor movement before the next spectra is collected. Therefor it is an unreasonable assumption that if you have 200 spectra collected at 30 seconds each that the total experiment time is 30×200. In fact, it is more than this. The time stamp extractor was written to extract the exact time at which each spectra was collected. This is very useful when recording of another time-dependent variable and calibration between the two is necessary; for example, when measuring temperature, current, and/or voltage. The time stamp extractor requires the full xy diffraction file provided at the beginning of the data set. The script runs in MATLAB and exports the time stamps in an excel file.

Download Time Stamp Extractor

Scroll to Top