XRD Data Analysis Platform

ChemFitX provides an online XRD data analysis workflow for researchers working with powder X-ray diffraction patterns. The platform combines data import, smoothing, baseline correction, peak detection, single-peak profile fitting, Debye-Scherrer crystallite-size analysis, Williamson-Hall size-and-strain analysis, interactive visualization and export tools in one browser-based workspace.

Upload a two-column XRD pattern, process the diffraction profile, detect or insert peaks, fit selected reflections with Gaussian, Lorentzian or pseudo-Voigt models, and use the fitted FWHM values for line-broadening calculations. The platform also supports optional instrumental-broadening correction and an idealized geometric area estimate derived from crystallite size and material density.

The uploaded XRD file is read and processed locally in your web browser by this application. The scientific data file is not uploaded to ChemFitX servers during the analysis.

What the XRD Data Analysis Platform Can Do

  • Import XRD data from TXT, CSV, DAT and XY files containing 2θ and intensity values.
  • Display original, processed and baseline data in an interactive XRD pattern chart.
  • Apply moving-average, Savitzky-Golay, Gaussian, Lowess/Loess, Fourier, wavelet, exponential, median, kernel or Whittaker smoothing.
  • Apply polynomial, ALS, ModPoly, IModPoly, rubberband, rolling-ball, spline, wavelet, peak-fitting, linear-interpolation, straight-line or manual baseline correction.
  • Set the X-ray wavelength, Scherrer shape factor K and optional instrumental FWHM.
  • Choose Gaussian or Lorentzian instrumental-broadening correction.
  • Detect candidate diffraction peaks using an adjustable intensity threshold and minimum 2θ separation.
  • Insert additional peaks manually when automatic detection misses a reflection of interest.
  • Include or exclude individual peaks from later line-broadening calculations.
  • Fit peaks with pseudo-Voigt, Gaussian or Lorentzian profiles and a local linear background.
  • Report fitted peak center, FWHM, fit R² and pseudo-Voigt mixing parameter η when applicable.
  • Fit a selected peak or batch-fit all included peaks.
  • Calculate conventional per-peak Scherrer crystallite sizes from fitted peak widths.
  • Generate a through-origin graphical Scherrer fit of 1/β versus cos θ.
  • Perform Williamson-Hall Uniform Deformation Model analysis for crystallite size and signed microstrain.
  • Display and export original data, processed data, peak-fit results, Scherrer data and Williamson-Hall data.
  • Estimate an idealized geometric area from crystallite size and density while explicitly distinguishing it from BET surface area.
  • Pan, box-zoom, zoom in/out, reset the view and use undo/redo navigation on the XRD chart.

Supported XRD Data Format

Input files

The platform accepts .txt, .csv, .dat and .xy files. The parser reads numerical data as two-column pairs, with the first numeric value interpreted as 2θ in degrees and the second as intensity. Comment lines beginning with # or // are skipped.

Minimum data requirement

A valid pattern must contain enough numeric points for analysis. The current parser requires more than ten usable 2θ-intensity pairs before the dataset is accepted.

Recommended preparation

For the most reliable peak positions and line-width analysis, use the original exported diffraction pattern whenever possible. Avoid unnecessary resampling or manual modification of the 2θ axis before analysis, and confirm that the entered X-ray wavelength matches the measurement used to collect the pattern.

X-Ray Wavelength, Shape Factor and Instrument Broadening

X-ray wavelength

The wavelength field controls the wavelength used in Scherrer and Williamson-Hall calculations. The default value is 1.54056 Å, corresponding to Cu Kα₁. Replace it when your diffraction experiment used a different wavelength.

Scherrer shape factor K

The default shape factor is K = 0.90. Because K depends on crystallite shape, reflection and the definition used for peak breadth, select a value appropriate to your analysis rather than treating 0.90 as universal.

Instrument FWHM correction

If a reference-standard instrumental FWHM is known, enter it in degrees. For the Gaussian correction model, ChemFitX applies βsample = √(βobs² − βinst²). For the Lorentzian model, it applies βsample = βobs − βinst. If the instrument contribution is unknown, keep Instrument FWHM at 0 so the fitted peak width is used without correction.

The instrumental-broadening field is a single constant FWHM value. Real diffractometer broadening can vary with angle, so users requiring a full instrumental-resolution function should use a method that explicitly models that dependence.

Smoothing XRD Data

