Peak Diagnostics for 1D SAXS/WAXS Data
Abstract
Highlights CLI tool (peak_diag.py) for peak diagnostics on 1D scattering data. Supports SAXS/WAXS split using configurable q_split. Automatic peak detection using SciPy find_peaks with prominence thresholds. Optional manual peak markers (configurable q positions). Exports peak tables (CSV) and figures (PNG via Plotly + Kaleido). Optional interactive Plotly display. Inputs Whitespace .dat with columns: q, I(q), dI(q) Default --skiprows 2 (set --skiprows 0 if no header) Outputs Saved under: /peak_diag_output/ *_SAXS_peaks.csv, *_WAXS_peaks.csv *_SAXS.png, *_WAXS.png Requirements numpy, pandas, scipy, plotly kaleido (required for PNG export) How to run Example: python peak_diag.py --data_dir "/path/to/data" --file "Sample_1.dat" Notes Peak widths are reported as FWHM in d-space (FWHM_d) from scipy.signal.peak_widths. Please validate peak detection thresholds (saxs_prominence_frac, waxs_prominence_frac) for your dataset.
Fields of Study & Subjects
X-ray Diffraction in Crystallography
Enzyme Structure and Function
Computational Physics and Python Applications
Publication details
- Journal / source
- Zenodo (CERN European Organization for Nuclear Research)
- Publication date
- 8 February 2026