[Paper Review] Weighted Least Squares Fit of an Ellipse to Describe Complete or Spotty Diffraction Rings on a Planar 2D Detector
This paper presents a weighted least squares ellipse fitting method for X-ray powder diffraction rings on 2D detectors, using peak intensities as weights to accurately model both complete and spotty rings. The technique achieves sub-10 μm positional agreement between fitted ellipses of complete and spotty rings, enabling high-accuracy calibration of beam energy and detector geometry at the 10⁻⁵ level in ΔQ/Q.
We present a procedure for fitting an ellipse to powder diffraction patterns recorded on a planar 2D detector, which uses the peak intensities as weights. This procedure works for complete and spotty diffraction rings. We outline all the steps required: the interpolation of Cartesian pixel data into polar co-ordinates based upon an approximate ellipse centre; the identification of peak locations along each radial direction of a diffraction ring; and the weighted least squares algebraic fit of an ellipse to that diffraction ring. The performance of the procedure is assessed by characterising a complete diffraction ring from a powder standard, and a spotty ring generated from a complete ring of the standard. The fit of an ellipse to a spotty ring from an alkane complex is also shown. Agreement in the calculated parameters for the two rings is good. This procedure is implemented as part of an X-ray beam energy and 2D detector calibration routine which is currently in use at Beamline I12 (Diamond Light Source, UK).
Motivation & Objective
- To develop a robust method for fitting ellipses to both complete and spotty X-ray powder diffraction rings on planar 2D detectors.
- To improve fitting accuracy for spotty rings by weighting the fit according to peak intensity, minimizing influence from low-intensity noise.
- To enable precise calibration of X-ray beam energy, sample-to-detector distance, and detector orientation using ellipse parameters.
- To address the challenge of overlapping diffraction rings by fitting to peak locations rather than raw pixel intensities.
- To provide a geometric and analytical routine suitable for routine use in synchrotron beamline data reduction pipelines.
Proposed method
- An approximate ring centre is found using the local maxima of the self-convolution of the diffraction image, with downsampling for computational efficiency.
- Cartesian detector pixel data is interpolated into polar coordinates using bilinear interpolation, with rays evenly spaced in azimuth (e.g., R = 720 for complete rings, up to R = 3000 for spotty rings).
- Peak locations are identified by detecting local maxima in radial intensity profiles, followed by histogram analysis across all rays to isolate dominant peak positions.
- Gaussian functions are fitted to intensity profiles along each ray to precisely determine peak centres in radial and azimuthal coordinates.
- A weighted least squares algebraic fit is applied to the peak centre coordinates, with weights derived from the fitted peak intensities to emphasize high-confidence data points.
- The method avoids skewing from overlapping rings by fitting to isolated peak locations rather than raw pixel intensities across annular regions.
Experimental results
Research questions
- RQ1Can a weighted least squares ellipse fit accurately describe both complete and spotty diffraction rings on a 2D detector?
- RQ2How does intensity weighting improve the robustness and accuracy of ellipse fitting in the presence of noise or missing data?
- RQ3To what extent does the fitted ellipse preserve the geometric parameters (e.g., semi-major axis, centre) of the original ring when the ring is spotty?
- RQ4Can this method be reliably used for beam energy and detector calibration in real-world synchrotron experiments?
- RQ5How does the method compare to alternative approaches that fit ellipses directly to pixel intensities in annular regions?
Key findings
- The fitted ellipse for a complete diffraction ring (10th CeO₂ ring) and its corresponding spotty version showed semi-major axis values of 1014.05 pixels and 1014.06 pixels, respectively, indicating excellent agreement.
- The ellipse centre coordinates for the complete and spotty rings were (1434.21, 1441.93) and (1434.27, 1441.95) pixels, respectively, with positional agreement at the 10 μm level.
- Despite having only 17% of the total intensity of the complete ring, the spotty ring's fitted ellipse parameters remained highly consistent, demonstrating robustness to low signal levels.
- The method successfully fitted a single ellipse to a spotty ring from an NBD complex, with the ellipse representing the collective peak positions even when spots lacked a single Q-value.
- The calibration routine using this ellipse fitting method achieves a precision of ΔQ/Q ≈ 10⁻⁵, enabling high-accuracy 2D-to-1D data reduction.
- The approach outperforms alternative methods that fit ellipses to raw pixel intensities in annular regions, which risk skewing due to overlapping rings.
Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.