Smoothing can reduce random intensity fluctuations before baseline correction and peak detection. ChemFitX provides several smoothing methods so users can choose a filter appropriate to the pattern and noise level.

  • Moving Average
  • Savitzky-Golay
  • Gaussian
  • Lowess/Loess
  • Fourier Transform
  • Wavelet
  • Exponential
  • Median
  • Kernel
  • Whittaker

Use the minimum smoothing strength needed to improve the signal. Excessive smoothing can alter weak reflections, merge neighboring peaks or change the apparent profile width, which is especially important when crystallite size will later be calculated from fitted FWHM values.

Baseline Correction

Background subtraction helps separate diffraction peaks from slowly varying intensity contributions. The platform includes several automatic and manual baseline options:

  • Polynomial
  • ALS (Asymmetric Least Squares)
  • ModPoly
  • IModPoly
  • Rubberband
  • Rolling Ball
  • Spline
  • Wavelet
  • Peak Fitting
  • Linear Interpolation
  • Straight Line Transform
  • Manual baseline anchors

When Manual baseline is selected, activate Drawing Mode and place baseline anchor points directly on the XRD pattern. The hand/pan tool can be used to reposition a zoomed graph while defining the baseline. Always inspect the corrected profile before peak detection because an inappropriate baseline can change apparent peak height and width.

XRD Peak Detection and Manual Peak Insertion

Automatic peak detection

Peak detection uses the processed XRD profile and an adjustable threshold together with a minimum peak-separation setting. The threshold controls which local maxima are considered candidates, while the separation setting helps avoid treating nearby points within the same feature as independent peaks.

Manual peak insertion

If a scientifically relevant reflection is missed by the automatic routine, use Insert Peak to add it manually at the selected position. Manual and automatically detected peaks can then be reviewed together.

Peak inclusion control

Individual peaks can be excluded from later calculations. This is useful when a reflection is strongly overlapped, distorted, poorly fitted or otherwise unsuitable for crystallite-size and strain analysis.

Peak Profile Fitting

ChemFitX uses fitted peak-profile widths rather than approximate detection widths for Scherrer and Williamson-Hall calculations. Each selected diffraction peak can be fitted with one of three models: pseudo-Voigt, Gaussian or Lorentzian.

Pseudo-Voigt model

The pseudo-Voigt profile is represented as a weighted combination of Gaussian and Lorentzian components. The fitted η value ranges from 0 for a purely Gaussian contribution to 1 for a purely Lorentzian contribution within the implemented mixture model.

Local linear background

A local linear background is fitted together with the peak profile. The fitting region uses edge points to initialize the local background, and neighboring detected peaks define midpoint isolation boundaries so that one fit is less likely to absorb an adjacent reflection.

Fit window

The fit-span control scales the initial peak-width estimate. The platform automatically limits the fitting interval near neighboring detected peaks and maintains a minimum local region around the target peak when the available isolation window is too narrow.

Reported fit quantities

  • Peak center in 2θ
  • FWHM in degrees 2θ
  • R² of the local profile fit
  • Pseudo-Voigt η when pseudo-Voigt fitting is selected

Inspect the fitted curve, local background, FWHM and R² before using the peak in line-broadening analysis. A numerically high R² does not by itself prove that the selected profile model is physically unique or that an overlapped peak has been completely resolved.

Scherrer Crystallite-Size Analysis

The Scherrer module uses the fitted peak-profile FWHM values after optional instrumental correction. For each included fitted peak, the platform calculates a conventional crystallite-size estimate using the Scherrer relation D = Kλ/(β cos θ), where β is the corrected FWHM in radians.

Per-peak crystallite size

ChemFitX reports a conventional mean crystallite size and standard deviation across the valid included peaks. These values describe coherent diffracting-domain size estimated from line broadening; they are not necessarily equal to particle size measured by microscopy.

Graphical Scherrer fit

The platform also plots 1/β versus cos θ. Because the Scherrer relation predicts 1/β = [D/(Kλ)] cos θ, the displayed graphical fit is constrained through the origin. The slope is converted to a graphical crystallite-size estimate.

Why fitted FWHM matters

Only peaks with successful profile fits and positive corrected FWHM values are included. This prevents rough detection-width estimates from being used as if they were final line-profile widths.

Williamson-Hall Size and Strain Analysis

The Williamson-Hall module implements the Uniform Deformation Model using β cos θ = Kλ/D + 4ε sin θ. ChemFitX plots β cos θ against 4 sin θ using the instrument-corrected fitted FWHM values.

The intercept is used to calculate crystallite size and the signed slope is reported as microstrain ε. The platform also reports the linear-fit R². A positive intercept is required for a physically usable size result in this implementation.

