Skip to content

XipingGong/xrd_analysis

Repository files navigation

XRD Data Denoising Script

This Python script automates the processing of raw X-ray diffraction (XRD) data, including signal smoothing, baseline correction, and optional normalization. It reads a text file containing two columns: diffraction angle () and intensity, and outputs two processed datasets: one smoothed file and one baseline-corrected file. The smoothing step combines Savitzky–Golay and Gaussian filters to reduce random noise while preserving peak shapes. The baseline is corrected using the adaptive arPLS (asymmetric reweighted penalized least squares) algorithm implemented in the pybaselines package. Users can adjust parameters such as baseline smoothness (--lam), denoising strength (--sigma), and optionally normalize intensity to a 0–100 scale (--normalize). Baseline subtraction can also be skipped using the --no-baseline flag.

Example Usage

See more details in the Jupyter notebook (xrd_denoising.ipynb).

About

XRD data analysis

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •