pxrd op• Data kinds: signal × signal → table
• Call: import fullseye as fs; fs.ledger.diffraction_peaks(two_theta, intensity, min_snr=6.0, baseline_window=None, max_peaks=200, noise=None) (to call the implementation directly, import pxrd; pxrd.diffraction_peaks(two_theta, intensity, min_snr=6.0, baseline_window=None, max_peaks=200, noise=None); from the registry, opsdrive.get("diffraction_peaks"))
Picks peaks from a 1-D diffraction profile and gives their position, height, FWHM and area by a local Gaussian + linear fit.
Procedure: build the background by a rolling minimum over a window baseline_window [deg] (default = 4 % of the range) → rolling mean; among the local maxima of the background-subtracted values, those exceeding min_snr × noise become candidates (noise is taken as the maximum of the MADs of differences at spacings 1–8. You may pass a number to noise, or a per-bin array like sigma of azimuthal_integrate —— an array is needed to avoid mistaking fluctuations in bins with few pixels, such as near the centre or in the corners, for peaks). Instead of measuring each candidate's FWHM by eye, it is estimated from the half-maximum crossings, and in a window cut at the midpoints to the neighbouring candidates a Gaussian + line is fitted with scipy.optimize.least_squares. Overlapping peaks are biased because the window is cut (to separate them, use phase_fractions).
Return value (dict): two_theta, height, fwhm [deg], area, snr, fit_ok (whether the fit converged and stayed within the window), noise, baseline (same length as the grid). If there are no peaks, arrays of length 0 (empty = not a failure).
Raises ValueError: length mismatch, non-finite values, 2θ not increasing, min_snr <= 0.
• Sample-data catalog (download URLs / licences) — 2-D uses skimage.data (BSD/public domain) plus synthetic images; 3-D lists download URLs for real data sources (Stanford, PDS, …).
• Operator provenance and references — the sources of the research/methods this op family came from.
• The canonical algorithm (author, year) and its uses are named in the family usage guide above.
• poc_pxrd_phase_peel — py -3.11 examples/poc_pxrd_phase_peel.py
table as input)course_layout · course_occupancy · course_contains · world_build · world_camera · world_move · lidar_scan · rss_longitudinal_same
pxrd)cif_read · cubic_prototype · powder_reflections · scherrer_size · debye_ring_image · detector_two_theta · detector_calibrate · azimuthal_integrate
*Provenance: pxrd.py — DRIVE operator registry. This per-op note is generated by tools/opdocs.py md (do not hand-edit).*
© 2026 Kazufumi Furuse — Fullseye operator documentation. Licensed under Apache-2.0.