Hostname: page-component-76fb5796d-qxdb6 Total loading time: 0 Render date: 2024-04-25T15:19:17.359Z Has data issue: false hasContentIssue false

PyFAI: a Python library for high performance azimuthal integration on GPU

Published online by Cambridge University Press:  14 November 2013

J. Kieffer*
Affiliation:
European Synchrotron Radiation Facility, 6 Rue Jules Horowitz, Grenoble 38000, France
J.P. Wright*
Affiliation:
European Synchrotron Radiation Facility, 6 Rue Jules Horowitz, Grenoble 38000, France

Abstract

PyFAI is an open-source Python library for Fast Azimuthal Integration which provides 1D- and 2D-azimuthal regrouping with a clean programming interface and tools for calibration. The library is suitable for interactive use in Python. In optimising the speed of the algorithms there has been no compromise on the accuracy compared to reference software. Fast integrations are obtained by the combination of an algorithm ensuring that each pixel from the detector provides a direct contribution to the final diffraction pattern and an OpenCL implementation that can use graphics cards for acceleration. This contribution describes how the algorithms were modified to work better in parallel.

Type
Technical Articles
Copyright
Copyright © International Centre for Diffraction Data 2013 

Access options

Get access to the full version of this content by using one of the access options below. (Log in options will check for institutional or personal access. Content may require purchase if you do not have access.)

References

Behnel, S., Bradshaw, R., Citro, C., Dalcin, L., Seljebotn, D. S. and Smith, K. (2011). “Cython: The Best of Both Worlds,” Comput. Sci. Eng. 13, 3139. [DOI: 10.1109/MCSE.2010.118].Google Scholar
Bösecke, P. (2007). “Reduction of two-dimensional small- and wide-angle X-ray scattering data,” J. Appl. Crystallogr. 40, 423427. [DOI: 10.1107/S0021889807001100].CrossRefGoogle Scholar
Cervellino, A., Giannini, C., Guagliardi, A. and Ladisa, M.Folding a two-dimensional powder diffraction image into a one-dimensional scan: a new procedure,” J. Appl. Crystallogr. (2006). 39, 745748. [DOI: 10.1107/S0021889806026690].Google Scholar
De Nolf, W. and Janssens, K. (2010). “Micro X-ray diffraction and fluorescence tomography for the study of multilayered automotive paints,” Surf. Interface Anal. 42, 411418. [DOI: 10.1002/sia.3125].Google Scholar
Hammersley, A. P., Svensson, S. O., Hanfland, M., Fitch, A. N. and Hausermann, D. (1996). “Two-dimensional detector software: From real detector to idealised image or two-theta scan,” High Press. Res. 14, 235248. [DOI: 10.1080/08957959608201408].Google Scholar
Hinrichsen, B., Dinnebier, R. E., Rajiv, P., Hanfland, M., Grzechnik, A. and Jansen, M. (2006). “Advances in data reduction of high-pressure x-ray powder diffraction data from two-dimensional detectors: a case study of Schafarzikite (FeSb2O4),” J. Phys.: Condens. Matter 18, S1021-S1037 [DOI: 10.1088/0953-8984/18/25/S09].Google Scholar
Homs, A., Claustre, L., Kirov, A., Papillon, E. and Petitdemange, S. (2011). “LImA: a Generic library for high throughput image acquisition,” ECALEPCS proceedings 676-679.Google Scholar
Hunter, J. D. (2007). “Matplotlib: A 2D graphics environment,” Comput. Sci. Eng. 9, 9095. [DOI: 10.1109/MCSE.2007.55].Google Scholar
Incardona, M-F., Bourenkov, G. P., Levik, K., Pieritz, R. A., Popov, A. N. and Svensson, O. (2009). “EDNA: a framework for plugin-based applications applied to X-ray experiment online data analysis,” J. Synchrotron Radiat. 16, 872879. [DOI: 10.1107/S0909049509036681].Google Scholar
Kahan, W. (1965). “Pracniques: Further remarks on reducing truncation errors,” Commun. ACM 8, 40. [DOI:10.1145/363707.363723].Google Scholar
Kieffer, J. and Karkoulis, D. (2013). “PyFAI, a versatile library for azimuthal regrouping,” J. Phys.: Conf. Ser. 425, 202012. [DOI: 10.1088/1742-6596/425/20/202012].Google Scholar
Kloeckner, A., Pinto, N., Lee, Y., Catanzaro, B., Ivanov, P. and Fasih, A. (2012). “PyCUDA and PyOpenCL: A scripting-based approach to GPU run-time code generation,” Parallel Comput. 38, 157174. [DOI: 10.1016/j.parco.2011.09.001].Google Scholar
Knudsen, E. B., Sorensen, H. O., Wright, J. P., Goret, G. and Kieffer, J. (2013). “FabIO: easy access to 2D X-ray detector images in Python,” J. Appl. Crystallogr. 46, 537539. [DOI: 10.1107/S0021889813000150].CrossRefGoogle Scholar
Pérez, F. and Granger, B. E. (2007). “IPython: a system for interactive scientific computing,” Comput. Sci. Eng. 9, 2129. [DOI: 10.1109/MCSE.2007.53].Google Scholar
Rodriguez-Navarro, A. B. (2006). “XRD2DScan: new software for polycrystalline materials characterization using two-dimensional X-ray diffraction,” J. Appl. Crystallogr. 39, 905909. [DOI: 10.1107/S0021889806042485].Google Scholar
Solé, V. A., Papillon, E., Cotte, M., Walter, Ph. and Susini, J. (2007). “A multiplatform code for the analysis of energy-dispersive X-ray fluorescence spectra,” Spectrochim. Acta, Part B 62, 6368. [DOI: 10.1016/j.sab.2006.12.002].Google Scholar
Stone, J. E., Gohara, D. and Shi, G. C. (2010). “OpenCL: A Parallel Programming Standard for Heterogeneous Computing Systems,” Comput. Sci. Eng. 12, 6673. [DOI: 10.1109/MCSE.2010.69].CrossRefGoogle ScholarPubMed