Discrete Wavelet Transform for Serial X-ray Crystallography Image Segmentation
Pith reviewed 2026-05-20 06:49 UTC · model grok-4.3
The pith
Multi-level Haar wavelet transform isolates Bragg peaks from smooth background in serial X-ray crystallography images by zeroing the approximation subband.
A machine-rendered reading of the paper's core claim, the machinery that carries it, and where it could break.
Core claim
A four-level Haar discrete wavelet decomposition followed by zeroing of the LL approximation subband and reconstruction from the detail coefficients cleanly extracts sharp Bragg-peak content while suppressing smooth background scatter, yielding an F1 score of approximately 0.96 on simulated nanoBragg frames with known ground truth and preserving crystallographic quality indicators such as CC* and R_split on real ePix10kA data.
What carries the argument
The multi-level Haar wavelet decomposition and reconstruction step in which the approximation (LL) subband is zeroed at J=4 to retain only high-frequency detail coefficients that capture localized Bragg peaks.
If this is right
- Peak-finding algorithms applied to the wavelet-processed images achieve substantially higher precision and recall than peakfinder8 on simulated data.
- Crystallographic figures of merit remain consistent with the unprocessed baseline through the practical resolution limit.
- Only the identified diffraction peaks need to be transmitted, enabling lossy compression suitable for MHz-rate detectors.
- The filter operations fit within an FPGA footprint that can be integrated into upcoming detector firmware.
Where Pith is reading between the lines
- The same separation principle may extend to other sharp-feature imaging problems where background varies more slowly than the signal of interest.
- Under noise levels above 50 ADU the current pipeline's precision drops faster than peakfinder8, suggesting a hybrid approach could improve robustness.
Load-bearing premise
Background scatter is sufficiently smooth relative to the sharp Bragg peaks that zeroing the lowest-frequency approximation subband removes background without discarding useful peak information or creating artifacts.
What would settle it
If reconstructed images at J=4 on real frames with non-smooth background show measurable loss of integrated peak intensity or added artifacts when compared to ground-truth peak locations, the separation premise would be falsified.
read the original abstract
Upcoming LCLS-II/II-HE operation at repetition rates approaching 1MHz demands on-detector data reduction to manage the resulting data volumes. We present a 2D discrete wavelet transform (DWT) pre-processing algorithm that segments background scatter from crystal diffraction in serial crystallography images, enabling early data analysis and, when combined with peak finding, lossy compression by transmitting only the identified diffraction peaks. The method zeroes the approximation (LL) coefficients of a multi-level Haar wavelet decomposition and reconstructs from detail subbands only, exploiting the natural separation of smooth background and sharp Bragg peaks in the wavelet domain. Evaluated on 100 simulated nanoBragg frames with known ground truth, the pipeline achieves $F1 \approx 0.96$ at four decomposition levels ($J = 4$), substantially outperforming the established peakfinder8 algorithm ($F1 \approx 0.37$) in both precision ($P \approx 1.00$ vs.\ $0.94$) and recall ($R \approx 0.92$ vs.\ $0.24$). A comparison of 12 wavelet families confirms that Haar is optimal for Bragg-peak detection due to its minimal filter support. Downstream crystallographic analysis performed on real ePix10kA data shows that CC* and $R_\mathrm{split}$ converge at $J = 4$ and track the unprocessed baseline through the practical resolution limit. Under added noise exceeding $\sim$50 ADU, the current pipeline's precision degrades significantly more than that of the pf8 algorithm, exposing a limitation of the proposed strategy. We also demonstrate an FPGA implementation of the DWT filters on an Alveo U200 at 200MHz, with a projected resource footprint compatible with integration into the upcoming ePixUHR firmware and a path to on-detector ASIC implementation in SparkPix detector family.
Editorial analysis
A structured set of objections, weighed in public.
Referee Report
Summary. The paper proposes a 2D discrete wavelet transform (DWT) pre-processing algorithm for segmenting background scatter from crystal diffraction in serial X-ray crystallography images. It employs multi-level Haar wavelet decomposition, zeroes the LL approximation subband at decomposition level J=4, and reconstructs from detail subbands only to isolate sharp Bragg peaks from smooth background. On 100 simulated nanoBragg frames with known ground truth, the method achieves F1 ≈ 0.96, substantially outperforming peakfinder8 (F1 ≈ 0.37). On real ePix10kA data, CC* and R_split converge at J=4 and track the unprocessed baseline. The approach is also implemented on FPGA (Alveo U200 at 200 MHz) with a path to ASIC integration.
Significance. If the results hold, the method addresses a key data-volume challenge for MHz-rate serial crystallography at LCLS-II/II-HE by enabling early segmentation and lossy compression that transmits only diffraction peaks. Strengths include the explicit ground-truth evaluation on 100 simulated frames, downstream crystallographic validation via CC* and R_split on real data, the systematic comparison of 12 wavelet families identifying Haar as optimal, and the demonstrated FPGA implementation compatible with ePixUHR firmware. These elements support practical utility for on-detector processing.
minor comments (3)
- [Abstract] Abstract: the statement that precision degrades 'significantly more' than pf8 above ~50 ADU would be strengthened by reporting the exact noise levels tested and the corresponding precision values for both methods.
- [Methods] The description of the multi-level decomposition and LL-zeroing step would benefit from an explicit equation or pseudocode block showing the reconstruction formula after zeroing the approximation subband.
- [Results] Figure captions or text should clarify whether the reported F1, precision, and recall are averaged over all 100 frames or computed per-frame and then averaged.
Simulated Author's Rebuttal
We thank the referee for their positive and constructive review, which accurately summarizes our DWT-based segmentation approach and its evaluation on both simulated and real serial crystallography data. We appreciate the recognition of the method's potential utility for MHz-rate data reduction at LCLS-II/II-HE, the ground-truth F1 evaluation, wavelet family comparison, crystallographic validation via CC* and R_split, and the FPGA implementation path. No major comments were raised in the report.
Circularity Check
No significant circularity
full rationale
The paper's central pipeline applies a multi-level Haar DWT, zeros the LL subband, and reconstructs detail coefficients to segment Bragg peaks. Performance is measured via F1, precision, and recall on 100 independent nanoBragg frames with explicit ground truth, plus CC* and R_split on separate real ePix10kA data that track the unprocessed baseline. No equation reduces these figures of merit to a fitted parameter or self-citation chain; the background-smoothness premise is empirically supported by the reported metrics rather than defined into the result. The method is therefore self-contained against external benchmarks.
Axiom & Free-Parameter Ledger
free parameters (1)
- decomposition level J
axioms (1)
- domain assumption Haar wavelet provides the minimal filter support among common families and is therefore optimal for isolating sharp, localized Bragg peaks.
Reference graph
Works this paper leans on
-
[1]
R. W. Schoenlein, C. Adolphsen, R. A. Mori, A. Aquila, S. Bare, J. Bargar et al.,Lcls-ii high energy (lcls-ii-he): a transformative x-ray laser for science, tech. rep., SLAC National Accelerator Laboratory (SLAC), Menlo Park, CA (United States), 2016
work page 2016
-
[2]
H. Sandberg, P. King, D. Doering, J. Valle, M. Oriunno, L. Rota et al.,GT Readout — A development platform for 1 MHz frame-rate detectors at LCLS-II,Journal of Instrumentation20(Aug., 2025) P08019. – 17 –
work page 2025
-
[3]
P. King, D. Doering, A. Gupta, A. Habib, C. Hansson, M. Hammer et al.,Characterization of epixuhr-35khz: a 13.8 gb/s full-frame x-ray imaging readout asic for the lcls-ii upgrade, in2023 IEEE Nuclear Science Symposium, Medical Imaging Conference and International Symposium on Room-Temperature Semiconductor Detectors (NSS MIC RTSD), pp. 1–1, IEEE, 2023
work page 2023
-
[4]
L. Rota, F. Mele, A. Habib, H. Kim, P. King, B. Markovic et al.,The sparkpix-s asic for the sparsified readout of 1 mhz frame-rate x-ray cameras at lcls-ii: pixel design and simulation results,Journal of Instrumentation19(2024) C01010
work page 2024
-
[5]
B. Markovic, C. Bakalis, G. Blaj, X. Defay, D. Doering, A. Gupta et al.,Sparkpix-t: Spatial and time resolving front-end asic with mhz-rate information extraction for momentum spectroscopy at lcls-ii, in 2023 IEEE Nuclear Science Symposium, Medical Imaging Conference and International Symposium on Room-Temperature Semiconductor Detectors (NSS MIC RTSD), p...
work page 2023
-
[6]
R. Rasheedi, N. Contini, M. A. Gharib, S. Strempfer, S. Gnanasekaran, S. Abdelzaher et al.,A 28 nm multiply-accumulate asic architecture for on-chip data compression in mhz frame rate x-ray and electron pixel detectors,Journal of Instrumentation20(2025) P10027
work page 2025
- [7]
-
[8]
M. Hadian-Jazi, A. Sadri, A. Barty, O. Yefanov, M. Galchenkova, D. Oberthuer et al.,Data reduction for serial crystallography using a robust peak finder,Journal of Applied Crystallography54(2021) 1360–1378
work page 2021
-
[9]
J. Kieffer, J. Orlans, N. Coquelle, S. Debionne, S. Basu, A. Homs et al.,Application of signal separation to diffraction image compression and serial crystallography,Journal of Applied Crystallography58(2025) 138–153
work page 2025
-
[10]
Z. Liu, H. Sharma, J.-S. Park, P. Kenesei, J. Almer, R. Kettimuthu et al.,BraggNN: fast X-ray Bragg peak analysis using deep learning,IUCrJ9(2022) 104–113
work page 2022
-
[11]
A. Peck, J. J. Donatelli, A. S. Brewster and N. K. Sauter,PeakNet: a deep learning approach to Bragg peak detection in serial crystallography,Frontiers in High Performance Computing3(2025) 1545943
work page 2025
- [12]
-
[13]
S. G. Mallat,A theory for multiresolution signal decomposition: the wavelet representation,IEEE Transactions on Pattern Analysis and Machine Intelligence11(1989) 674–693
work page 1989
-
[14]
J.-L. Starck and F. Murtagh,Image restoration with noise suppression using the wavelet transform, Astronomy & Astrophysics288(1994) 343–348
work page 1994
-
[15]
psalgos: Peak finding algorithms for lcls data
SLAC National Accelerator Laboratory, “psalgos: Peak finding algorithms for lcls data.” https://lcls-psana.github.io/psalgos/, 2023
work page 2023
-
[16]
T. A. White, R. A. Kirian, A. V. Martin, A. Aquila, K. Nass, A. Barty et al.,Crystfel: a software suite for snapshot serial crystallography,Journal of Applied Crystallography45(2012) 335–341
work page 2012
-
[17]
Kabsch,Xds,Acta Crystallographica Section D66(2010) 125–132
W. Kabsch,Xds,Acta Crystallographica Section D66(2010) 125–132
work page 2010
-
[18]
H. R. Powell,The rossmann fourier autoindexing algorithm in mosflm,Acta Crystallographica Section D55(1999) 1690–1695. – 18 –
work page 1999
-
[19]
M. Nasser,Robust indexing for challenging serial x-ray diffraction patterns,Journal / arXiv / Conference (fill this in)(YEAR)
-
[20]
T. A. White,Processing serial crystallography data with crystfel: a step-by-step guide,Acta Crystallographica Section D72(2016) 1235–1242
work page 2016
-
[21]
T. A. White, A. Barty and H. N. Chapman,The determination of sample structure from serial femtosecond crystallography data,Acta Crystallographica Section D68(2012) 111–122
work page 2012
-
[22]
P. A. Karplus and K. Diederichs,Linking crystallographic model and data quality,Science336 (2012) 1030–1033
work page 2012
-
[23]
T.-W. Ke, A. S. Brewster, S. X. Yu, D. Ushizima, C. Yang and N. K. Sauter,A convolutional neural network-based screening tool for x-ray serial crystallography,Synchrotron Radiation25(2018) 655–670
work page 2018
-
[24]
I. D. Young, D. Mendez, B. K. Poon, J. P. Blaschke, F. Wittwer, M. E. Wall et al.,Chapter seven - interpreting macromolecular diffraction through simulation, inCrystallography of Protein Dynamics (N. Ando, ed.), vol. 688 ofMethods in Enzymology, pp. 195–222. Academic Press, 2023. DOI
work page 2023
-
[25]
J. M. Parkhurst, A. S. Brewster, L. Fuentes-Montero, D. G. Waterman, J. Hattne, A. W. Ashton et al., dxtbx: the diffraction experiment toolbox,Journal of Applied Crystallography47(Aug, 2014) 1459–1465
work page 2014
- [26]
discussion (0)
Sign in with ORCID, Apple, or X to comment. Anyone can read and Pith papers without signing in.