English

Discrete Wavelet Transform for Serial X-ray Crystallography Image Segmentation

Instrumentation and Detectors 2026-05-20 v1

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 F10.96F1 \approx 0.96 at four decomposition levels (J=4J = 4), substantially outperforming the established peakfinder8 algorithm (F10.37F1 \approx 0.37) in both precision (P1.00P \approx 1.00 vs.\ 0.940.94) and recall (R0.92R \approx 0.92 vs.\ 0.240.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 RsplitR_\mathrm{split} converge at J=4J = 4 and track the unprocessed baseline through the practical resolution limit. Under added noise exceeding \sim50 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.

Keywords

Cite

@article{arxiv.2605.19199,
  title  = {Discrete Wavelet Transform for Serial X-ray Crystallography Image Segmentation},
  author = {Dionisio Doering and Noemi Claret and Guilherme Paulino and Luca Scomparin and Frederic Poitevin and Eric Darve and Conny Hansson and James Russell and Abhilasha Dave and Lorenzo Rota and Antonino Miceli and Ryan Herbst and Angelo Dragone},
  journal= {arXiv preprint arXiv:2605.19199},
  year   = {2026}
}