Minimum requirement

At least two included peaks with valid profile fits are required to run the Williamson-Hall regression. In practice, a larger set of well-resolved reflections spanning a useful angular range generally provides a more informative regression than the mathematical minimum.

Interpreting the signed strain

The reported strain is the signed slope of the implemented UDM regression expressed as a percentage. Its physical interpretation assumes that the line-broadening model is appropriate and that the included reflections represent a consistent sample state.

Idealized Geometric Area Estimate

The Geometric Area tab provides an optional estimate based on a crystallite-size result and user-entered material density. It uses S = 6000/(ρD), where S is in m²/g, ρ is in g/cm³ and D is in nm.

This calculation assumes idealized nonporous spherical particles whose characteristic particle dimension is represented by the selected crystallite size. It is not a gas-adsorption measurement and is not equivalent to BET surface area. Real powders can differ strongly because of aggregation, porosity, particle shape, inaccessible surfaces and the difference between coherent-domain size and particle size.

Interactive XRD Pattern Visualization

The main chart displays the original pattern, processed pattern and calculated baseline. Use the toolbar to inspect the XRD profile without leaving the analysis page.

  • Cursor readout for 2θ and intensity
  • Hand/pan mode
  • Box zoom
  • Zoom in and zoom out
  • Undo and redo view changes
  • Reset to the full pattern view

The chart-data export allows the plotted data to be saved for further plotting or record keeping.

How to Use the ChemFitX XRD Data Analysis Tool

  1. Upload a TXT, CSV, DAT or XY file containing 2θ and intensity values.
  2. Confirm the X-ray wavelength and Scherrer shape factor. Enter instrumental FWHM only when a justified reference-standard value is available.
  3. Inspect the original XRD pattern before processing.
  4. Apply light smoothing only if needed to suppress noise.
  5. Apply a suitable baseline correction and visually inspect the corrected pattern.
  6. Set the peak-detection threshold and minimum peak separation, then detect peaks.
  7. Insert any missed scientifically relevant peaks manually and exclude unsuitable reflections.
  8. Open Peak Fitting, select Gaussian, Lorentzian or pseudo-Voigt, and fit the relevant peaks.
  9. Inspect each fit, especially the center, FWHM, R² and local-background behavior.
  10. Run Scherrer analysis for per-peak and graphical crystallite-size estimates.
  11. Run Williamson-Hall analysis when multiple reliable fitted reflections are available and size/strain separation is appropriate.
  12. If desired, calculate the idealized geometric area using a crystallite-size result and material density.
  13. Export processed data, chart data, fitted peak results, Scherrer data or Williamson-Hall data for documentation.

Interpreting the Main XRD Results

Peak position

The fitted peak center gives the local 2θ position of the selected reflection within the chosen profile model and fitting window. Peak shifts should be interpreted only after checking instrument calibration, sample displacement and possible overlap.

FWHM

The fitted FWHM represents the width of the selected peak profile in degrees 2θ. This value is converted to radians for line-broadening calculations and can optionally be corrected for the user-entered instrumental contribution.

Peak-fit R²

R² summarizes how closely the chosen local profile model follows the data in the fitting interval. It should be inspected together with the plotted residual behavior, peak overlap and physical plausibility rather than used as the only acceptance criterion.

Scherrer D

Scherrer D is an estimate of coherent diffracting-domain size. It should not automatically be described as nanoparticle diameter unless independent evidence supports that equivalence.

Williamson-Hall D and ε

The Williamson-Hall intercept provides a size estimate while the slope provides the UDM microstrain estimate in the implemented linear model. The result is sensitive to fitted peak widths, instrumental correction, peak selection and deviations from the model assumptions.

Geometric area

The optional area value is a morphology-based estimate from density and crystallite size, not experimentally measured accessible surface area.

Exporting XRD Analysis Results

Processed data

The processed-data export provides the 2θ values together with processed intensity and baseline information so the post-processing result can be archived or replotted.

Peak-fit results

Peak-fit export records the fitted quantities used for later calculations, including profile-model information, center and fitted FWHM for the analyzed peaks.

Scherrer and Williamson-Hall data

The dedicated export controls save the numerical points and regression results used by the crystallite-size and size/strain analysis modules. Exporting the fitted-peak results together with the line-broadening output helps preserve the analysis trail.

Data Privacy and Browser-Based Processing

The XRD file is read and analyzed locally in the browser by this application and is not uploaded to ChemFitX servers during analysis. Processing, peak fitting and the displayed calculations are performed within the active browser session.

