pith. sign in

arxiv: 2605.19199 · v1 · pith:GXYQHLCCnew · submitted 2026-05-18 · ⚛️ physics.ins-det

Discrete Wavelet Transform for Serial X-ray Crystallography Image Segmentation

Pith reviewed 2026-05-20 06:49 UTC · model grok-4.3

classification ⚛️ physics.ins-det
keywords discrete wavelet transformserial crystallographyimage segmentationBragg peak detectionHaar waveletdata reductionbackground subtractionX-ray diffraction imaging
0
0 comments X

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.

The paper develops a 2D discrete wavelet transform pipeline to segment crystal diffraction signals from background scatter in high-repetition-rate serial crystallography data. It decomposes each image with Haar filters across multiple levels and reconstructs using only the detail subbands after setting the lowest-frequency approximation coefficients to zero. This exploits the separation between localized sharp peaks and extended smooth scatter in the wavelet domain. On 100 simulated frames the method reaches an F1 score near 0.96 at four levels, exceeding the performance of the established peakfinder8 algorithm in both precision and recall. Downstream metrics on real detector data remain comparable to unprocessed images through the practical resolution limit.

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

These are editorial extensions of the paper, not claims the author makes directly.

  • 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.

Desk editor's note, referee report, simulated authors' rebuttal, and a circularity audit. Tearing a paper down is the easy half of reading it; the pith above is the substance, this is the friction.

Referee Report

0 major / 3 minor

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)
  1. [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.
  2. [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.
  3. [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

0 responses · 0 unresolved

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

0 steps flagged

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

1 free parameters · 1 axioms · 0 invented entities

The central claim rests on standard wavelet theory plus one empirical parameter choice and one domain assumption about signal smoothness; no new physical entities are introduced.

free parameters (1)
  • decomposition level J
    Selected as the operating point that maximizes F1 on the 100 simulated frames; value 4 is reported as optimal.
axioms (1)
  • domain assumption Haar wavelet provides the minimal filter support among common families and is therefore optimal for isolating sharp, localized Bragg peaks.
    Invoked after the 12-family comparison; the paper states that minimal support best matches the spatial scale of diffraction peaks.

pith-pipeline@v0.9.0 · 5920 in / 1457 out tokens · 34345 ms · 2026-05-20T06:49:54.614323+00:00 · methodology

discussion (0)

Sign in with ORCID, Apple, or X to comment. Anyone can read and Pith papers without signing in.

Reference graph

Works this paper leans on

26 extracted references · 26 canonical work pages

  1. [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

  2. [2]

    Sandberg, P

    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 –

  3. [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

  4. [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

  5. [5]

    Markovic, C

    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...

  6. [6]

    Rasheedi, N

    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

  7. [7]

    Barty, R

    A. Barty, R. A. Kirian, F. R. N. C. Maia, M. F. Hantke, C. H. Yoon, T. A. White et al.,Cheetah: software for high-throughput reduction and analysis of serial femtosecond x-ray diffraction data, Journal of Applied Crystallography47(2014) 1118–1131

  8. [8]

    Hadian-Jazi, A

    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

  9. [9]

    Kieffer, J

    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

  10. [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

  11. [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

  12. [12]

    Mendez, J

    D. Mendez, J. M. Holton, A. Y. Lyubimov, S. Hollatz, I. I. Mathews, A. Cichosz et al.,Deep residual networks for crystallography trained on synthetic data,Acta Crystallographica Section D80(Jan,

  13. [13]

    S. G. Mallat,A theory for multiresolution signal decomposition: the wavelet representation,IEEE Transactions on Pattern Analysis and Machine Intelligence11(1989) 674–693

  14. [14]

    Starck and F

    J.-L. Starck and F. Murtagh,Image restoration with noise suppression using the wavelet transform, Astronomy & Astrophysics288(1994) 343–348

  15. [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

  16. [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

  17. [17]

    Kabsch,Xds,Acta Crystallographica Section D66(2010) 125–132

    W. Kabsch,Xds,Acta Crystallographica Section D66(2010) 125–132

  18. [18]

    H. R. Powell,The rossmann fourier autoindexing algorithm in mosflm,Acta Crystallographica Section D55(1999) 1690–1695. – 18 –

  19. [19]

    Nasser,Robust indexing for challenging serial x-ray diffraction patterns,Journal / arXiv / Conference (fill this in)(YEAR)

    M. Nasser,Robust indexing for challenging serial x-ray diffraction patterns,Journal / arXiv / Conference (fill this in)(YEAR)

  20. [20]

    T. A. White,Processing serial crystallography data with crystfel: a step-by-step guide,Acta Crystallographica Section D72(2016) 1235–1242

  21. [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

  22. [22]

    P. A. Karplus and K. Diederichs,Linking crystallographic model and data quality,Science336 (2012) 1030–1033

  23. [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

  24. [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

  25. [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

  26. [26]

    Herbst, R

    R. Herbst, R. Coffee, N. Fronk, K. Kim, K. Kim, L. Ruckman et al.,Implementation of a framework for deploying ai inference engines in fpgas, inSmoky Mountains Computational Sciences and Engineering Conference, pp. 120–134, Springer, 2022. – 19 –