J. Appl. Cryst. (2001). 34, 785 # 2001 International Union of Crystallography Printed in Great Britain ± all rights reserved 785 computer program abstracts Journal of Applied Crystallography ISSN 0021-8898 xd_red-1.0: synchrotron and in-house X-ray diffraction data reduction and analysis program Ragnvald H. Mathiesen Dept. of Physics, NTNU, N-7491 Trondheim, Norway. Correspondence e-mail: ragmat@phys.ntnu.no Received 28 June 2001 Accepted 13 August 2001 1. The crystallographic problem The program xd_red addresses the problem of reduction and analysis of single-crystal diffraction data collected at synchrotron or home- laboratory setups with point detectors. It consists of several modules with a front-end that is adaptable to different diffractometer setups. 2. Method of solution The data-treatment modules available in the package provide: pro®le integration algorithms, incident-beam monitor scaling, corrections for coincidence loss, attenuators, Laue and polarization effects (different monochromator setups/incident-beam polarization states), correction for absorption, through a modi®ed version of ABSOR (Templeton & Templeton, 1973), and a polynomial scaling, from statistical analysis of reference re¯ection intensities. Geometrically dependent correc- tions are handled via program instructions during execution. In addition to established pro®le integration algorithms (Celtin & Abrahams, 1963; Lehmann & Larsen, 1974), a new method is released with xd_red. `Student-t' signi®cance tests are employed when increasing the low- and high-angle background areas until a hypothesis of the kind `no change in the background moving toward the peak maxima' is rejected. Without the need for any peak shape analysis, the method has proven robust and reliable in work with the large variation in pro®le shapes that can be encountered for different samples at a synchrotron. For all corrections applied, propagating errors are calculated and added to the counting statistical errors through a second-order Taylor expansion. Detailed information on the impact of the speci®c corrections on the total error is presented graphically and numeri- cally. xd_red may either output all integrated and corrected obser- vations, or can be used to merge a full set or speci®ed groups of equivalent data. The merging procedure is equipped with numerical and graphical tools to identify outliers. xd_red has several tools for a directional data analysis, carried out by a combination of a simple but robust pro®le analysis, and a directional statistical analysis on the merging residuals (Parkin, 2000). 3. Software environment Operating systems: Linux/Unix, X11 library support. Programming languages: ANSI-c, Fortran 77. Overlay structure: none. Dependen- cies: xd_red needs the xmgr-4.1.2 graphics plotting program (Turner, 1990), which runs on any Unix/Linux system with X11 library support and provides libacegr_np.a, which is needed to link xd_red. 4. Hardware The program system has been installed and tested successfully on several Pentium II/III PCs running Linux (RedHat6.2/RedHat7.1), on Indigo II/Octane SGIs (R4200/R10000) running Irix 5.3 to 6.5, and on several Sun systems. In general, the program system should install and run on any Unix workstation or Linux PC provided that there is at least 16 MByte of RAM available. 5. Program specification Restrictions on the complexity of calculations: the maximum number of re¯ections handled by the program is de®ned by a header-®le macro (default = 20000). Typical run times: one to a few minutes. Number of lines: about 6600 lines of source code. The program has been used to process ten synchrotron data sets, spanning a wide range of crystal qualities and pro®le shapes. The program is currently in use to process data collected with the KM6 KUMA six-circle diffractometer (Thorkildsen et al., 1999) at the Swiss±Norwegian Beamlines at ESRF. It has also been adapted to process data from a home-laboratory four-circle Eulerian diffract- ometer setup. A few source-code modi®cations are required in the raw data-read module and in ABSOR to adapt the code to a local diffractometer. 6. Documentation and availability A user manual, including documentation on algorithms and instruc- tions for installation and adaptation to other diffractometers/setups, is supplied with the program. A tutorial data set is also available. The program system and accompanying material can be downloaded as a gzipped tar archive (*.tar.gz) from http://www.phys.ntnu.no/ ~ragmat/index.html. Future updates will be posted at this location. References Cetlin, B. B. & Abrahams, S. C. (1963). Acta Cryst. 16, 943±946. Lehmann, M. & Larsen, F. K. (1974). Acta Cryst. A30, 580±585. Parkin, S. (2000). Acta Cryst. A56, 157±162. Templeton, L. K. & Templeton, D. H. (1973). Am. Crystallogr. Assoc. Prog. Abstr. Ser. 2, 1, 143. Thorkildsen, G., Mathiesen, R. H. & Larsen, H. B. (1999). J. Appl. Cryst. 32, 943±950. Turner,P. J. (1990). Software Doc. Ser. SDS3, 91±93.