Users should still follow their laboratory or institution policies for unpublished diffraction data, shared computers, browser downloads and exported result files.

Scientific Scope and Limitations

  • This platform analyzes two-column powder XRD patterns; it does not perform phase identification, hkl indexing, unit-cell refinement or Rietveld refinement in this module.
  • Peak detection identifies candidate maxima; scientific peak selection still requires user review.
  • Smoothing and baseline correction can alter peak appearance when applied too strongly. Inspect the processed pattern before fitting.
  • Single-peak Gaussian, Lorentzian and pseudo-Voigt fits may be inadequate for strongly overlapped, asymmetric or multiplet reflections.
  • The current instrumental-broadening correction uses one user-entered FWHM value and a Gaussian or Lorentzian correction rule; it is not a full angle-dependent instrument-resolution model.
  • Scherrer crystallite size is a coherent-domain size estimate and should not automatically be equated with particle size.
  • Williamson-Hall UDM assumes a simplified separation of size and strain broadening. An apparently linear result does not guarantee that all underlying broadening mechanisms satisfy the model.
  • At least two peaks are mathematically required for the implemented Williamson-Hall fit, but robust scientific interpretation normally benefits from more high-quality reflections over a useful angular range.
  • Incorrect wavelength, K value, instrumental FWHM or peak selection directly affects calculated size and strain.
  • The idealized geometric area is not BET surface area and should not be reported as an adsorption-derived surface-area measurement.
  • All calculated results should be interpreted together with experimental conditions, instrument calibration, sample preparation and complementary characterization.

Frequently Asked Questions

What files can I upload for XRD analysis?

The current platform accepts TXT, CSV, DAT and XY files containing numerical 2θ and intensity pairs.

Can ChemFitX smooth noisy XRD data?

Yes. The platform includes moving-average, Savitzky-Golay, Gaussian, Lowess/Loess, Fourier, wavelet, exponential, median, kernel and Whittaker smoothing options.

Can I correct the XRD background?

Yes. Several automatic baseline methods are available, and you can also place manual baseline anchor points directly on the pattern.

Does the platform fit peak profiles?

Yes. Detected or manually inserted peaks can be fitted with pseudo-Voigt, Gaussian or Lorentzian profiles together with a local linear background.

Which peak width is used for crystallite-size calculations?

Scherrer and Williamson-Hall calculations use the FWHM obtained from the peak-profile fitting step, after optional instrumental-broadening correction.

Can I correct for instrumental broadening?

Yes. Enter a reference instrumental FWHM and select a Gaussian or Lorentzian correction model. Keep the value at zero when a justified instrumental contribution is not available.

Does ChemFitX calculate crystallite size?

Yes. It provides conventional per-peak Scherrer sizes, a through-origin graphical Scherrer estimate and Williamson-Hall size when the required fitted peaks are available.

Does Williamson-Hall analysis also calculate strain?

Yes. The implemented Uniform Deformation Model reports the signed regression slope as microstrain and converts it to percent.

Is crystallite size the same as particle size?

Not necessarily. XRD line broadening estimates coherent diffracting-domain size. A particle can contain one or several coherent domains.

Does the Geometric Area tab calculate BET surface area?

No. It uses an idealized density-and-size relation and is explicitly not a BET adsorption measurement.

Can I manually add a missed diffraction peak?

Yes. The Insert Peak tool lets you add a peak that was not selected by the automatic detector.

Can I exclude a poor peak from Scherrer or Williamson-Hall analysis?

Yes. Individual peaks can be included or excluded before the line-broadening calculations.

Are my XRD files uploaded to ChemFitX?

For this application, the file is read and processed locally in the browser and is not uploaded to ChemFitX servers by the analysis code.

Can I export the results?

Yes. The platform includes export controls for chart data, processed data, peak fits, Scherrer data and Williamson-Hall data.

Scientific References

  • Cullity, B. D.; Stock, S. R. Elements of X-Ray Diffraction, 3rd ed. Prentice Hall, 2001.
  • Scherrer, P. Bestimmung der Größe und der inneren Struktur von Kolloidteilchen mittels Röntgenstrahlen. Nachrichten von der Gesellschaft der Wissenschaften zu Göttingen, Mathematisch-Physikalische Klasse, 1918, 98-100.
  • Williamson, G. K.; Hall, W. H. X-ray line broadening from filed aluminium and wolfram. Acta Metallurgica, 1953, 1, 22-31.

 

 

Scroll to Top