dataesr/scientific-paragraphs-categorization huggingface dataset:
The pyFAI package has been designed to reduce X-ray diffraction images into powder diffraction curves to be further processed by scientists. This contribution describes how to convert an image into a radial profile using the Numpy package, how the process was accelerated using Cython. The algorithm was parallelised, needing a complete re-design to benefit from massively parallel devices like graphical processing units or accelerators like the Intel Xeon Phi using the PyOpenCL library.
INTRODUCTION The Python programming language is widely adopted in the scientific community and especially in crystallography, this is why a convenient azimuthal integration routine, one of the basic algorithms in crystallography, was requested by the synchrotron community. The advent of pixel-detectors with their very high speed (up to 3000 frames per second) imposed strong constraints in speed that most available programs (  [FIT2D] ,  [SPD] ,. ), written in Fortran or C, could not meet. The  [pyFAI]  project started in 2011 and aims at providing a convenient Pythonic interface for azimuthal integration, so that any diffractionist can adapt it to the type of experiment he is interested in. This contribution describes how one of the most fundamental algorithms used in crystallography has been implemented in Python and how it was accelerated to match the readout speeds of today's fastest detectors.
AZIMUTHAL INTEGRATION While pyFAI addresses the needs of both mono-and bidimensional integration in different spaces (real or reciprocal), this contribution focuses on the algorithmic and implementation part of the method. The coordinates in which pyFAI operates can be one of the following: • r = x 2 + y 2 arXiv:1412. 6367v1 [astro-ph. IM] 19 Dec 2014 • χ = tan -1 (y/x) • 2θ = tan -1 (r/d) • q = 4πsin(2θ /2)/λ The pyFAI library was designed to feature a Pythonic interface and work together with  [FabIO]  for image reading (or  [H5Py]  for HDF5 files). The following snippet of code explains the basic usage of the library: import fabio, pyFAI data = fabio. open("Pilatus1M. edf"). data ai = pyFAI. load("Pilatus1M. poni") tth, I = ai. integrate1d(data, 1000, unit="2th_deg",\ method="numpy") Output variables' space (r, q or 2θ ) and units can be chosen with the unit keyword.
OpenMP support in Cython To accelerate further the code we decided to parallelise the  [Cython]  code using  [OpenMP]. While the implementation was fast, the results we obtained were wrong (by a few percent) due to write conflicts, not protected by atomic_add operations. Apparently the use of atomic operation is still not yet possible in  [Cython]  (summer 2014). Multi-threaded histogramming was made possible by having several threads running simultaneously, each working on a separate histogram, which implies the allocation of much more memory for output arrays. The gains in performance obtained by this method (see table 1) were minor, especially when using more than 2 threads, illustrating the limits of the paralellisation scheme. The only way to go faster is to start thinking in parallel from the beginning and re-design the algorithm so that it works natively with lots of threads.
PIXEL SPLITTING Pixel splitting is what occurs when a pixel of the detector spans over more than one of the bins of the histogram. When this happens, the contribution to each of the bins involved is assumed to be proportional to the area of the pixel segment that falls into that bin. The goal behind the addition of extra complexity to the code is that the results obtained this way ought to be less noisy than the case where pixel splitting is ignored. This becomes more apparent when the number of pixels falling into each bin is small like for example for 2D integration. Figure  3  presents the results of such an integration, performed using histograms on the top image, i. e. without pixel splitting. Some high frequency patterns are visible near the beam center on the left-hand side of this figure.
MORE PARALLELISATION For faster execution, one solution is to use many-core systems, such as Graphical Processing Units (GPUs) or accelerators, like the Xeon-Phi from Intel. Those chips allocate more silicon for computing (arithmetic logic units -ALUs) and less to branch prediction, memory pre-fetching and cache coherency, in comparison with CPUs. Our duties as programmers is to write the code that maximises the usage of ALUs without relying on pre-fetcher and other commodities offered by normal processors. Typical GPUs have tens (to hundreds) of compute units able to schedule and run dozens of threads simultaneously (in a Single Instruction Multiple Data way). OpenCL allows the execution of the same code on processors, graphics cards or accelerators (see table 2) but the memory access pattern is important in order to make the best use of them.
Parallel azimuthal integration Azimuthal integration, like histogramming, is a scatter operation, and hence requires the support of atomic operations (in our case with double precision floats). As Cython does not (yet) support atomic operations, enabling OpenMP parallelisation results in a module that, while being functional, gives the wrong results (we measured 2% errors on 8 cores) To overcome this limitation, instead of looking at where input pixels go to in the output curve, we focus on where the output bin comes from in the input image. This transformation is called a "scatter to gather" transformation and requires atomic operations. In our case, it was implemented as a single threaded  [Cython]  module. The correspondence between pixels and output bins can be stored in a look-up  (ratio of areas) making the integration look like a simple (if large and sparse) matrix vector product.
BENCHMARKS We present the results from several benchmark tests done using the different algorithm options available in PyFAI. All benchmarks were performed using the same bounding box pixel splitting scheme and the resulting integrated profiles are of equivalent quality. Execution speed has been measured using the timeit module, averaged over 10 iterations (best of 3). The processing is performed on 1, 2, 4, 6, 12 and 16 Mpixel images, with pixel ranges of either 16 or 32 bits (int or uint), taken from actual diffraction experiments, which are part of the pyFAI test suite. One small note on the benchmarks that follow. The casting for the 12 Mpixel image was done by one thread on the CPU. That is why the processing time of the 16 Mpixel image appears to be shorter than that of the 12 Mpixel one.
OpenMP vs OpenCL The gain in portability obtained by the use of OpenCL does not mean a sacrifice in performance when the code is run on a  CPU, as we can see in figure  5 : the OpenCL implementation outperforms the OpenMP one, in all the different CPUs it was tested on. This could be linked to the better use of SIMD vector units by OpenCL. The dual Xeon E5520 (a computer from 2009), running at only 2. 2 GHz shows pretty good performances compared to more recent computers when using OpenMP: it was the only one with activated hyper-threading. The choice of the OpenCL driver on CPU affects the performance of PyFAI (figure  6 ): on the Intel Xeon E5-1607 (Ivy bridge core), the Intel driver clearly outperforms the AMD driver. This can be attributed to new SIMD instructions (AVX), supported by the Intel driver but not by the AMD one.
Kernel timings As stated previously, the benchmark tests were performed using the timeit module from Python on the last line of the code snippet described in section 3. One may wonder what is the actual time spent in which part of the OpenCL code and how much is the Python overhead. This analysis has been done using the profiling tools of OpenCL which measured the execution of every action put in queue. To be able to perform the azimuthal integration, the image is first transfered to the device (GPU), then casted from integer to float. All pixel-wise correction (dark current subtraction, flat field normalization, solid-angle and polarization factor correction) are applied in a single pass over each pixel of the image. Output arrays are initialised to zero, by a separate kernel (memset) before the actual sparse-matrix-dense-vector multiplication.
Finally the three output buffers are retrieved from the device. Table  3  shows the execution time measured on the GeForce Titan (controlled by a pair of Xeon 5520). The first entry in the table is the total execution time at the Python level, as measured by timeit: 2 ms, while the second is the sum of all of the execution times measured by the OpenCL profiler: 1. 4 ms, which highlights how little the Python overhead can be (<40%). The most time-consuming part of the whole process is by far the memory transfer of the image (H->D meaning Host to Device, 0. 8ms). All vendors are currently working on an unified memory space, which will be available for OpenCL 2. 0, which will reduce the time spent in transfers and simplify programming. Finally the azimuthal integration takes up only 0. 4 ms, that is, 20% of the total run time.
PROJECT DESCRIPTION PyFAI is open-source software released under the GPL license available on GitHub (https://github. com/kif/pyFAI). PyFAI depends on Python v2. 6 or v2. 7 and  [NumPy]. In order to be able to read images from various X-ray detectors, pyFAI relies on the  [FabIO]  library. Optional  [OpenCL]  acceleration is provided by  [PyOpenCL]. Graphical applications for calibration and integration rely on  [matplotlib] ,  [PyQt]  and SciPy  [SciPy]  for image processing. A C compiler is needed to build the  [Cython]  code from the related sources. PyFAI is packaged and available in common Linux distributions like Debian and Ubuntu but it is also tested and functional under Windows and MacOSX.
CONCLUSIONS This contribution shows how one of the most central algorithm in crystallography has been implemented in Python, optimised in Cython and ported to many-core architectures using PyOpenCL. A 15x speed-up factor has been obtained by switching from binary code to the OpenCL code running on GPUs (400x vs NumPy). Some of the best performances were obtained on a mid-range consumer grade Nvidia GeForce 750Ti thanks to the new Maxwell generation chip running as fast as high-end graphics based on the Kepler architecture (like the Titan), and literally outperforming both AMD GPUs and the Xeon-Phi accelerator card. Programming CPUs in parallel is as easy as programming GPUs via the use of PyOpenCL interfaced with Python.
ACKNOWLEDGEMENTS Claudio Ferrero  (head of the Data Analysis Unit) and  Andy Götz  (head of the  Software Group ) are acknowledged for supporting the development of pyFAI. The porting of pyFAI to OpenCL would have not been possible without the financial support of LinkSCEEM-2 ( RI-261600 ), granting the contracts of Dimitris Karkoulis who started the GPU porting,  Zubair Nawaz  who ported image distortion and one of the authors ( G. Ashiotis ) who is working on CSR, pixel splitting and other algorithms. Finally, the authors would like to acknowledge their colleagues involved in the development of the library, especially  Aurore Deschildre  and  Frédéric Picca. The authors would like to thank all X-ray beam-lines promoting pyFAI and providing resources to further develop it:  ESRF BM01 ,  ID02 ,  ID11 ,  ID13 ,  ID15 ,  ID16 ,  ID21 ,  ID23 ,  BM26 ,  ID29 ,  BM29  and  ID30 ; and also in other institutes like Soleil,  Petra3 ,  CEA ,  APS  who provide feedback, bug reports and patches to the library.
Here we apply SHM to study particle production in Pb-Pb collisions at √ s NN = 2. 76 TeV (LHC2760), a new energy domain an order of magnitude higher than previously explored in Au-Au collisions at √ s NN = 200 GeV (RHIC200). We begin by demonstrating that the chemical nonequilibrium SHM variant describes the experimental LHC-ion data with high accuracy. This finding disagrees with claims that SHM alone does not describe the particle multiplicity data obtained in relativistic heavy-ion collisions at LHC  [5, 6]. In the chemical nonequilibrium SHM approach, we allow quark pair yield parameter γ q for light quarks, a feature we presented as a necessary model refinement for the past 15 yr  [7] [8] [9]. We demonstrate the general model validity in our numerical approach by showing correspondence of chemical equilibrium SHM results with other fits to the LHC data.
Furthermore, as we discuss in Sec. III C, we obtain hadronization universality across a wide collision energy range: Comparing RHIC62 with LHC2760 we show that the fireball source of particles is nearly identical and consistent with chemically equilibrated QGP fireball. Given this result, the chemical nonequilibrium SHM variant is validated across a wide energy range, while the chemical equilibrium SHM  [13] [14] [15] [16] [17] [18]  is invalidated by the LHC data and this conclusion can be extended across different reaction energies because there is no reason why a model should work only sporadically. π + π -K + K -p + p - Ξ -Ξ + Ω -Ω + K*/K φ/K Λ/π γ q γ s T [MeV] V [fm 3 ] χ 2 / π + π -K + K -p + p - Ξ -Ξ + Ω -Ω + K*/K φ/K Λ/π We have now shown that the chemical nonequilibrium is the necessary ingredient in the SHM approach to the process of hadronization of a QGP fireball.
From now on, we omit the bra-kets indicating grand canonical average of the corresponding summed particle yield. The isospin fugacity factor λ I 3 is constrained by imposing the charge per baryon ratio present in the initial nuclear-matter state at the initial instant of the collision. We achieve this objective by fitting these conservation laws along with particle yield data, using the following form: s -s s + s = 0. 00 ± 0. 01, (2) Q -Q B -B = 0. 38 ± 0. 02. (3) We believe that implementing conservation laws as data points with errors accounts for the possibility that particles escape asymmetrically from the acceptance domain. In the LHC2760 energy regime, there is near symmetry of particle and antiparticle sector; thus, the chemical potentials are hard to quantify. Therefore, the two constraints Eqs.
Our analysis relies on hadronization being fast, not allowing a significant modification of the available quark abundances. These quark abundances at LHC in a wide range of centralities and in most central RHIC collisions are near to the QGP chemical equilibrium abundance. For the quark yields to remain largely unchanged during hadronization and after, it is necessary that the transformation from QGP to hadrons (hadronization) occurs suddenly and at a relatively low temperature, near the expected chemical freeze-out point, where particle abundances stop evolving. The two-pion correlation experimental results favor sudden hadronization, which has been seen in the results for a long time  [21]. The sudden hadronization model was required for consistency with these results  [22, 23]. It is associated with chemical nonequilibrium SHM analysis of the data  [7, 8].
A. What is new at LHC The primary difference between RHIC62 and LHC2760 data is a 4-times-larger transverse volume dV /dy at hadronization, as seen in Fig. 9 (a). The increase of volume at LHC compared to RHIC, rather than a change of hadronization temperature, shows a common source of hadrons, a signature of QGP formation. The increased volume is in qualitative agreement with the two-pion correlation studies  [60]. Given the nearly constant entropy density at hadronization, the growth of volume drives the total entropy yield, which is up to 3. 2 times greater at LHC2760 than at RHIC62. Other differences of LHC2760 compared to RHIC62 are (i) an order-of-magnitude-smaller baryochemical potential μ B 1. 5 MeV (see Fig. 10 ); (ii) phase-space occupancy γ q constant as a function of centrality; (iii) earlier saturation of γ s as a function of centrality, and thus γ s /γ q ratio following the behavior of γ s.
Such behavior was indicated given the RHIC results showing a steady rise; see Fig. 15 (a) for RHIC62. Instead, we find a perfectly equilibrated QGP fireball: The observed value of s/S 0. 03 is expected for a chemically equilibrated QGP fireball near hadronization condition. This equilibrium QGP saturated value s/S = 0. 03 is observed for many centralities. Because to obtain our prediction we used s/S = 0. 037, both the value of γ s and yields of kaons are equally ∼20% suppressed compared to expectation  [41] , as are other strange particles. How this is possible will be one of the riddles that future data and theoretical modeling will need to address. For us, this strangeness suppression compared to expectation is the most remarkable difference from RHIC data that we have found in this first LHC result analysis.
E. Conclusions and outlook We have shown that the nonequilibrium SHM model in the LHC reaction energy range is yielding a very attractive data fit. We have argued that nonequilibrium SHM is today favored by the lattice results, because we must have T < T c , and the lattice is moving lower in T c ; see T c = 147 ± 5 MeV  [27]. Only the nonequilibrium SHM range T < 145 MeV remains convincingly compatible, considering the dynamics of the fireball expansion T ≡ T c -T is of magnitude where we would like it for supercooling. Moreover, the chemical nonequilibrium SHM is favored by offering simplicity, as it needs no afterburners. Occam's razor argument (lex parsimoniae) can be used to conclude that nonequilibrium SHM is a valid precise description of multihadron production. The good fit within the realm of nonequilibrium SHM of all observed particles allows us to predict with some confidence the yields of yet-unmeasured hadrons within the chemical nonequilibrium SHM scheme, which are seen in Table  II.
50 ± 0. 05 GeV/fm 3 , as is seen in Fig. 13. In fact, the present-day data favor a systematic decrease of hadronization pressure P from peripheral towards central collisions as compared to earlier RHIC62  [12] , RHIC200  [10]  and our preliminary LHC analysis with limited data set  [35]. It is possible that the more dynamical expansion of the LHC2760 fireball and deeper supercooling of the fireball are the cause. We checked that assuming universal hadronization pressure, we could obtain a very good fit to particle data for all centrality LHC2760 data bins. This means that if and when more hadron yield data are available, the decrease in bulk properties with centrality seen in Fig. 13  could easily disappear. Therefore, the presence of a constant critical hadronization pressure  [40]  could extend from SPS to LHC.
We are investigating this hypothesis, as well as the possibility that another quantity governs universality of hadronization. We hope to return to the matter as soon as we have understood better the final-state contributions to hadron yields from charmed hadron decays. We have shown that the precise hadron yields measured by the ALICE collaboration at LHC2760 have offered a vast new opportunity to explore the properties of the QGP fireball and to understand the dynamics of its evolution and matter production. We are able to quantify the key physical properties at this early stage. With more data becoming available, we expect a significant refinement and improved understanding of both the QGP fireball and mechanisms of matter creation out of the deconfined QGP phase.
ACKNOWLEDGMENTS This work has been supported by a grant from the  US Department of Energy , Grant No. DE-FG02-04ER41318 ;  Laboratoire de Physique Théorique et Hautes Energies, LPTHE, at University  Paris 6 is supported by  CNRS  as  Unité Mixte de Recherche ,  UMR7589. J. R. thanks  CERN-PH-TH  for the hospitality while most of this work was carried out. J. R. thanks members of ALICE collaboration, in particular  Karel Safarik ,  Boris Hippolyte , and  Federico Antinori , for many conversations and clarifications.
Acknowledgements-We acknowledge stimulating discussions with  Harold Hwang ,  Dirk van der Marel ,  Kazuamasa Miyake  and  Yasutami Tanaka  and are grateful to  Young Jun Chang  for providing us a number of Nbdoped STO samples. This work is supported by  Agence Nationale de la Recherche  as part of QUANTHERM and SUPERFIELD projects. X. L. acknowledges a scholarship granted by  China Scholarship Council.
In our calculations Na 3 Au lies slightly above the convex hull in agreement with the experimental observation of a reversible transformation to Na 2 Au upon release of pressure  [4]. In order to further evaluate the stability of the new phases found with the MHM we calculated their phonon spectra. In fact, the existence of imaginary frequencies in the spectra indicates dynamical instability, i. e. that the structure is not a minimum and that the correct structure contains a larger number of atoms in the unit-cell. Note that this is not a proof that the structure is the absolute minimum, but only indicates that it is a valid (meta-)stable phase. Our phonon calculations were performed with density-functional perturbation theory as implemented in the abinit  [33]  DFT software package with a norm-conserving set of pseudopotentials as found in the abinit web page.
Acknowledgments MALM and SB acknowledge financial support from the  French ANR  (project no. ANR-12-BS04-0001-02 ). Computational resources were provided by  GENCI  (project no. x2012096017 ) and Stampede at the  Texas Supercomputer Center, USA. TFTC acknowledges financial support from the  French ANR  (project no. ANR-11-NANO-0025 ).
ACKNOWLEDGEMENTS We express our gratitude to our colleagues in the CERN accelerator departments for the excellent performance of the LHC. We thank the technical and administrative staff at the LHCb institutes. We acknowledge support from  CERN  and from the national agencies:  CAPES ,  CNPq ,  FAPERJ  and  FINEP (Brazil) ;  NSFC (China) ;  CNRS/IN2P3  and  Region Auvergne (France) ;  BMBF ,  DFG ,  HGF  and  MPG (Germany) ;  SFI (Ireland) ;  INFN (Italy) ;  FOM  and  NWO  (The Netherlands); SCSR (Poland);  ANCS/IFA (Romania) ;  MinES, Rosatom ,  RFBR  and  NRC "Kurchatov Institute" (Russia) ;  MinECo, XuntaGal and GENCAT (Spain) ;  SNSF  and  SER (Switzerland) ;  NAS Ukraine (Ukraine) ;  STFC  ( United Kingdom );  NSF (USA). We also acknowledge the support received from the  ERC  under  FP7.
Image processing and velocity field measurement The images were processed with ImageJ [Rasband W. S. 2007. ImageJ (National Institutes of Health, Bethesda), available at http://rsb. info. nih. gov/ij/] using a watershed plugin (available at http://bigwww. epfl. ch/sage/soft/watershed/index. html) to extract the contours when needed. The velocity field in the monolayer was mapped by PIV analysis using the MatPIV  [58]  software package version 1. 4 for MatLab (MathWorks Inc. ) [Matpiv is a GNU public license software (www. math. uio. no/ jks/matpiv/)] as previously described in  [19]. The data in Figure  1  and Figure  2  were obtained from squares of 1 mm|1 mm in the center of bands of cells of 1:3 mm|2:7 mm.
12  (Blackburn 1995). Standard recommended event selection criteria 14 were employed using XSELECT v2. 4b. The net XIS and HXD good times were 62. 9 and 66. 5 ks respectively. XIS (sensitive below 10 keV) counts were integrated within a circular aperture of radius 3. ′ 4, and background counts extracted from source-free regions. ESO 565-G019 is by far the brightest source within the XIS field-of-view (fov). A polygonal background aperture was constructed to sample large parts of the background over the remaining fov, free from contamination by other possible faint sources. The latest version of the calibration database v20120902 was used for generating response matrices and auxiliary response files. For HXD, data from the PIN diodes below ∼60 keV were extracted using the FTOOL hxdpinxbpi, which returns the deadtime-corrected source spectrum and a background spectrum based upon the 'tuned' background model provided by the Suzaku team.