Experimental Inelastic Neutron Scattering - Caltech Center for

209
Brent Fultz, Tim Kelley, JaeDong Lee, Michael Aivazis, Olivier Delaire, Doug Abernathy ... Experimental Inelastic Neutron Scattering With Reference Manual for DANSE Distributed Data Analysis for Neutron Scattering Experiments March 25, 2004 Springer-Verlag Berlin Heidelberg NewYork London Paris Tokyo Hong Kong Barcelona Budapest

Transcript of Experimental Inelastic Neutron Scattering - Caltech Center for

Page 1: Experimental Inelastic Neutron Scattering - Caltech Center for

Brent Fultz, Tim Kelley, JaeDong Lee, Michael

Aivazis, Olivier Delaire, Doug Abernathy ...

Experimental Inelastic NeutronScattering

With Reference Manual for DANSE –

Distributed Data Analysis for Neutron

Scattering Experiments

March 25, 2004

Springer-Verlag

Berlin Heidelberg NewYorkLondon Paris TokyoHongKong BarcelonaBudapest

Page 2: Experimental Inelastic Neutron Scattering - Caltech Center for

This book is dedicated to the new user – may you benefit from our mistakes.

Page 3: Experimental Inelastic Neutron Scattering - Caltech Center for
Page 4: Experimental Inelastic Neutron Scattering - Caltech Center for

Preface

A bright future lies ahead for neutron scattering studies of materials, molecules,and condensed matter. The international science community and national sci-ence agencies are now building new instruments and new sources of neutronsthat will overcome many of the historical limitations of neutron scattering re-search. Higher intensities and instrument sensitivities are major and obviousimprovements. Experimental inelastic neutron scattering has been partic-ularly constrained by low countrates, forcing experimental compromises inenergy resolution and intensity, for example. The ARCS inelastic neutronspectrometer with its location at the high-power target station of the Spalla-tion Neutron Source and with its high detection efficiency, for example, willprovide unprecedented experimental productivity, overcoming many of therestrictions caused by the low countrates that have accompanied inelasticneutron scattering experiments to date.

Advanced software is necessary to use this advanced hardware for so-phisticated experiments. The goal of this book is to describe the underlyingscattering physics and dynamic processes in materials, and show how modernsoftware can be used to elevate the level of science done with inelastic neutronspectrometers. We authors hope that this book will help overcome a majorchallenge that lies immediately ahead – the development of a broad usercommunity who can creatively use these new capabilities for inelastic neu-tron scattering research. A large body of specialized knowledge is requiredto design modern experiments for inelastic instruments such as time-of-flightchopper spectrometers. This body of knowledge will only grow as new capabil-ities are available. Unfortunately, the underlying concepts are distributed overmany disciplines. For example, the books on the theory of thermal neutronscattering by S. W. Lovesey and G. L. Squires are superb. Similarly, excellentsolid-state physics texts by J. M. Ziman, C. Kittel, and N. W. Ashcroft andN. D. Mermin are available for understanding the principles of excitations incondensed matter (although another intellectual level is required before en-tering the realm of modern research). Unfortunately, the concepts from thesetwo fields are not connected well by existing texts. A more serious frustra-tion for an experimentalist is that there is no coherent source of explanationsfor the computing methods used for the analysis of inelastic neutron scat-tering data. A vast chasm separates The C Programming Language by B.W. Kernigan and D. M. Ritchie from The Theory of Neutron Scattering from

Page 5: Experimental Inelastic Neutron Scattering - Caltech Center for

VIII Preface

Condensed Matter by S. W. Lovesey. The intellectual challenge for us authorswas organizing a coherent presentation of this broad but interconnected bodyof knowledge on experimental inelastic neutron scattering.

This document did not begin as a textbook. Our original concept was amanual of specifications for the ARCS data analysis software. Defining spec-ifications is a major step in planning a software project and setting its scope.Writing a manual of specifications forces a high degree of detailed planningof classes and modules. (Such planning is necessary for any robust, flexible,and maintainable design of a software system.) As we struggled with thesedetails on software structure, it became obvious that they should parallel asclosely as possible the science and practice of experimental inelastic neutronscattering research. Besides the challenge of organizing the higher-level intel-lectual concepts, practical problems with notation became apparent almostimmediately. (Should the scattering vector be Q, κ or ∆k? What about itssign?)

This book is intended for a spectrum of readers spanning from graduatestudents beginning their doctoral research in inelastic neutron scattering,researchers who need to learn how to use DANSE (Distributed Data Analysisfor Neutron Scattering Experiments) for data analysis, and ourselves, theauthors, who need a reference manual with rules for reconfiguring or re-writing the Python language modules of DANSE. The focus of this text, andour our heartfelt concern, was more for the graduate student, however. Athesis student or a new user enters the field of inelastic neutron scatteringwith no experience with instruments, probably only a sketchy understandingof the scientific principles, and perhaps limited knowledge of modern conceptsin software engineering. This text was designed to help the reader in all threeareas, and do so as efficiently as possible.

Our philosophy is to present the minimal level of detail required to under-stand physical concepts. There is some sacrifice of the care in developmentfound in The Theory of Neutron Scattering from Condensed Matter by S.W. Lovesey and Introduction to the Theory of Inelastic Neutron Scatteringby G. L. Squires, but our goal was to provide explanations that are “bestbuys,” producing the most physical insight for the amount of work requiredto understand them. Another goal was to present the field of inelastic neu-tron scattering as a codified intellectual discipline, showing inter-relationshipsbetween different topics. To do so, the notation from other books has beenaltered in places, for example Q, defined as ki−kf was selected for the scat-tering vector so that κ could be consistent with its usage in The Theory ofLattice Dynamics in the Harmonic Approximation by A. A. Maradudin, etal. It is an unfortunate, but well-established convention that the scatteringvector in the diffraction literature is of opposite sign, ∆k ≡ kf − ki.

Graduate students learning the concepts presented in this book are as-sumed to have some understanding of scattering experiments – a good un-derstanding of x-ray diffraction would be suitable preparation. The student

Page 6: Experimental Inelastic Neutron Scattering - Caltech Center for

Preface IX

should have some competence with the manipulation of Patterson functionsin Fourier space to the level developed, for example, in Transmission ElectronMicroscopy and Diffractometry of Materials by B. Fultz and J. W. Howe, andshould have some understanding of solid-state physics at the level of Prin-ciples of the Theory of Solids by J. M. Ziman or Solid-State Physics by H.Ibach and H. Luth. Finally, the authors recommend a book such as LearningPython by M. Lutz and D. Ascher.

Concepts from neutron scattering, solid-state physics, and computer pro-gramming lay the foundation for the reader’s path through this book onexperimental inelastic neutron scattering. We hope your adventure throughenergy and momentum space will be as fun for you as it has been for us.

Brent Fultz, Tim Kelley,JaeDong Lee, Olivier Delaire,

Michael Aivazis, ...Pasadena

June, 2003

Page 7: Experimental Inelastic Neutron Scattering - Caltech Center for
Page 8: Experimental Inelastic Neutron Scattering - Caltech Center for

Contents

1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51.1 Overview of this Book . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51.2 Python and C++ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7

1.2.1 What is Python? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 71.2.2 What is C++? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8

1.3 DANSE . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 91.3.1 What is DANSE? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 91.3.2 DANSE Software Architecture . . . . . . . . . . . . . . . . . . . . . 91.3.3 Enabling Neutron Science . . . . . . . . . . . . . . . . . . . . . . . . . 101.3.4 Inelastic Neutron Scattering with DANSE . . . . . . . . . . . 111.3.5 User Interactions with DANSE . . . . . . . . . . . . . . . . . . . . . 121.3.6 A Simple Script . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 141.3.7 N/A A More Sophisticated Analysis . . . . . . . . . . . . . . . . 14

N/A Further Reading . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14

2. Scattering . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 172.1 Coherence and Incoherence . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18

2.1.1 Phase and Energy . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 182.1.2 Wave Amplitudes and Cross-Sections . . . . . . . . . . . . . . . 212.1.3 Coherent Scattering – Overview . . . . . . . . . . . . . . . . . . . . 21

2.2 Born Approximation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 252.2.1 Green’s Function . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 272.2.2 First Born Approximation . . . . . . . . . . . . . . . . . . . . . . . . . 282.2.3 Higher-Order Born Approximations . . . . . . . . . . . . . . . . . 30

2.3 Essence of Coherent Inelastic Scattering . . . . . . . . . . . . . . . . . . . 302.3.1 Spherical Waves from Point Scatterers . . . . . . . . . . . . . . 302.3.2 Time-Varying Potentials . . . . . . . . . . . . . . . . . . . . . . . . . . 312.3.3 Elastic Neutron Scattering . . . . . . . . . . . . . . . . . . . . . . . . . 332.3.4 Phonon Scattering . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 332.3.5 Intensity from Wave Amplitude . . . . . . . . . . . . . . . . . . . . 35

2.4 Correlation Function for Elastic Scattering – The PattersonFunction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 362.4.1 Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 362.4.2 Atom Centers at Points in Space . . . . . . . . . . . . . . . . . . . 37

Page 9: Experimental Inelastic Neutron Scattering - Caltech Center for

XII Contents

2.4.3 Definition of the Patterson Function . . . . . . . . . . . . . . . . 372.4.4 Properties of Patterson Functions . . . . . . . . . . . . . . . . . . 392.4.5 Perfect Crystals . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 402.4.6 Deviations from Periodicity . . . . . . . . . . . . . . . . . . . . . . . . 422.4.7 Uncorrelated Displacements . . . . . . . . . . . . . . . . . . . . . . . 442.4.8 Temperature . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 47

2.5 Correlation Function for Inelastic Scattering – The Van HoveFunction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 522.5.1 Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 522.5.2 Atom Centers at Points in Space and Time . . . . . . . . . . 532.5.3 Definition of the Van Hove Function . . . . . . . . . . . . . . . . 532.5.4 Examples of Van Hove Functions . . . . . . . . . . . . . . . . . . . 552.5.5 Autocorrelation Functions . . . . . . . . . . . . . . . . . . . . . . . . . 60

2.6 General Formulation of Nuclear Scattering . . . . . . . . . . . . . . . . . 642.6.1 Fermi’s Golden Rule . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 642.6.2 Detailed Balance . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 672.6.3 Crystalline Periodicity . . . . . . . . . . . . . . . . . . . . . . . . . . . . 702.6.4 A Subtlety of Quantum Mechanics . . . . . . . . . . . . . . . . . 702.6.5 Gaussian Thermal Averages . . . . . . . . . . . . . . . . . . . . . . . 722.6.6 Impulse Approximation . . . . . . . . . . . . . . . . . . . . . . . . . . . 742.6.7 Multiphonon Expansion . . . . . . . . . . . . . . . . . . . . . . . . . . . 76

2.7 Magnetic Scattering . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 782.7.1 Magnetic Form Factor and Scattering Amplitude . . . . . 782.7.2 Vector Orientations in Magnetic Scattering . . . . . . . . . . 812.7.3 Averaging over Neutron Polarizations . . . . . . . . . . . . . . . 82

2.8 N/A Lipmann-Schwinger Equation . . . . . . . . . . . . . . . . . . . . . . . 85N/A Further Reading . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 85

3. Dynamics of Materials and Condensed Matter . . . . . . . . . . . . 873.1 N/A Models of Structure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 873.2 Lattice Dynamics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 87

3.2.1 Atomic Force-Constants . . . . . . . . . . . . . . . . . . . . . . . . . . . 873.2.2 Equations of Motion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 893.2.3 The Eigenvalue Problem for the Polarization Vector . . 903.2.4 Calculation of the Phonon Density of States . . . . . . . . . 903.2.5 Symmetry Constraints on the Force-Constant Matrices 913.2.6 References . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 91

3.3 Harmonic, Quasiharmonic and Anharmonic Phonons . . . . . . . . 913.3.1 Definitions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 913.3.2 Phonons in Thermodynamics . . . . . . . . . . . . . . . . . . . . . . 923.3.3 Phonons and Heat Capacity . . . . . . . . . . . . . . . . . . . . . . . 94

3.4 Group Theory and Lattice Dynamics . . . . . . . . . . . . . . . . . . . . . . 963.4.1 Real Space . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 963.4.2 k-space . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 973.4.3 Time-reversal symmetry in the dynamical matrices . . . 103

Page 10: Experimental Inelastic Neutron Scattering - Caltech Center for

Contents XIII

3.4.4 Implementation in DANSE . . . . . . . . . . . . . . . . . . . . . . . . 1063.5 Spin Dynamics in Solids . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 106

3.5.1 Spin as a Source of Magnetism . . . . . . . . . . . . . . . . . . . . . 1063.5.2 Localized Spins . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1073.5.3 Itinerant Spins . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1093.5.4 Localized Spins Embedded in Itinerant Spins . . . . . . . . 1123.5.5 Strongly Correlated Electrons . . . . . . . . . . . . . . . . . . . . . . 114

3.6 N/A Simulations of Lattice Dynamics . . . . . . . . . . . . . . . . . . . . . 1153.7 Simulations of Spin Dynamics . . . . . . . . . . . . . . . . . . . . . . . . . . . . 115

3.7.1 Monte Carlo Method . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1153.7.2 Spin Updates in Monte Carlo Simulations . . . . . . . . . . . 1163.7.3 Low Temperatures . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1183.7.4 Time Evolution of Spins . . . . . . . . . . . . . . . . . . . . . . . . . . . 1193.7.5 Observables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1203.7.6 Comments on Quantum Monte Carlo Simulations . . . . 121

Further Reading . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 122

4. N/A Instruments . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1254.1 N/A Chopper Spectrometers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1254.2 N/A Carpenter Gaussian Analysis . . . . . . . . . . . . . . . . . . . . . . . . 1254.3 N/A McStas . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 125N/A Further Reading . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 125

5. Essential Data Processing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1275.1 Steps to Transforming Data into a Function of Energy and

Momentum . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1305.1.1 Operations and Data Structures . . . . . . . . . . . . . . . . . . . . 1305.1.2 A Closer Look at Each Task . . . . . . . . . . . . . . . . . . . . . . . 130

5.2 Absorption . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1365.3 N/A Multiple Scattering Correction . . . . . . . . . . . . . . . . . . . . . . 1375.4 Calculation of Multiphonon Scattering . . . . . . . . . . . . . . . . . . . . 137

5.4.1 Multiphonon Correction – Iterative . . . . . . . . . . . . . . . . . 1425.4.2 Multiphonon Correction – Fourier Log . . . . . . . . . . . . . . 1445.4.3 Neutron Weighting . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1465.4.4 N/A Coherent Case . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 146

Further Reading . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 146

6. N/A DANSE Reference . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1476.1 N/A NeXus . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1476.2 N/A Control Structures . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1476.3 N/A Instrument Modules for ARCS . . . . . . . . . . . . . . . . . . . . . . 147

6.3.1 N/A chop . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1476.3.2 N/A isaw . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 147

6.4 N/A Rebinning . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1476.4.1 N/A iliad . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 147

Page 11: Experimental Inelastic Neutron Scattering - Caltech Center for

XIV Contents

6.4.2 N/A homer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1476.4.3 N/A opengenie . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 147

6.5 N/A Processing of Physical Scattering Data . . . . . . . . . . . . . . . 1476.5.1 Multiphonon.py . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1476.5.2 N/A mscatt . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1516.5.3 N/A mslice . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1516.5.4 N/A tobyfit . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1516.5.5 N/A tobyplot . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1516.5.6 N/A multifrills . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 151

6.6 N/A Visualization . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1516.6.1 N/A irisexplorer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1516.6.2 N/A matlab . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1516.6.3 N/A idl . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 151

6.7 N/A Modeling of Physical Scattering Data . . . . . . . . . . . . . . . . 1516.7.1 N/A bvk . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1516.7.2 N/A unisoft . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1516.7.3 N/A gulp . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1516.7.4 N/A spinwave . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1516.7.5 N/A spinfluct . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1516.7.6 N/A comparemodel . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 151

6.8 N/A Simulation of Physical Scattering Data . . . . . . . . . . . . . . . 1516.8.1 N/A mcstas . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1516.8.2 N/A scatterer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1516.8.3 N/A comparesimul . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 151

6.9 N/A Existing Scripts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1516.10 N/A Customizing Scripts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1516.11 N/A N/A Support N/A N/A N/A . . . . . . . . . . . . . . . . . . . . . . . 151N/A Further Reading . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 151

7. N/A Structure of Computer Programs . . . . . . . . . . . . . . . . . . . 1537.1 N/A Abstractions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 153

7.1.1 N/A Abstractions of Procedures . . . . . . . . . . . . . . . . . . . . 1537.1.2 N/A Abstractions of Data . . . . . . . . . . . . . . . . . . . . . . . . . 153

7.2 N/A Functions, Classes, Modules, and All That . . . . . . . . . . . . 1537.3 N/A Data Flow and Streams . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1537.4 N/A Computer Graphics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 153N/A Further Reading . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 153

8. DANSE Architecture and Engineering . . . . . . . . . . . . . . . . . . . . . 1558.1 Software for Inelastic Scattering . . . . . . . . . . . . . . . . . . . . . . . . . . 155

8.1.1 Overview of Capabilities . . . . . . . . . . . . . . . . . . . . . . . . . . 1558.1.2 Data Reduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1558.1.3 Modeling . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1568.1.4 Direct Experiment Simulation . . . . . . . . . . . . . . . . . . . . . 157

8.2 An Architecture for Distributed Data Analysis . . . . . . . . . . . . . 158

Page 12: Experimental Inelastic Neutron Scattering - Caltech Center for

Contents XV

8.2.1 Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1588.2.2 Components . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1598.2.3 Data Streams . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1618.2.4 Implementation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1628.2.5 Advantages of a User-Directed, Distributed Architecture1648.2.6 Extensibility by Scientists . . . . . . . . . . . . . . . . . . . . . . . . . 164

8.3 Extending DANSE: Writing C++ Extensions to Python . . . . . 1658.3.1 Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1668.3.2 A Little More Detail . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1678.3.3 A Lot More Detail: Wrappers . . . . . . . . . . . . . . . . . . . . . . 1678.3.4 A Lot More Detail: Method Table . . . . . . . . . . . . . . . . . . 1738.3.5 A Lot More Detail: Init Function . . . . . . . . . . . . . . . . . . . 1748.3.6 More Detail: Compile . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1748.3.7 More Detail: Call it from Python . . . . . . . . . . . . . . . . . . . 1758.3.8 More realistic example . . . . . . . . . . . . . . . . . . . . . . . . . . . . 176

8.4 Data Stream Protocols . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 179N/A Further Reading . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1809 References . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 181

A. Appendix . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 185A.1 Convolutions and Correlations . . . . . . . . . . . . . . . . . . . . . . . . . . . 185

A.1.1 Convolution Theorem . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 185A.1.2 Deconvolutions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 186

A.2 Fourier Transform of Screened Coulomb Potential . . . . . . . . . . 187A.3 Fundamental and Derived Constants . . . . . . . . . . . . . . . . . . . . . 190

Index . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 193

Page 13: Experimental Inelastic Neutron Scattering - Caltech Center for
Page 14: Experimental Inelastic Neutron Scattering - Caltech Center for

Contents 1

Table 0.1. Symbols and Notation — ‡ denotes difference with Squires

General Notation

A magnetic vector potential

a, a† phonon annihilation and creation operators

a1,a2,a3 primitive lattice translation vectors

‡ a∗1,a∗2,a∗3 primitive translation vectors of the reciprocal lattice

a0 Bohr radius a0 = 2/(mee

2)

α coefficient of linear thermal expansion

α, β Cartesian indicies x, y, zb scattering length, sometimes coherent scattering length

b, b, b† scattering length operator, and eigenvalues for spin- 12

system

B bulk modulus

Bs magnetic field from electron spins in sample

BL magnetic field from electron orbital momentum

c velocity of sound or velocity of light

c, c† annihilation and creation operators for electronic excitations

Cp heat capacity at constant pressure

CV heat capacity at constant volume

δ(x) Dirac delta function

δij Kroneker delta function

d2σ/dΩ dE double-differential cross-section

E energy transfer E = Ei − Ef

e(k, σ, λ) phonon polarization vector

(with components for all κ in unit cell)

f form factor of the scatterer (F.T. of potential in space and time)

fσ number of eigenvectors for each

degenerate energy (1 ≤ a ≤ fσ)

G(r, t) “Van Hove” function: space-time correlation function

‡ Gs(t) “self-correlation” function: time-time correlation function

γ Gruneisen parameter

‡ g(ω) phonon density of states

‡ g arbitrary reciprocal lattice vector

‡ h, h, l indicies of reciprocal lattice vector

g = ha∗1 + ka∗2 + la∗3H Hamiltonian

‡ I(Q) intensity (for diffraction)

‡ I(Q, ω) intensity for scattering (same as S(Q, ω))

I(Q, t) intermediate function

J(r − r′) exchange integral in Heisenberg Hamiltonian

‡ κ, κ′ indices of atom in basis

‡ ki incident neutron wavevector ki = 2π/λ

‡ kf scattered (final) wavevector kf = 2π/λ

Page 15: Experimental Inelastic Neutron Scattering - Caltech Center for

2 Contents

Table 0.1. Symbols and Notation

General Notation (cont.)

l, l′ indices of unit cells

λ neutron wavelength

λi, λf initial and final states of scattering system

λ (or a) denotes (or index for) independent

eigenvector for each σ or ω2σ

ML(r) magnetization of sample (electron orbital part)

M s(r) magnetization of sample (electron spin part)

M(r) magnetization of sample M(r) = ML(r) +M s(r)

‡ M(k) Fourier transform of sample magnetization

‡ M⊥(k) projected part of M(k),

perpendicular to both Q and M(k)×QMκ mass of atom in basis

m,n, o indicies of real-space lattice vector

rl = ma1 + na2 + oa3

me electron mass

mn neutron mass

µB Bohr magneton µB = e/(2mec)

µN nuclear magneton µB = e/(2mnc)

µN magnetic dipole moment of neutron

ω angular frequency in ω = Ei − Ef

P (r) “Patterson function”: space-space correlation function

φ(v) velocity distribution of incident neutron flux

Φ incident neutron flux

Φαβ(lκ; l′κ′) force constant between two atoms

ψ(r, t) wavefunction of incident or scattered neutron

‡ Q scattering vector Q = ki − kf

ri position of a scattering atom or spin

‡ rl,κ atom site in a crystal

‡ rl lattice site in a crystal

‡ rκ basis vector

r number of atoms in basis

‡ re classical electron radius re = e2/(mec2)

rp “classical proton radius” rp = e2/(mpc2)

R position vector

Page 16: Experimental Inelastic Neutron Scattering - Caltech Center for

Contents 3

Table 0.1. Symbols and Notation

General Notation (cont.)

s spin of electrons in sample

S(Q, ω) “scattering law” (scattered intensity: same as I(Q, ω))

σ cross-section

σcoh coherent cross-section

σinc incoherent cross-section

σtot total cross-section

σ (or s) denotes (or index for) a distinct value of ω2σ

‡ 2θ = φ scattering angle

‡ θB Bragg angle

θD Debye temperature

u(t) (small) displacement of nucleus

ul,κ(t) displacement of nucleus

in unit cell l and basis point κ

U U = −iQ · u(0)

u(κ) and uα(κ), uβ(κ) atom displacement in a phonon,

and Cartesian components

v velocity of neutron

V V = iQ · u(t)

W exponent for Debye–Waller factor = e−2W

W = 12〈(Q · u)2〉

ξ extinction distance

Z partition function

Page 17: Experimental Inelastic Neutron Scattering - Caltech Center for

4 Contents

Table 0.1. Symbols and Notation

Group Theory Specialized Notation

S ≡ S |v(S) + x(m) Seitz space group operator

h order of the group (number of elements)

S matrix of rotation or improper rotation

v(S) little displacement vector

for a screw axis operation

x(m) lattice translation vector

Γ S(k; S |v(S) + x(m)) 3r × 3r unitary matrix of symmetry

operator (in recip. space)

Ri ≡ R |v(S) + x(m) symmetry operator

for a single wavevector k

Page 18: Experimental Inelastic Neutron Scattering - Caltech Center for

1. Introduction

1.1 Overview of this Book

Welcome to inelastic neutron scattering – theory, experiment, and data anal-ysis. Welcome also to distributed data analysis for neutron scattering experi-ments, DANSE, and to the software engineering that makes it possible. ThisChapter 1 begins with a short overview of the rest of the book, which spansfrom the quantum mechanics of scattering to the structure of the DANSEsoftware.1

Chapter 2 is the most pedagogically formal chapter in the book, written inthe style of a graduate-level physics textbook. These textbook explanationswere included for two reasons. Collecting the basic physics provides a handyreference for new users who are less familiar with inelastic neutron scattering.Second, textbook-style derivations provide a common framework and nota-tion for DANSE. The descriptions of data processing steps in Chapter 5, andthe descriptions of the software components in Chapter 6 refer directly to thevariables, equations, and physical processes described in Chaps. 2 and 3.

Throughout Chap. 2, neutron scattering is treated as wave scattering.The phase of the neutron wavefunction scattered from a point, the complexexponent of ei(Q·r−ωt), is studied for its interference with waves emitted fromother points in space, and from other instants in time. The intensity is thedouble Fourier transform of the Van Hove space-time correlation function:I(Q, E) = FrFtG(r, t). This relationship is developed in proper detail forboth nuclear and magnetic scattering.

Chapter 3 is a subset of a course on condensed matter physics. It coversthe known dynamical processes that cause the scattering potential to varywith time. For neutron scattering, these are the motions of nuclei, which areanalyzed as phonon dynamics, and the motions of electron spins, which haveseveral types of excitations. Thermodynamics aspects of these excitationsare also described, as are some fundamental issues in modern research oncorrelated electron systems.

Chapter 4 explains designs of inelastic neutron spectrometers. The focusis on the direct-geometry Fermi chopper spectrometer, which allows mea-1 Additional explanation about why this book was written, and how its scope was

selected, is provided in the Preface.

Page 19: Experimental Inelastic Neutron Scattering - Caltech Center for

6 1. Introduction

surements over wide ranges of energy and momentum transfers between theneutron and the sample. The role of the moderator and choppers on theresolution and intensity are discussed in detail, primarily with a model thatassumes the pulse shapes to be Gaussian in time. Momentum resolution isalso discussed. Some of these results from analytical models are compared toresults from Monte Carlo simulations, and characteristics of real instrumentsare discussed.

Chapter 5 describes the reduction of data from neutron scattering exper-iments. Large datasets, typically 0.5 GB/run, are acquired from a chopperspectrometer with a pixelated detector spanning a wide range in angle. Thedescriptions of data reduction focus on the types of data structures thatmust be manipulated at each step – their dimensions, variables, and physicalmeaning. Other types of data corrections are explained, including multiplescattering (where a neutron is scattered more than once as it traverses a thicksample), and multiphonon scattering (where a neutron generates more thanone inelastic excitation when it is scattered).

Chapter 6 is a description of the present modules in DANSE, and howthey can be arranged into scripts for data analysis. To some extent, thischapter follows a conventional style for software documentation familiar toprogrammers and scientists.

Chapter 7 explains the broad principles of computer science. There arecertainly many other books on modern object-oriented programming, but thistends to be a topic neglected by scientists working on neutron scattering. It ishoped that Chapter 7 will reveal the beautiful correspondence that is possiblebetween the structure of well-designed software and the hierarchy of physicalconcepts. To some extent, summarizing physical laws in software is similarto summarizing them in a textbook. Such background on the structure ofcomputer programs is helpful for understanding Chapter 8.

Chapter 8 explains the software architecture of DANSE. It covers thedata analysis capabilities presently available to a scientist, but the emphasisis on explaining the architecture. DANSE is composed of software encap-sulations called “components” that communicate with each other throughstandard types of data streams. This modularized design, together with itscontrol structure, makes it possible to distribute the data analysis over mul-tiple computers, as in Grid computing.

Another important part of Chapter 8 is its explanation of how the softwarecomponents are built. In essence, modularization was performed by extend-ing the open-source language Python. Python is an interpreted language,so it is possible to restructure Python programs interactively and withoutrecompilation. Interpreted languages have always had an an advantage forquick rearrangement and experimentation. This programming flexibility isinherited by DANSE because the components of DANSE are actual Pythonfunctions. Within reason, they can be rearranged flexibly into new Pythonprograms that are run through the Python interpreter. Some of the actual

Page 20: Experimental Inelastic Neutron Scattering - Caltech Center for

1.2 Python and C++ 7

components are written as Python code, but this is not practical for manycomponents that require the high performance of a compiled language suchas C++.

Incorporating compiled code into DANSE requires some explanation. Ev-erything that runs on a computer is a program, including the language Pythonitself. Since Python is written in the C language, and its source code is openlyavailable, it is practical to use the C language to write new functions forPython. A standard applications program interface (API) is provided in aPython installation to help programmers extend Python by adding exten-sions written in C or C++. Chapter 8 explains how to use this API to buildnew Python functions from code written in C, using examples from neutronscattering data analysis.

1.2 Python and C++

1.2.1 What is Python?

An interesting, short explanation of Python is provided by the Python opensource community. The following quotation from their website,

http://www.python.org,also conveys some of the flavor of Python documentation and perhaps givessome insight into the open source community itself.

python, (Gr. Myth. An enormous serpent that lurked in the cave ofMount Parnassus and was slain by Apollo) 1. any of a genus of large,non-poisonous snakes of Asia, Africa and Australia that suffocatetheir prey to death. 2. popularly, any large snake that crushes its prey.3. totally awesome, bitchin’ language that will someday crush the $’sout of certain other so-called VHLL’s ;-). Python was developed byGuido van Rossum, who named it after the classic British televisioncomedy series Monty Python’s Flying Circus.

Python is an interpreted, interactive, object-oriented program-ming language. It is often compared to Tcl, Perl, Scheme or Java.

Python combines remarkable power with very clear syntax. Ithas modules, classes, exceptions, very high level dynamic data types,and dynamic typing. There are interfaces to many system calls andlibraries, as well as to various windowing systems (X11, Motif, Tk,Mac, MFC). New built-in modules are easily written in C or C++.Python is also usable as an extension language for applications thatneed a programmable interface.

The Python implementation is portable: it runs on many brandsof UNIX, on Windows, DOS, OS/2, Mac, Amiga... If your favoritesystem isn’t listed here, it may still be supported, if there’s a C com-piler for it. Ask around on comp.lang.python – or just try compilingPython yourself.

Page 21: Experimental Inelastic Neutron Scattering - Caltech Center for

8 1. Introduction

Python is copyrighted but freely usable and distributable, evenfor commercial use.

An excellent tutorial on Python is distributed with the software itself,and the python.org website has links to others.

1.2.2 What is C++?

Compared to Python, C++ and C are lower-level languages. They are im-portant when pushing computing efficiency to its limits, as is sometimes thecase with numerical computation. In essence, C++ is the computer languageC with new extensions for object-oriented programming.

Although the language C is approximately a subset of C++, there aresome differences between these languages even for the same capabilities.Compared to C, the C++ language provides for better error checking bythe compiler, and increased flexibility in working with variables and func-tions. Some improvements C++ are in input/output, flexibility in namingfunctions, typing and initialization of variables, and keywords.

The powerful new capability of C++ is its extension to object-orientedprogramming. The old programming paradigm of functions and data is re-placed by objects that include both. Important concepts include abstraction,where the object interface is specified in detail, so the code for the objectmay be replaced readily or written at a later stage of a software project.The C++ language alows control over encapsulation, where the code for anobject can be hidden from other parts of a program, reducing the liklihoodof unwanted interactions. C++ provides a hierarchial structure that encour-ages the building of larger objects from smaller ones, and for deriving newobjects from a standard base object, which inherit its characteristics. C++also supports virtual functions, which allow a set of different objects to betreated in a similar way.

The C++ language is powerful, but it is dangerous in that it offers manyways to write cryptic code with very obscure bugs. This is a serious concernfor a project where programming is done in part by physical scientists, whoare more interested in results than in the elegance of software structures.In 2004, however, it is not clear that there is an alternative programminglanguage that will be supported for more than a decade into the future. Onthe other hand, there is elegance in the structure of computer programs, andthis elegance compensates in part for the discipline required for robust C++programming.

Page 22: Experimental Inelastic Neutron Scattering - Caltech Center for

1.3 DANSE 9

1.3 DANSE

1.3.1 What is DANSE?

DANSE or “Distributed Data Analysis for Neutron Scattering Experiments,”is an integrated software system for doing neutron scattering science ona computer. “Doing neutron scattering” means 1) performing all essentialtransformations of raw data acquired with neutron instruments, plus 2) mod-eling and simulating the structure and dynamics of the samples, and predict-ing the neutron scattering. “Integrated” means providing a uniform environ-ment for comparing 1 and 2. The modular structure of the proposed systemparallels the steps of data analysis performed by scientists, making it naturalto use. It is extensible so that working scientists can easily transform theircomputer programs into interoperating DANSE components. The distributednature of the architecture makes it possible to use high-performance comput-ing resources that can enable new types of science with neutron scatteringdata.

A full understanding of DANSE requires the understanding of two sub-jects. The first, summarized in Section 1.3.2, is a software framework thatpermits the interoperability of modular software components. The second,summarized in Section 1.3.3, is the set of software modules needed for dataanalysis for the different subfields of neutron scattering research.

1.3.2 DANSE Software Architecture

Technically, DANSE is a “component-based runtime environment.” Thismeans that the components are pre-compiled, and interconnected by the userat runtime. Examples of components are: readers for data files, C++ codes fordata reduction, user-interactive graphics packages, commercial data analysisenvironments such as Matlab, FORTRAN codes for electronic structure calcula-tions on Linux clusters, and Monte Carlo simulations of instruments for neu-tron scattering. The user directs the interconnections of these components,using either a graphical programming interface or a command-line interface,depending on need or preference. In our prototype graphical programminginterface, components are depicted naturally as boxes to be retrieved fromlibrary shelves, and their interconnections are depicted as wires.

Interconnections between components provide data flow and control. Animportant design decision for the DANSE architecture was to build the com-ponents and interconnections with a high-level programming language. Pro-gram execution is directed by a Python interpreter [6][7], using XML [8][9]for describing the data and control functions. Using a high-level language,Python, for these interconnections frees developers from working with com-pilers, low-level linkers and header files. The developers of software for neu-tron scattering research are scientists. Many gravitate towards commercial

Page 23: Experimental Inelastic Neutron Scattering - Caltech Center for

10 1. Introduction

data analysis environments such as Matlab [10], IDL [11] or Igor [12] to es-cape from the lower levels of computing. The challenge is to offer them botha more powerful environment and ease of use.

Python is readily extensible to incorporate FORTRAN programs, C++programs, Matlab, and IDL. All components in the DANSE system arePython objects, and in a single process space these objects interoperatethrough the Python interpreter [13][14]. Interoperation in a distributed en-vironment requires XML-based data exchange protocols, but neutron scat-tering research requires the exchange of only three generic types of dataas explained below. A possible concern about an interpreted high-level lan-guage such as Python is that it involves the tradeoff of computing perfor-mance for convenience. This presents a design opportunity, however. Themost computationally-intensive tasks should be performed within the com-ponents compiled from FORTRAN and C++ codes with Python bindings.Minimal time is lost at the level of the Python interpreter when transferringexecution threads between components. The advantage of having the inter-connections of components at a high level is that more scientists are enabledto contribute new components to the system.

1.3.3 Enabling Neutron Science

The DANSE system offers opportunities for the design of more efficient ex-periments by use of use of prior simulations, or simulations that could beperformed as measurements are underway and experimental trends beginto emerge. Some of the most exciting new experiments made possible bythe most recent high-performance neutron instruments can be executed onlywith new software. Examples include single crystal analysis with chopperspectrometers, or beam time optimization for stress tensor measurementswith an engineering diffractometer. Detailed simulations of the structure anddynamics of materials and molecules are readily possible with the ab initiocalculations of today [15][16][17][18][19], but these simulations and neutronscattering experiments cannot yet be compared in the same environment.Scientists should be exploiting fully the data from neutron instruments, per-forming sophisticated experiments with detailed input from theory, compar-ing the experimental data to simulations, and having more creative freedomto analyze the data in a broader scientific context than is possible with astand alone software package running on a personal computer. Offering pow-erful software and hardware to the user will elevate the standards for dataanalysis, and elevate the level of science.

The DANSE data analysis software is being developed by scientists whowork with real data. Neutron scattering research is organized into subfieldsspecializing in different types of science, approximately clustered around in-struments that perform particular types of measurements. To best accom-modate the needs of these subfields, the development of scientific softwarefollows a similar decomposition into subfields:

Page 24: Experimental Inelastic Neutron Scattering - Caltech Center for

1.3 DANSE 11

1. Diffraction. This method has the largest user community. Experimentsincludes studies of crystal structure and microstructure, both on liquidsand amorphous materials, polycrystalline materials, and single crystals.

2. Engineering Diffraction. Research in this field includes measurements andinterpretations of internal strains in materials, and studies of crystallinetextures in polycrystallie materials.

3. Small-Angle Neutron Scattering (SANS). Users in this field have intereststhat span from biochemistry to solid-state magnetism. SANS research in-cludes a large activity in polymer structure, and the structural evolutionof polymers under temperature and flow.

4. Reflectometry, which measures the depth profile of neutron scatteringnear a surface. The science includes structures of large molecules at sur-faces and interfaces, and surface magnetism probed with polarized neu-trons.

5. Inelastic scattering, which studies dynamical processes such as the ele-mentary excitations of phonons and magnons in solids, and vibrationsand motions of molecules.

1.3.4 Inelastic Neutron Scattering with DANSE

The focus of this book is on experimental inelastic neutron scattering theoryand data analysis.2 For extracting science from inelastic neutron scatteringdata, DANSE provides a set of Python language scripts, modules, and sharedobjects. To some extent, DANSE can be viewed as a part of the Python lan-guage, although of course it is not part of the standard Python distribution.

A number of working scripts have been tested and documented, and theseare available for immediate use in many standard types of operations onneutron scattering data. Perhaps more importantly, the DANSE architectureis flexible, allowing new combinations of the existing modules and minimizingthe barrier to developing new and compatible modules. This permits minorchanges of existing data analysis procedures to accommodate experimentsthat differ slightly from previous ones, or major changes to accommodateentirely new experiments or types of data analyses. Some components ofDANSE are illustrated schematically in Fig. 1.1.

DANSE provides a rich set of tools for many standard operations onneutron inelastic scattering data, such as conversion of time-of-flight datainto physical distributions in momentum and energy, background corrections,deconvolutions, corrections for multiple scattering and multiple excitations,and data visualization. In addition to this “traditional” analysis, DANSEoffers new capabilities for working with models of structure and dynamics.For example, a module spinwave allows the user to select a model for the2 As this text migrates to electronic media, it is expected that the other subfields

of neutron scattering science will develop documentation in a parallel way. Thisrequires individual dedication, of course!

Page 25: Experimental Inelastic Neutron Scattering - Caltech Center for

12 1. Introduction

data

I1(Ω,t)I2(Ω,t)

In(Ω,t)

rebindeconvcalibbkgd

S(Q,E)

recognitionmultiple excit.multiple scatt. + – x /

excitationsdispersionsDOS

fullsimulation

model

compare compare

tools tools physicsphysicalscattering

PRL: PRL:

PRL:

NeXusfile format converter

ISAWGenieHomer/Iliad

MsliceMscattMuflcorCaltech

TobyfitChopB-v K codes

McStas

GraphicsWindow

Iris ExplorerISAWIDLMatlab

Fig. 1.1. Some components of DANSE, which need not necessarily be connectedsimultaneously. The traditional forward analysis of data is shown in the path acrossthe top, with simulations and modeling accessing this path vertically. PRL denotesa publication.

dynamics of thermal excitations on an ordered array of spins, and tune theexchange interactions in the model for a best fit to the S(Q,ω) obtained froma traditional forward analysis of experimental data.

DANSE offers non-traditional types of data analysis by full simulation oftime-of-flight data. Monte Carlo simulations of the instrument characteristicshave been integrated with simulations of the spin and nuclear dynamics of thesample, allowing a direct calculation of the counts measured at the detectorbank. A set of graphics tools can be inserted at various locations of DANSEscripts to examine the results of data operations, modeling, or simulations.The outputs from these three types of operations can be piped simultaneouslyinto the visualization packages to facilitate direct comparisons between theoryand experiment, or between different types of data analysis.

1.3.5 User Interactions with DANSE

Distributed Computing. Figure 8.4 illustrates data analysis as a serviceaccessed through remote procedure calls to a central compute server. Com-ponents can be maintained and run centrally on well-tested platforms. Acompute server, not the user, arranges for computation on the appropriatehardware. A user could elect for little code and no raw data to reside on hisor her local computer, while still directing the reuse and reconfiguring of theneeded Python components, including those that run on specialized hardware

Page 26: Experimental Inelastic Neutron Scattering - Caltech Center for

1.3 DANSE 13

such as Beowulf clusters. Our intent is to ensure that any user can utilize thehighest-performance hardware without buying and maintaining it.

Fig. 1.2. Architecture for distributed computing.

Nevertheless, many of the data analysis components could run locally onthe user’s computer. Bindings for proprietary scientific data analysis packagessuch as IDL or Matlab are available. If a user owns one of these proprietarypackages, it can be seamlessly integrated into a DANSE analysis procedure.Nevertheless, software running on a user’s local computer will include auto-matic and transparent Internet access to the DANSE compute server. Sucha remote access to the DANSE system will overcome a traditional problemwith software releases for a user’s local computer, where software developersmust design for the least-capable hardware. With such access to the centralservice, capabilities for large simulations on the DANSE system, for example,would be available to the user through a familiar software client.

User interfaces. User interfaces, especially graphical user interfaces (GUIs),can simplify access to the software system while offering access to much of itsflexibility and power. These two requirements of simplicity and flexibility areusually in conflict, and different users will prefer different balances betweenthem. User interfaces are usually controversial, and some designs are fraughtwith peril, as illustrated in Fig. 1.3

Fig. 1.3. User interfaces. (a) Good. (b) Bad.

Page 27: Experimental Inelastic Neutron Scattering - Caltech Center for

14 1. Introduction

There are fundamental reasons why different users will always need dif-ferent interfaces to the data analysis framework. A simple set of controls isappropriate not only for new users, but also for advanced users who haverepetitive tasks. Such “dashboard”-style controls are also appropriate whenreal time analyses are performed during data acquisition at 3:00 AM. A seconduser interface is appropriate for rearrangements of data analysis procedures,such as performing a different type of background correction or a fit to a dif-ferent type of analytical model. A “wiring diagram” metaphor (see Fig. 1.4)is an intuitive way for the user to specify these operations, where the usercan select data analysis components from both local and remote libraries,and drag-and-drop the components onto the GUI canvas. A command lineinterface allows a user to access the full capabilities of the Python languageand might be the preference of some users, especially for development work.

Graphical user interfaces are expected to change with time. Changing theDANSE GUI should not be difficult because of a clean separation between theuser’s depiction of the data analysis procedure, and the server’s execution ofthe data analysis procedure. The first DANSE GUI was developed by MichelSanner’s group at the Scripps Oceanographic Institute, the “Visual PythonProgramming Environment” (ViPEr) [26], which is based on open sourcesoftware3. This user interface is shown in Fig. 1.4. The execution engine ofViPEr has been modified substantially to be compatible with the DANSEsystem, but the interface is shown in Fig. 1.4.

1.3.6 A Simple Script

The idea is to walk through a simple type of data processing and visualizationthat would be useful or at least understood by nearly all experimentalists.This example should be selected carefully so that it illustrates most of theactual features of DANSE.

Perhaps two scripts will be presented, one that is fairly mechanical, andthe other with greater depth. The second script could illustrate fundamentalaspects of neutron scattering, motivating the reader to take heart and plungeforward into Chapter 2.

1.3.7 N/A A More Sophisticated Analysis

N/A Further Reading

The contents of the following are described in the Bibliography.Mark Lutz and David Ascher: Learning Python (O’Reilly & Associates, Inc.1999).

3 Python, Tkinter, PyXML, Python Mega Widgets, 4Suite, PyOpenGL (and sub-package: gle), Gnuplot.py, Numeric.py

Page 28: Experimental Inelastic Neutron Scattering - Caltech Center for

Further Reading 15

Fig. 1.4. Screen shot of the present ViPEr interface to the DANSE client software.Boxes on upper right represent libraries of data analysis components, local or re-mote, on five file systems. The workspace for arranging data analysis procedures ison the lower right, with components in place for reducing a data set from the Pharosinstrument. As the cursor is placed over input or output ports, a description of datatypes is presented in a dialog box. Upper left shows the Matlab window launchedby the analysis network, in which the data files were corrected and normalized. Theoutput from Matlab was sent into the graphical display in the lower left window forcomparison with a lattice dynamics simulation on the right of the window. (Thisdisplay was generated by ISAW, an integrated spectral analysis workbench.) Com-ponents that ran remotely are bordered in purple, local components are borderedin yellow.

Brent Fultz and Doug Abernathy: ARCS Spectrometer web site,http://www.caltech.edu/∼matsci/btf/ARCS.htmlTim Kelley, Mike McKerns, Michael Aivazis and Brent Fultz: ARCS/DANSEwiki web site,http://arcs.cacr.caltech.edu:8000/arcs/1

Page 29: Experimental Inelastic Neutron Scattering - Caltech Center for
Page 30: Experimental Inelastic Neutron Scattering - Caltech Center for

2. Scattering

AAAA

k

detector

source

∆k k

k0

–k0

This chapter on inelastic scattering assumes that the reader is reason-ably knowledgeable about elastic scattering as it is used in diffraction stud-ies of atomic structure. (After all, x-ray diffraction is common currency forchemists, materials scientists and condensed matter physicists.) The chap-ter builds on this basic understanding of diffraction, although key elementsof this background material are developed here. The chapter begins with adiscussion of coherence and energy; concepts that are sometimes taken forgranted by persons having extensive experience with diffraction experiments.In Sect. 2.2, elastic scattering from static potentials is developed in the Bornapproximation, giving the basic Fourier transform relationship between thewave and the scattering factor distribution: ψ(Q) = Ff(r). This is followedby a brief explanation that shows how time-varying potentials cause inelasticscattering by modulating the frequency of the scattered wave.

Section 2.4 returns to elastic scattering to develop the concept of the Pat-terson function, P (r). The Patterson function is the spatial correlation func-tion that includes all information about the diffracted intensity, as opposedto the diffracted wave. Sect. 2.5 presents a nearly parallel development of thespace-time correlation function, the Van Hove function. The double Fouriertransform of the Van Hove function, G(r, t), provides all information aboutthe scattered intensity (elastic and inelastic). The Patterson function is a spe-

Page 31: Experimental Inelastic Neutron Scattering - Caltech Center for

18 2. Scattering

cial case of the Van Hove function for static scattering potentials. Graphicalexamples are used to demonstrate fundamental features of the scattered in-tensity for the elastic case with the Patterson function: I(Q) = FrP (r), andfor the inelastic case with the Van Hove function: I(Q, E) = FrFtG(r, t). Thetwo Fourier relationships between the scattered intensity and the correlationfunctions are discussed in detail:

• I(Q) = FrP (r), which relates the diffracted intensity, I(Q), to the Fouriertransform (from space to momentum) of the Patterson function, P (r).

• I(Q, E) = FrFtG(r, t), which relates the scattered intensity, I(Q, E), totwo Fourier transforms (from space to momentum, and time to energy) ofthe Van Hove function, G(r, t).

Inelastic scattering is then calculated in a more precise way, developingthe Van Hove space-time correlation function by taking careful account ofthe non-commutivity of the position and momentum operators. A propertreatment of magnetic scattering is then presented. These latter sections areparallel to similar sections in the books by Squires and Lovesey.

2.1 Coherence and Incoherence

2.1.1 Phase and Energy

The emphasis of the present section is on the elastic scattering of waves fromindividual atoms. Diffraction is a type of cooperative elastic scattering by agroup of atoms. Diffraction requires “coherent scattering,” characterized by aprecise relationship between the phases of the incident and scattered waves.The scattered wave is the sum of component waves, “wavelets” as we callthem, emanating from the different atoms in the sample. In diffraction, phasedifferences between these outgoing wavelets cause constructive or destructiveinterferences at different angles around the sample. These interferences causethe total scattered wave to have maxima and minima, depending on thedistances and angles between the atoms in the material.

At a point in time, the wave amplitude ψ(x) describes the structure ofa wave (its crests and troughs) along position, x. The mathematical formψ(kx − ωt) accounts for how the wave amplitude shifts in position with in-creasing time, t. The argument of the wave amplitude, kx−ωt, is the “phase”of the wave, and includes two constants for the wave: k (the wavevector), andω (the angular frequency). The phase kx− ωt is dimensionless, and is usefulas the argument of a sine function or a complex exponential, for example.Our mathematical form causes the entire structure of the wave ψ(kx−ωt) tomove to more positive x with increasing t. This is clear if we recognize that

Page 32: Experimental Inelastic Neutron Scattering - Caltech Center for

2.1 Coherence and Incoherence 19

a particular wavecrest in ψ exists at a particular value of phase, so for largert, we must go to larger x to have the same value of kx− ωt.1

Coherent scattering preserves the relative phases of the wavelets, ψrj,scattered from different locations, rj, in a material. For coherent scattering,the total scattered wave, Ψcoh, is constructed by adding the amplitudes of thescattered wavelets:

Ψcoh =∑rj

ψrj . (2.1)

The total coherent wave therefore depends on the constructive and destruc-tive interferences of the wavelet amplitudes. Diffraction experiments measurethe total coherent intensity, Icoh:

Icoh = Ψ∗cohΨcoh =∣∣∣∑rj

ψrj

∣∣∣2 . (2.2)

On the other hand, “incoherent scattering” does not preserve a phase re-lationship between the incident wave and the scattered wavelets. For incoher-ent scattering it is incorrect to add the amplitudes of the scattered wavelets,ψrj. Incoherently-scattered wavelets do not maintain phase relationships,so they cannot interfere constructively or destructively. The total intensityof incoherent scattering, Iinc, is the sum of individual scattered intensities:

Iinc =∑rj

Irj =∑rj

∣∣ψrj ∣∣2 . (2.3)

Because measurable intensities are added in incoherent scattering, the angu-lar distribution of incoherent scattering from a group of N identical atomsis the same as for a single atom, irrespective of how these N atoms are po-sitioned in space. The total intensity is simply N times larger. Some typesof incoherent scattering occur with a transfer of energy from the wave tothe material, and these processes can be useful for spectroscopic analysis ofthe atom species in a material. The two main spectroscopies performed withelectron beam instruments, energy dispersive x-ray spectroscopy (EDS), andelectron energy-loss spectroscopy (EELS), are described in Chap. 4.

It is important to emphasize the difference between the right-hand sidesof (2.2) and (2.3). Because the intensity of coherent scattering in (2.2) firstinvolves the addition of wave amplitudes, coherent scattering depends on therelative phases of the scattered wavelets. It therefore depends on the rela-tive positions of the N atoms in the group. Coherent scattering is useful fordiffraction experiments; incoherent scattering is not. This chapter describes insequence the four types of scattering having coherent contributions allowingfor diffraction experiments on materials:1 We say ψ(kx−ωt) travels to the right with a “phase velocity” of ω/k. The waveψ(kx+ ωt) travels to the left.

Page 33: Experimental Inelastic Neutron Scattering - Caltech Center for

20 2. Scattering

• x-rays, which are scattered when they cause the atomic electrons to oscillateand re-radiate,

• electrons, which are scattered by Coulomb interactions when they pene-trate the positively-charged atomic core,

• neutrons, which are scattered by nuclei (or unpaired electron spins), and• γ-rays, which are scattered when they resonantly excite a nucleus, which

later re-radiates.

Besides being “coherent” or “incoherent,” scattering processes are “elas-tic” or “inelastic” when there is, or is not, a change in energy of the wave afterscattering. We can therefore construct four word pairs: (coherent elastic), (co-herent inelastic), (incoherent elastic), (incoherent inelastic). For electron andx-ray scattering, we are interested primarily in coherent elastic scattering,which is useful for diffraction, and in incoherent inelastic scattering, which isuseful for spectroscopy. An example of the third combination, incoherent elas-tic scattering, occurs when phase relationships between scattered wavelets aredisrupted by disorder in the material. The incoherent elastic intensity doesnot show the sharp diffractions associated with crystalline periodicities, buthas a broad angular dependence. Finally, coherent inelastic scattering is usedin neutron scattering studies of elementary excitations in materials. These ex-citations such as phonons (vibrational waves) or magnons (spin waves) haveprecise energy-wavevector relationships. In phonon studies, for example, aneutron loses energy when creating a phonon (inelastic), but the scatteringamplitude depends on the phases of the atom movements in the phonon andthe phases of the incident and scattered neutron wavevectors (coherent).

A deeper and more rigorous distinction between coherent and incoher-ent scattering involves our knowledge about the internal coordinates of thescatterer:

• Consider a simple oscillator (a bound electron, for example) that is drivenby an incident wave and then re-radiates. There is a transfer of energy fromthe incident wave to the oscillator, and then to the outgoing wave. Supposewe know in full detail how the coordinates of the oscillator respond to theincident wave. Since the scattering process is determined fully, the phasesof all outgoing wavelets have a precise and known relationship to the phaseof the incident wave. The scattering is coherent.

• On the other hand, suppose the coordinates of this oscillator were coupledto another system within the material (a different electron, for example),and furthermore suppose there is freedom in how the oscillator can interactwith this other system. (Often differing amounts of energy can be trans-ferred from the oscillator to the other system because the transfer occursby a quantum mechanical process that is not deterministic.) If this energytransfer is different for different scatterings, we cannot predict reliably thephase of the scattered wavelet, and the scattering is incoherent.

Page 34: Experimental Inelastic Neutron Scattering - Caltech Center for

2.1 Coherence and Incoherence 21

It is therefore not surprising that incoherence is often associated with inelasticscattering, since inelastic scattering involves the transfer of energy from thescatterer to another part of the material. Incoherence does not imply inelasticscattering, however, and inelastic scattering is not necessarily incoherent.

2.1.2 Wave Amplitudes and Cross-Sections

X-rays, electrons, neutrons, and γ-rays are detected one-at-a-time in scat-tering experiments. For example, the energy of an x-ray is not sensed overmany positions, as are ripples that spread to all edges of a pond of water.Either the entire x-ray is detected or not within the small volume of a detec-tor. Neutrons, obviously, are also detected one-at-a-time. For the processesof neutron scattering, the scattering may or may not occur, depending on aprobability for the scattering process.

An important quantity for scattering problems is the “cross-section,” σ,which is the effective “target area” presented by each scatterer. With cross-sections it is handy to think of a number, N , of scatterers in a sample ofarea A as in Fig. 2.1. The probability of scattering is equal to the fraction ofsample area “blocked” by the scatterers. For thin samples when the scatterersdo not overlap, the N scatterers block an area equal to Nσ. The fraction ofrays removed from the incident beam is then Nσ/A = Nσx/(Ax) = ρ σx,where the density of scatterers, ρ ≡ N/(Ax) has units [scatterers cm−3].

xσ A

Fig. 2.1. These 7 scatterers oc-cupy the fraction 0.2 of the sam-ple area, A, and remove the frac-tion 0.2 of the rays from the inci-dent beam. The cross-section istherefore σ = (0.2/7)A. In thethin sample limit, the numberof scatterers and the amount ofscattering increase in proportionto thickness, x, but σ remainsconstant.

2.1.3 Coherent Scattering – Overview

To illustrate a salient feature of coherent scattering, consider the elastic scat-tering of neutrons through the interaction of their spin with the spin polar-ization of electrons in an antiferromagnet. The total cross-section dependson the total number of unpaired electrons in the material. As mentionedafter (2.3), for incoherent scattering the picture would then be complete –the spatial distribution of the scattered intensity is obtained by adding theintensities from independent scattering events from different atoms.

Page 35: Experimental Inelastic Neutron Scattering - Caltech Center for

22 2. Scattering

Coherent scattering, as in (2.1), requires further consideration of the waveamplitudes before calculating the cross-section. A hierarchy of wave interfer-ence processes can occur between spin structures on different length scales:

• the unpaired electrons in the same atom (atomic form factor),• the atoms in the unit cell of the crystal (structure factor),• the unit cells in the crystal (shape factor), and• density variations across a material (small angle scattering).

For coherent scattering, it turns out that the angular dependence of thediffracted intensity is proportional to the product of the four factors in paren-theses in this list.2 The coherent cross-section remains constant, however. Byrepositioning the atoms in a material, the constructive and destructive in-terferences of coherent scattering are altered and the angles of scattering areredistributed, but for the same incident flux the number of scattered neu-trons is the same. The spatial redistribution of scattered intensity can bespectacularly large (such as sharp Bragg peaks in diffraction patterns), andto understand it we need to consider carefully the constructive or destruc-tive interferences between the wavelets emitted from the coherent scatteringprocesses.

The flux of scattered x-rays, electrons, neutrons, or γ-rays at the distancer from the scatterer decreases as 1/r2 along r. A scattered photon carriesenergy, so the radiated energy flux also decreases as 1/r2 from the scatterer.The energy of a photon is proportional to E∗E, so the electric field, E, hasan amplitude that must decrease as 1/r from the center of scattering. Thisoscillating electric field contains the phase information of the x-ray wavelet, sothe electric fields of the scattered wavelets are the physical quantities addedtogether to give the constructive and destructive interferences. For coherentelectron and neutron scattering, the wavefunction, ψ, plays the same role asthe electric field, E, in that we must sum all scattered wavelets3 as in (2.1).The total intensity, or the time-averaged number of scattered electrons orneutrons, is obtained from the probability distribution, ψ∗ψ.

To parameterize the coherent scattering of x-rays, we relate the electricfield along r to the incident electric field at the scatterer, E0:

E(r) ∝ E0

r, (2.4)

where the constant of proportionality would include any angular dependence.The electric fields E(r) and E0 in (2.4) have the same units, of course, sothe constant of proportionality has units of length, and is called a “scatteringlength.”

The problem is similar and actually simpler for neutron scattering by nu-clei, which are effectively points. In this case the “coherent scattering length”2 The coherent scattering of electrons, x-rays, and γ-rays have similar hierarchies.

The form factors must differ for these radiations, however.3 “Wavefunctionlet,” while more precise in spirit, is not a word.

Page 36: Experimental Inelastic Neutron Scattering - Caltech Center for

2.1 Coherence and Incoherence 23

is a constant, b. This b can be converted to a cross-section by first squaringit (actually taking b∗b because it is often convenient for b to be a complexnumber). The second step is to integrate over all solid angle, which is 4π. Forall intents and purposes the nucleus that scatters a typical 1 A neutron is apoint and has isotropic scattering, so the relationship between the scatteringlength and the total coherent cross-section, σcoh, is:

σcoh = 4π∣∣b∣∣2 . (2.5)

The scattering of an x-ray by a single atomic electron can be treated in almostthe same way, but we need to account for the electric dipolar pattern of x-rayradiation with a factor of 2/3 in the cross-section,

σx1e =8π3

∣∣fx1e

∣∣2 , (2.6)

where fx1e is the scattering length. This fx1e is the actual constant of pro-portionality to convert (2.4) into an equality (cf., (??) below).

Anisotropic scattering is the rule rather than the exception, however,so simple cross-sections like those of (2.5) are usually inadequate, even ifaltered by factors like the 2/3 used in (2.6). The “differential scattering cross-section,” written as dσ/dΩ, contains the angular detail missing from the totalcross-section, σ. The dΩ is a small interval in solid angle around the scatterer.We expect to recover the total cross-section, σ, by integrating dσ/dΩ overall solid angle,

σ =

4π∫sphere

dσdΩ

dΩ . (2.7)

The differential scattering cross-section, dσ/dΩ, is thepiece of area offered by the scatterer, dσ, for scattering an incident x-ray(or electron or neutron) into a particular increment in solid angle, dΩ.

The concept of dσ/dΩ is depicted Fig. 2.2. Note that dσ/dΩ relates anincrement in area (on the left) to an increment in solid angle (on the right).

For the simple case of isotropic scattering,

dσdΩ

=∣∣b∣∣2 , (2.8)

which is a constant. Substituting (2.8) into (2.7) and integrating gives (2.5),as expected. For anisotropic scattering, (2.8) is generalized with a scatteringlength, f(ki,kf), that depends on the directions of the incident and outgoingwavevectors, ki and kf , respectively:

dσdΩ

=∣∣f(ki,kf)

∣∣2 . (2.9)

Compare the differential scattering cross-sections for coherent x-ray scat-tering by a single electron at rj , dσx1e,rj/dΩ, and an atom having Z electrons,dσatom/dΩ:

Page 37: Experimental Inelastic Neutron Scattering - Caltech Center for

24 2. Scattering

σarea

dσ1

dΩ1

dσ2dσ3

dΩ2

dΩ3

∆ ∆sR

4π[sR]

solidangle

cm2

Fig. 2.2. The differential scat-tering cross-section, dσ/dΩ, forthree paths past a scatterer. Thethird path, dσ3/dΩ3, misses thescatterer and contributes only tothe forward beam. The pathswith areas dσ1 and dσ2 makecontributions to the total cross-section for scattering, σ, andthese contributions are includedwhen the intensity is integratedover the differential solid anglesdΩ1 and dΩ2.

dσx1e,rj

dΩ(ki,kf) =

∣∣fx1e,rj (ki,kf)∣∣2 , (2.10)

dσatom

dΩ(ki,kf) =

∣∣fatom(ki,kf)∣∣2 . (2.11)

In coherent scattering we also sum wave amplitudes, or scattering lengths(cf., (2.1)). We sum the scattering lengths of all Z electrons to obtain thescattering length of an atom:

fatom(ki,kf) =Z∑rj

fx1e,rj (ki,kf) . (2.12)

Note that (2.12) is a sum of the fx1e,rj , but (2.11) is the square of this sum.This illustrates the elegant, delicate, spectacular, and often confusing featureof coherent scattering. The only way that the total cross-section, σatom, canscale with the number of electrons at the atom, while (2.10)–(2.12) remaintrue, is if the angular distribution of coherent scattering is different for theatom and for the single electron. That is, fx1e(ki,kf) and fatom(ki,kf) musthave different dependencies on solid angle (and therefore different depen-dencies on ki and kf). The following is an inequality for coherent scattering(although it is an equality for incoherent scattering):

dσatom,coh

dΩ(ki,kf) =

Z∑rj

dσx1e,rj ,coh

dΩ(ki,kf) . (2.13)

Equations (2.10)–(2.12) can predict that the coherent x-ray scatteringfrom an atom with Z electrons is Z2 times stronger than for a single electron,and this proves to be true in the forward direction. Consequently the coherentscattering is suppressed in other directions so that the total cross-section forcoherent scattering increases linearly with the number of scatterers (here thenumber of electrons, Z). Integrating (2.13) gives an equality for coherent (andincoherent) scattering:

Page 38: Experimental Inelastic Neutron Scattering - Caltech Center for

2.2 Born Approximation 25

4π∫sphere

dσatom,coh

dΩ(ki,kf)dΩ =

4π∫sphere

Z∑rj

dσx1e,rj ,coh

dΩ(ki,kf)dΩ , (2.14)

because with (2.7) we see that (2.14) equates the individual electron cross-sections to the total cross-section of the atom:

σatom,coh = Zσx1e,coh . (2.15)

The process of actually performing the sum in (2.12) evidently requiresdelicacy in accounting for the phase relationships between the x-ray waveletsscattered into different angles, and knowledge about the electron density ofthe atom. This is the subject of Sects. ??–??, which focus on the dependenceof the scattering intensity, I (or sometimes S), on the incident and outgoingwavevectors, ki and kf . In general, however, the scattering also depends onthe wave frequency, ω. A general expression for the scattering intensity, calledsomewhat reverently the “scattering law,” is a function of the wavevectorsand frequencies (or energies, ε = ω) of the incident and scattered waves,usually through their differences: S(Q,∆ε), where Q ≡ ki − kf .

2.2 Born Approximation

Almost without a second thought, we treat neutron scattering as a wavephenomenon with the neutron wavefunction satisfying the Schrodinger waveequation. A neutron diffraction pattern, with its sharp peaks, is certainlyevidence of wave behavior. The interpretation of the neutron wavefunctionis different from that of a simple wave, however. Suppose we were to turnon an neutron beam and watch the formation of a diffraction pattern, usingan area detector capable of displaying the impacts of individual neutrons.When the neutron beam is turned on, bright flashes are seen at points onthe detector screen. Each individual event occurs at a particular point on thedetector, and does not appear as a continuous ring. With time, an obvious biasappears, where the points of detection are most frequently at the positionsof the rings and spots of the diffraction pattern. This behavior motivatesthe interpretation of the neutron wavefunction in terms of probabilities –specifically, the neutron probability is the neutron wavefunction times itscomplex conjugate (which gives a real number). Usually this probabilisticinterpretation can be ignored when we consider a diffraction pattern frommany neutrons, and we can consider neutron diffraction as the diffractionof any other type of wave. When individual neutron events are considered,however, we may have to recall the probabilistic interpretation of the neutronwavefunction because individual neutron detections look like particles ratherthan waves.

Another point to remember is that the wave behavior is a characteristicof an individual neutron. When considering a diffraction pattern involving

Page 39: Experimental Inelastic Neutron Scattering - Caltech Center for

26 2. Scattering

multiple neutrons, we do not add the amplitudes of multiple wavefunctions.Neutrons are fermions, and do not form coherent states as in Bose condensa-tion, for example. At the viewing screen, we add the intensities of individualneutrons. The interactions between different neutrons are not coherent.

Our picture of scattering begins with one neutron as a wave incident onan atom. This wave looks like a plane wave because it comes from a distantsource. The wave interacts with the nucleus or magnetic electron cloud of theatom, and an outgoing wave is generated. This outgoing wave is somethinglike a spherical wave originating at the atom, although its intensity is notisotropic. Figure 2.3 shows the geometry, wavevectors and position vectorsfor our neutron scattering problem. Here both r and r′ are large comparedto the size of the scatterer. Our plane wave incident from the left, Ψinc, is ofthe standard form:

Ψinc = ei(ki·r′−ωt) . (2.16)

In what follows we neglect the time dependence to emphasize the manipu-lations of the spatial coordinates. We later recover the time-dependence bymultiplying our results by e−iωt. A spherical wave, Ψsc, travels outwards fromthe center of scattering. The scattered wave has the form:

Ψsc = f(ki,kf)eikf |r−r′||r − r′| , (2.17)

where the scattering length f(ki,kf) of Sect. 2.1.2 varies with the orientationof ki and kf , r′ is now used to locate the center of the scatterer, and thedifference, r − r′, is the distance from the scatterer to the detector. Theintensity of Ψsc falls off with distance as 1/r2, as we expect:

Isc = Ψ∗scΨsc =∣∣f(ki,kf)

∣∣2 e−ikf |r−r′||r − r′|

eikf |r−r′||r − r′| , (2.18)

Isc =∣∣f(ki,kf)

∣∣2 1|r − r′|2

. (2.19)

∆k

k0

r'

AA

r

k

detector

r–r'k

–k0

Fig. 2.3. Wavevectorsand position vectorsfor neutron scattering.

Page 40: Experimental Inelastic Neutron Scattering - Caltech Center for

2.2 Born Approximation 27

2.2.1 Green’s Function

To obtain the scattering length f(ki,kf), we must solve the Schrodinger equa-tion for the incident neutron inside the scattering atom (the mass of theneutron is m, and its coordinates in the atom are r′):

− 2

2m∇2Ψ(r′) + V(r′)Ψ(r′) = E Ψ(r′) , (2.20)

2

2m∇2Ψ(r′) + E Ψ(r′) = V(r′)Ψ(r′) , (2.21)

which we write as:(∇2 + k2

i

)Ψ(r′) = U(r′)Ψ(r′) , (2.22)

after having made the two definitions:

k2i ≡

2mE

2, (2.23)

U(r′) ≡ 2mV(r′)2

. (2.24)

The formal approach to finding the solution of the Schrodinger equationin this problem makes use of Green’s functions. A Green’s function, G(r, r′),provides the response at r for a point scatterer at r′:(

∇2 + k2i

)G(r, r′) = δ(r′) . (2.25)

We find the Green’s function in a quick way by starting with an identity:

∇2 eikr

r= eikr∇2 1

r− k2 eikr

r, (2.26)(

∇2 + k2) eikr

r= eikr∇2 1

r, (2.27)

Recall that:

∇2 1r

= −4πδ(r) , so (2.28)(∇2 + k2

) eikr

r= −eikr4πδ(r) . (2.29)

The right hand side simplifies because it equals zero everywhere except atr = 0, due to the nature of the δ-function. At r = 0, however, eikr = 1. Fromour identity (2.26) we therefore obtain:(

∇2 + k2) eikr

r= −4πδ(r) . (2.30)

We make a shift of the origin: r → r− r′ (so we can see more easily how theoutgoing wave originates at the scatterer – see Fig. 2.3). After doing so, wecan identify our Green’s function by comparing (2.25) and (2.30):

Page 41: Experimental Inelastic Neutron Scattering - Caltech Center for

28 2. Scattering

G(r, r′) = − 14π

eikf |r−r′||r − r′| . (2.31)

With our Green’s function in hand, we construct Ψscatt(r) by integrating.The idea is that to obtain the total wave amplitude at r, we need to add upthe spherical wavelet amplitudes emanating from all r′ (each of form (2.31)),weighted by their strengths. This weight is the right-hand side of (2.22).Formally, the limits of integration cover all of space, but in fact it is onlyimportant to extend them over the r′ where U(r′) is non-zero (approximatelythe volume of the atom).

Ψsc(r) =∫

U(r′)Ψ(r′)G(r, r′) d3r′ . (2.32)

The total wave at r, Ψ(r), has both incident and scattered components:

Ψ = Ψinc + Ψsc , (2.33)

Ψ(r) = eiki·r +2m2

∫V(r′)Ψ(r′)G(r, r′) d3r′ . (2.34)

2.2.2 First Born Approximation

Up to here our solution is exact. It is, in fact the Schrodinger equation it-self, merely transformed from a differential equation to a integral equationappropriate for scattering problems. The problem with this integral equation(2.32) is that Ψ appears both inside and outside the integration, so an ap-proximation is generally required to proceed further. The approximation thatwe use is the “first Born approximation.” It amounts to using a plane wave,the incident plane wave, for Ψ in the integral:

Ψ(r′) eiki·r′ . (2.35)

The first Born approximation assumes that the wave is undiminished andscattered only once by the material. This assumption is valid when the scat-tering is weak.

We simplify (2.31) by making the approximation that the detector is farfrom the scatterer. This allows us to work with plane waves at the detec-tor, rather than outgoing spherical waves. To do so we align the outgoingwavevector kf along (r − r′) as shown in Fig. 2.3. The product of scalars,kf |r − r′|, in the exponential of a spherical wave emitted from r′, is thenequal to kf · (r − r′) of a plane wave,

G(r, r′) − 14π

eikf ·(r−r′)

|r| . (2.36)

In (2.36) we also assumed that the origin is near the scatterer, so |r| |r′|,simplifying the denominator of our Green’s function.4

4 If we neglect a constant prefactor, this assumption of |r − r′| = |r| is equivalentto assuming that the scatterer is small compared to the distance to the detector.

Page 42: Experimental Inelastic Neutron Scattering - Caltech Center for

2.2 Born Approximation 29

Returning to our exact integral equation (2.34), we obtain the approxi-mate scattered wave (the first Born approximation for the scattered wave)by using (2.35) and (2.36) in (2.34):

Ψ(r) eiki·r − m

2π2

∫V(r′) eiki·r′ e

ikf ·(r−r′)

|r| d3r′ , (2.37)

Ψ(r) = eiki·r − m

2π2

eikf ·r

|r|

∫V(r′) ei(ki−kf )·r′d3r′ . (2.38)

If we define:5

Q ≡ ki − kf , (2.39)

Ψ(r) = eiki·r − m

2π2

eikf ·r

|r|

∫V(r′) eiQ·r′d3r′ . (2.40)

The scattered part of the wave is:

Ψsc(Q, r) =eikf ·r

|r| f(Q) , where : (2.41)

f(Q) ≡ − m

2π2

∫V(r′) eiQ·r′d3r′ . (2.42)

The factor f(Q) is the scattering factor of (2.17), which we have found todepend on the incident and outgoing wavevectors only through their differ-ence,Q ≡ ki−kf . We recognize the integral of (2.42) as the Fourier transformof the potential seen by the incident neutron as it goes through the scatterer.In the first Born approximation:

The scattered wave is proportional to theFourier transform of the scattering potential.

The factor f(Q) of (2.42) is given various names, depending on the potentialV (r) (we changed notation: r′ → r). When V (r) is the potential of a singleatom, Vat(r), we define fel(Q) as the “atomic form factor”:

fel(Q) ≡ − m

2π2

∫Vat(r) eiQ·rd3r . (2.43)

Alternatively, we can use the potential for the entire crystal for V(r) in (2.42)(and develop the kinematical theory of diffraction). When V(r) refers to theentire crystal, however, the first Born approximation of 2.40 is generally notreliable because multiple scattering will invalidate the assumption of (2.35).This assumption is, nevertheless, the basis for the “kinematical theory ofdiffraction,” which we develop for its clarity and its qualitative successes.It is possible to transcend formally the single scattering approximation, anddevelop a “dynamical theory” of neutron diffraction by considering higher-order Born approximations, but this has not proved a particularly fruitfuldirection. Modern dynamical theories take a completely different path.5 Sadly, the diffraction vector for elastic scattering is defined as−Q = ∆k ≡ kf−ki

Page 43: Experimental Inelastic Neutron Scattering - Caltech Center for

30 2. Scattering

2.2.3 Higher-Order Born Approximations

Nevertheless, it is not difficult in principle to extend the Born approximationto higher orders. Instead of using an undiminished plane wave for Ψ(r′), wecould use a Ψ(r′) that has been scattered once already. Equation (2.34) givesthe second Born approximation if we use do not use the plane wave of (2.35)for Ψ(r′), but rather:

Ψ(r′) = eiki·r′ +2m2

∫V(r′′)Ψ(r′′)G(r′, r′′) d3r′′ , (2.44)

where we now use a plane wave for Ψ(r′′):

Ψ(r′′) eiki·r′′ . (2.45)

The second Born approximation involves two centers of scattering. The firstis at r′′ and the second is at r′ (as shown in Fig. 2.4). The second and higherBorn approximations are not used very frequently. If the scatterer is strongenough to violate the condition of weak scattering used in the first Bornapproximation, the scattering will also violate the assumptions of the secondBorn approximation.

r

r'

r" G(r',r")

G(r,r')

Fig. 2.4. Coordinates for the second Born approximation. The neutron path isshown as the dark arrows, which are labeled by the relevant Green’s functions.

2.3 Essence of Coherent Inelastic Scattering

2.3.1 Spherical Waves from Point Scatterers

An intuitive shortcut from (2.25) to (2.32) is to regard (∇2 +k2i ) as a scatter-

ing operator that generates a scattered wavelet proportional to U(r′)Ψ(r′).The scattered wavelet must have the properties of (2.17) for its amplitudeand phase versus distance. The scattered wavelet amplitude emitted from asmall volume, d3r′, centered about r′ is:

dΨsc(r, r′) = U(r′)Ψ(r′)ei(kf |r−r′|−ω0t)

|r − r′| d3r′ . (2.46)

Page 44: Experimental Inelastic Neutron Scattering - Caltech Center for

2.3 Essence of Coherent Inelastic Scattering 31

This is an expression for a spherical wave at r originating from the smallvolume d3r surrounding r′. It is isotropic – note that the exponential factorkf |r − r′| is a product of scalars.

In using the approach from the previous section with static potentials,|ki| = |kf |. This remains true in an average sense in the present section wherewe assign a time-dependence to U(r′). Notice from (2.46) that the amplitudeof the scattered wave is modulated by U(r′). In the present section, we seethat the Fourier component of U(r′) with frequency ω gives a frequencymodulation to the scattered wave, whose frequency of ω0 is changed to ω0±ω.

We obtain the total scattered wave by integrating around all volume ofthe scatterer. The incident plane wave, ∝ eiki·r′ (2.35), helps sets the phaseof the scattering at each volume interval. The phase of the outgoing wave alsodepends on the orientation of the outgoing kf with respect to the positionof the scattering point, r′. The relative phase from each scattering pointdepends on the change in wavevector, Q ≡ ki − kf , as eiQ·r′ .

Ψsc(Q, r) = −ei(kf ·r−ω0t)

|r|m

2π2

∫V(r′) eiQ·r′d3r′ . (2.47)

In arriving at (2.46) we have repeated, in an intuitive way, the steps to (2.41)and (2.42).

The trick now is to replace the potential, V(r), with a suitable poential forneutron scattering. For nuclear scattering, relevant to phonon measurements,we use the “Fermi pseudopotential,” which places all the potential at a pointnucleus:

Vnuc(r) = 4π

2

2mb δ(r) , (2.48)

where b is a simple constant (perhaps a complex number). For thermal neu-trons, the δ-function is an appropriate description of the shape of a nucleus.6

The next step is to place independent Fermi pseudopotentials at the nuclearcoordinates, Rj , of all atoms in the crystal.

2.3.2 Time-Varying Potentials

We need to allow the centers of the δ-functions to move around, as the atomsvibrate and their nuclei change positions in time. Our potential is:

V(r) = 4π

2

2m

∑j

bj δ(r −Rj(t)) , (2.49)

where we anticipate that the nuclei will move with time. Substituting (2.49)into (2.47):

6 For magnetic scattering, however, the δ-function should be convoluted with areal-space form factor for the magnetic electrons. This could be done at the endof the calculation by multiplying the k-space result with a form factor.

Page 45: Experimental Inelastic Neutron Scattering - Caltech Center for

32 2. Scattering

Ψsc(Q, r, t) = −ei(kf ·r−ω0t)

|r|

∫ ∑j

bj δ(r′ −Rj(t))) eiQ·r′d3r′ . (2.50)

The integration over the δ-functions of (2.50) provides a function at set ofpoints at the nuclear positions Rj(t):

Ψsc(Q, r, t) = −ei(kf ·r−ω0t)

|r|∑j

bj eiQ·Rj(t) . (2.51)

We can often ignore the details of sherical waves, since we may not be con-cerned with the absolute intensity or absolute phase of the neutron. A usefulstarting point for further work7 is the simplified form:

ψsc(Q, t) =∑j

bj eiQ·Rj(t) . (2.52)

It is convenient to separate the static and dynamic parts of the nuclearposition at each unit cell (unit cell indices are l, κ for lattice, basis, eachrequiring its own sum):

Rj(t) = xl,κ + ul,κ(t) , (2.53)

Ψsc(Q, r) = −ei(kf ·r−ω0t)

|r|

×∫ ∑

l,κ

bl,κ δ(r′ − xl,κ − ul,κ(t)) eiQ·r′d3r′ . (2.54)

The integral property of the δ-function is handy for selecting the non-vanishing values of r′:

Ψsc(Q, r) = −ei(kf ·r−ω0t)

|r|∑l,κ

bl,κ eiQ·(xl,κ+ul,κ(t)) . (2.55)

When Q · u is small, we can expand the exponential in (2.55) to obtain:

Ψsc(Q, r) = −ei(kf ·r−ω0t)

|r|

×∑l,κ

bκ eiQ·xl,κ(

1 + iQ · ul,κ(t)−12(Q · ul,κ(t))2 + . . .

).(2.56)

7 In what follows, it will be important to consider how the scattering contributionsto ψsc(Q, t) depend on positions and time. The intensity, I(Q, E), which origi-nates from b∗(r′, t′)b(r, t), depends on the four positions and times, r′, t′, r, t,but not on all four values independently. The intensity depends on correlationsbetween them. Section 2.5 shows that the Van Hove correlation function in spaceand time expresses what we need to know to calculate the inelastic intensity,I(Q, E).

Page 46: Experimental Inelastic Neutron Scattering - Caltech Center for

2.3 Essence of Coherent Inelastic Scattering 33

2.3.3 Elastic Neutron Scattering

For now, neglect the time-dependence of the scattering potential, which re-stricts us to the case of elastic scattering. Without dynamics, we note thatbκ depends only on κ, not l, since all unit cells have identical atom arrange-ments. The first term in (2.56) gives the familiar coherent elastic scattering,Ψ el

sc(Q, r), as we expect because it involves the static part of the structure:

Ψ elsc(Q, r) = −ei(kf ·r−ω0t)

|r|∑l,κ

bκ eiQ·xl,κ . (2.57)

By writing xl,κ as a sum of a lattice vector xl plus a basis vector xκ:

xl,κ = xl + xκ , (2.58)

and neglecting the factor for the outgoing spherical wave:

Ψ elsc(Q, r) =

∑xκ

bκ eiQ·xκ∑xl

eiQ·xl ≡ F(Q)S(Q) . (2.59)

Here we separated the sums over basis and lattice vectors into a structurefactor, F(Q), and a shape factor, S(Q). We could use (2.59) (with a Debye-Waller factor) to calculate the neutron diffraction pattern from a crystal.Equation (2.59) is central to the diffractometry of materials.

2.3.4 Phonon Scattering

The next term in (2.56), involving Q · ul,κ(t), is new. It gives the inelas-tic scattered wave, Ψ inel

sc (Q, r). To calculate it, we use the phonon solution,ul,κ(ω(q), t), for a particular q, ω:

ul,κ(ω(q), t) =Uκ(q)√2Mκω(q)

ei(q·xl−ω(q)t) . (2.60)

The phase factor, eiq·xl,κ(t), provides all the long-range spatial modulation oful,κ(q, t). The dependence on κ, a short-range basis vector index, is takenout of the phase factor and placed in the complex constant Uκ(q).

The energy of a phonon is quantized in units of ω, and we want theenergy to increase by ω for each additional phonon in the state ω(q). Thisis the source of the denominator in (2.60). It is convenient for the Uκ(q)of (2.60) to have modulus unity, as does the exponential. Nevertheless, theul,κ(ω(q), t) must have a maximum displacement, X , which gives the totalenergy of the harmonic oscillator. Since this total energy must equal ω forthe smallest excitation:

12Mω2X 2 , (2.61)

X =

Mω. (2.62)

Page 47: Experimental Inelastic Neutron Scattering - Caltech Center for

34 2. Scattering

Normalizing the amplitude in (2.60) by√Mω ensures this consistency be-

tween amplitude and energy, while allowing Uκ(q) to have modulus unity.Details such as the factor of

√2 require a more complete quantum mechanical

development.After substitution of (2.60), the second term in (2.56) gives an inelastically-

scattered wave:

Ψ inelsc (Q, r) = − i ei(kf ·r−ω0t)

|r|

×∑l,κ

bκ√2Mκω(q

(Q ·Uκ(q)

)eiQ·xl ei(q·xl−ω(q)t) , (2.63)

and making a parallel decomposition into lattice plus basis vectors as in(2.58):

Ψ inelsc (Q, r) = − i eikf ·r

|r| e−i(ω0+ω)t

×∑xκ

bκ√2Mκω(q

(Q ·U l,κ(q)

)ei(q+Q)·xκ

∑xl

ei(q+Q)·xl .(2.64)

We recognize the last sum (over rl) as a sum over phase factors that generatea diffracted wave from a simple lattice. It will produce a series of Bragg peaksat reciprocal lattice vectors:∑

xl

ei(q+Q)·xl =(2π)3

V0

∑g

δ((q +Q)− g

). (2.65)

Note that this is the momentum conservation condition: (q + Q) · rl =2πinteger. Momentum conservation is seen directly for coherent inelastic scat-tering – the scattering wavevector,Q, must equal the (negative of the) phononvector q plus a reciprocal lattice vector g. The prefactor in (2.65) is the vol-ume of a unit cell in the reciprocal lattice, where V0 is the volume of the unitcell of the crystal. Substituting into (2.64):

Ψ inelsc (Q, r) = − i eikf ·r

|r| e−i(ω0+ω)t (2π)3

V0

×∑xκ

bκ√2Mκω(q

(Q ·U l,κ(q)

)ei(q+Q)·xκ δ

((q +Q)− g

).(2.66)

The scattered wave, Ψ inelsc (Q, r), has the temporal frequency ω0 + ω, dif-

fering from the frequency ω0 of the incident wave. The inelastically-scatteredneutron therefore differs in energy by the amount ω from the incident neu-tron. This energy conservation condition can also be written as a δ-function,δ(ω − ω(q)).

Page 48: Experimental Inelastic Neutron Scattering - Caltech Center for

2.3 Essence of Coherent Inelastic Scattering 35

2.3.5 Intensity from Wave Amplitude

The next step is to get the double-differential scattering cross-section forcoherent inelastic scattering, d2σ/dΩ dE. With reference to Fig. 2.2, thisquantity assigns an energy spectrum to each cone of beam filling the rangein solid angle dΩ (to the right of the scatterer). The intensity at each pieceof solid angles and in each energy range is the maximum information that wecould expect from experimental data. We obtain d2σ/dΩ dE by calculating|Ψ inel

sc |2 of (2.66) by taking |Ψsc|2, and ignoring the intensity factor of r−2

(cf. (2.9), (2.19)). A question that might arise is if there could be cross-terms between Ψ inel

sc and Ψ elsc. If so, it might be necessary to calculate the

total scattered wave from (2.55), rather than (2.66), a greater effort sincethere will be twice as many sums that will have to be reduced by takingdifferences between different atom positions at different times. These cross-terms are zero, however, and this can be understood by a physical argument.As described after (2.66), the frequencies of the incident and scattered wavesare mismatched. Integrated over many periods of the neutron wavefunction,these mismatched waves will not add constructively or destructively. Thereis no coherent interaction between Ψ inel

sc and Ψ elsc that requires calculation.

Incidentally, such interactions if they were to exist, would be quantum beatsof the wavetrains, but we ignore them in the present analysis because we donot have sufficient time resolution at the detector to sense them.

The only subtlety in calculating |Ψ inelsc (Q, r)|2 is handling the δ-functions.

The square of a δ-function is a δ-function, δ2(x) = δ(x). Alternatively, onecan think of δ(Q + q ± g) and δ(ω − ω(q)) as enforcing the conservation ofmomentum and conservation of energy on the neutron scattering process, andthese conditions must hold for both the neutron wavefunction amplitude andits probability distribution. To keep an appropriate density of δ-functionsin k-space requires that we keep the same factor (2π)3/2V0. For coherentinelastic phonon scattering:

d2σ

dΩ dE=

kf

ki

(2π)3

2V0

∑g,q

n(q) + 12 ± 1

2

ω(q)

×∣∣∣ ∑

κ

bκ√Mκ

e−Wκ(Q)[Q ·U l,κ(q)

]eiQ·xκ)

∣∣∣2× δ(Q+ q ± g) δ(ω − ω(q)) , (2.67)

where the phonon occupancy factor, n(q), is the Bose-Einstein distribution:

n(q) =1

eω(q)/kBT − 1. (2.68)

The signs in the factor n(q) + 12 ± 1

2 in (2.67) are such that it is n(q) + 1for phonon creation, and n(q) for phonon annihilation – it is always possibleto create a phonon, even at T = 0 when no phonon excitations are present.A new factor in (2.67) is the ratio kf/ki, which expresses the effect on flux

Page 49: Experimental Inelastic Neutron Scattering - Caltech Center for

36 2. Scattering

caused by the rate at which neutrons leave the sample. Compared to anelastically-scattered neutron, fewer neutrons per second will pass into a solidangle if they are slowed to smaller values of kf . Another new factor is theDebye–Waller factor, e−Wκ(Q). Finally, we note that the phonons on differentbranches must be considered separately in (2.67), and it is traditional to adda “branch index,” sometimes denoted γ, to ω(q), since more than one ωγ maycorrespond to a specific q.

2.4 Correlation Function for Elastic Scattering – ThePatterson Function

2.4.1 Overview

In much of Chapter 2, scattering theory has been developed by calculatingthe amplitude of the wave scattered from crystals with excitations or dis-order. The amplitude of the diffracted wave, ψ, is the sum of phase factorsof wavelets emitted from individual atoms. For elastic scattering, which weconsider presently, the phase information in ψ(Q) includes details of atompositions, which can be obtained by inverse Fourier transformation, F−1ψ.We then calculate the intensity I(Q) = ψ∗ψ.

This Sect. 2.4 takes a different approach of calculating directly thediffracted intensity I(Q), rather than calculating it as ψ∗ψ. In this new ap-proach, the real space information is obtained with the Fourier inversionF−1I, rather than F−1ψ, but this sacrifices some information about atompositions. Nevertheless, the intensity is the actual quantity measured in adiffraction experiment, so this new approach offers a more rigorous under-standing of what structural information is available from diffraction exper-iments. Furthermore, in cases of severely disordered materials, there maybe no obvious way to obtain the atom positions needed for a calculation ofψ(Q). For problems involving severe structural disorder, another advantageof direct manipulations of I(Q) is that a convenient reference state proves tobe a homogeneous distribution of scatterers, or uncorrelated scatterers as inan ideal gas. A powerful tool for calculating diffraction intensities from suchmaterials (and regular crystals too) is the “Patterson function,” defined inSect. 2.4.3 as an autocorrelation function of the scattering factor distribution.Whereas the diffracted wave, ψ(Q), is the Fourier transform of the scatteringfactor distribution, the diffracted intensity, I(Q), is the Fourier transform ofthe Patterson function of the scattering factor distribution.The Patterson function is a function in real space, with argument r. The Pat-terson function is a convolution, so the reader should be familiar with convo-lutions and the convolution theorem (Sect. A.1) before reading the presentchapter. The presentation here of real-space correlation functions is goodpreparation for the discussion that follows on space-time correlation func-tions. We begin by proving the emphasized statement above. The subsequent

Page 50: Experimental Inelastic Neutron Scattering - Caltech Center for

2.4 Correlation Function for Elastic Scattering – The Patterson Function 37

section uses the Patterson function to explain diffraction phenomena involv-ing displacements of atoms off of periodic positions owing to temperature.

2.4.2 Atom Centers at Points in Space

The most important results in this chapter are obtained by assuming thescatterers are points. At each point, rj , resides the scattering strength of oneentire atom, frj (or one unit cell). The actual shape of the atom is includedlater by convolution, and does not change the main results obtained withpoint atoms.

It proves convenient to consider a distribution of scatterers, f(r), witha continuous variable, r, rather than a sum over discrete points, rj. Wechange variables as:

ψ(Q) =N∑rj

frje−iQ·rj =

∞∫−∞

f(r) e−iQ·rd3r . (2.69)

To equate a continuous integral to a discrete sum requires that f(r) is nota smooth function of position. Over most of space f(r) is zero, but at atomcenters such as r = ri, f(ri) is a Dirac delta function times a constant, fri :

f(ri) = friδ(r − ri) . (2.70)

Recall the important property of the Dirac delta function:

y(x′) =

∞∫−∞

δ(x− x′) y(x) dx . (2.71)

Equation (2.71) requires that δ(x−x′) is zero everywhere, except at the pointx = x′. At this point the delta function is infinitely high, but of unit area, sothe integral of (2.71) picks out only the value of y(x) at x′. To extend (2.70)to include many atom centers, we take the sum over rj :

f(r) =N∑rj

frjδ(r − rj) , (2.72)

so we satisfy the equality in (2.69) between points in space, rj, and acontinuous function of r. We include the shape of the atomic form factor,fat(r), in Sect. 2.4.5.

2.4.3 Definition of the Patterson Function

We define the “Patterson function,” P (r):

P (r) ≡∞∫−∞

f∗(r′)f(r + r′) d3r′ . (2.73)

Page 51: Experimental Inelastic Neutron Scattering - Caltech Center for

38 2. Scattering

Equation (2.73) is a convolution. Since the function f(r) is not inverted inthe usual way for a convolution, we write:

P (r) = f∗(r) ∗ f(−r) , (2.74)

This is a specific type of convolution known as an “autocorrelation function,”sometimes denoted with a special symbol:

P (r) = f(r) f(r) . (2.75)

The most important feature of the Patterson function is that its Fouriertransform is the diffracted intensity in kinematical theory. To show this, weuse (2.69) to write I(Q) = ψ∗ψ as:

I(Q) =

∞∫−∞

f∗(r′) eiQ·r′d3r′∞∫−∞

f(r′′) e−iQ·r′′d3r′′ . (2.76)

Since r′ and r′′ are independent variables:

I(Q) =

∞∫−∞

( ∞∫−∞

f∗(r′)f(r′′) e−iQ·(r′′−r′)d3r′′)

d3r′ . (2.77)

Define r ≡ r′′−r′, and change variables r′′ → r+r′. In so doing, the limits ofintegration for r are shifted by −r′, but this is not of concern for integrationsperformed over all of space:

I(Q) =

∞∫−∞

( ∞∫−∞

f∗(r′)f(r + r′) e−iQ·rd3r)

d3r′ , (2.78)

I(Q) =

∞∫−∞

( ∞∫−∞

f∗(r′)f(r + r′)d3r′)e−iQ·rd3r . (2.79)

Using the definition of (2.73), we rewrite (2.79):

I(Q) =

∞∫−∞

P (r) e−iQ·rd3r . (2.80)

Equation (2.80) shows that the diffracted intensity is the Fourier transformof the Patterson function:

I(Q) = FP (r) , (2.81)

and by the inverse transformation we must have:

P (r) = F−1I(Q) . (2.82)

For comparison, the diffracted wave, ψ(Q) of (2.69), is the Fourier trans-form of the scattering factor distribution, f(r). We therefore have anotherrelationship between I(Q) and f(r):

Page 52: Experimental Inelastic Neutron Scattering - Caltech Center for

2.4 Correlation Function for Elastic Scattering – The Patterson Function 39

I(Q) = ψ∗(Q)ψ(Q) , (2.83)

I(Q) =(Ff(r)

)∗Ff(r) =

∣∣Ff(r)∣∣2 . (2.84)

Comparing (2.81) and (2.84):

FP (r) =∣∣Ff(r)

∣∣2 . (2.85)

Equation (2.85) is consistent with the convolution theorem of Sect. A.1 –a convolution in real space (the Patterson function of (2.73)) correspondsto a multiplication in Fourier space (right-hand side of (2.85)). Note how(2.84) shows the effects of the flip and the complex conjugation of f(r) inthe convolution of (2.73):

F[f∗(r) ∗ f(−r)

]=

(Ff(r)

)∗Ff(r) =

∣∣f(Q)∣∣2 , (2.86)

as compared to:

F[f(r) ∗ f(r)

]= Ff(r) Ff(r) =

(f(Q)

)2. (2.87)

2.4.4 Properties of Patterson Functions

It is instructive to illustrate the steps in constructing a Patterson function(2.73). The steps in any convolution are shift, multiply, and integrate, and areshown in Fig. 2.5. Figure 2.5a shows the overlap of a function shifted by thedistance r against the original position shown as a dashed curve. To obtainthe Patterson function in Fig. 2.5b, at each shift the function was multipliedby its shifted counterpart, then integrated.

Note that the peaks of the Patterson function in Fig. 2.5b are broaderthan the peaks in the scattering factor distribution of Fig. 2.5a. Since thepeaks in Fig. 2.5a are Gaussian functions of equal width, the peaks in thePatterson function are broadened by a factor of

√2. Second, the periodicity

of the Patterson function is one lattice constant, a. This is expected, since theoverlap of the peaks in the function of Fig. 2.5a is maximized each time theshift equals an integral number of lattice constants. The intensities of theseprimary maxima are proportional to A2 +B2. There are secondary maximathat occur at shifts of ±0.3 when the large peak overlaps the small peak. Theintensities of these secondary maxima are proportional to AB. The Pattersonfunction has a peak at each distance corresponding to a separation betweenthe peaks in Fig. 2.5a.

The Patterson function, P (r) of Fig. 2.5b, has a higher symmetry thanthe f(r) of Fig. 2.5a. Identical secondary peaks occur in P (r) when the largepeak is shifted to the right by +0.3a and overlaps the small peak, or whenthe small peak is shifted to the left by −0.3a and overlaps the large peak. Forthis reason, even when f(r) has no center of inversion, P (r) has inversionsymmetry. The Patterson function is unchanged if the original function is

Page 53: Experimental Inelastic Neutron Scattering - Caltech Center for

40 2. Scattering

Fig. 2.5. (a) Shifts of a function of period, a, with respect to itself. The shift,r = r′′ − r′, is labeled at right in units of a. (b) The Patterson function, obtainedby integrating the product of the solid and dashed curves for all shifts, r.

inverted.8 Equation (2.82) shows that the measured x-ray diffraction intensityprovides the Patterson function, not the scattering factor distribution. Wetherefore have “Friedel’s law”:Diffraction experiments cannot distinguish between an atom arrangement andthe atom arrangement when it is inverted.

This is sometimes called the “phase problem” in structure determination,since the phase of the diffracted wave ψ(Q) is not measured, only its intensity,ψ∗ψ.

2.4.5 Perfect Crystals

In working problems with Patterson functions, it is often convenient to writethe scattering factor distribution for an entire crystal, f(r), in the followingway:8 You can obtain the same P (r) by taking the mirror image of the f(r) in Fig.

2.5a (with the small peak to the immediate left of the large peak), and repeatingthe construction.

Page 54: Experimental Inelastic Neutron Scattering - Caltech Center for

2.4 Correlation Function for Elastic Scattering – The Patterson Function 41

f(r) = fat(r) ∗∑Rn

δ(r −Rn) . (2.88)

Here fat(r) is the form factor of one atom. In (2.88) the form factor of theatom is convoluted with a sum of delta functions, each centered at a differentatom site, Rn. We evaluate (2.88) by first writing explicitly the convolution:

f(r) =

∞∫−∞

fat(r′)∑Rn

δ(r − (r′ −Rn)

)d3r′ . (2.89)

Rearranging the operations on independent variables:

f(r) =∑Rn

∞∫−∞

fat(r′) δ(r − (r′ −Rn)

)d3r′ . (2.90)

The integral of (2.90) serves to pick out the value of fat(r′) at the location ofthe delta function, cf., (2.71). By shifting the delta function continuously byr′, the shape of fat(r) is generated around the center of each delta function.These centers are each atom site, Rn, so after the integration of (2.90):

f(r) =∑Rn

fat(r −Rn) . (2.91)

Please compare (2.88) and (2.91).The Patterson function of an infinite one-dimensional perfect crystal,

P0(x), is:

P0(x) = f∗(x) ∗ f(−x) , (2.92)

which we write using (2.88) for N atoms:

P0(x) =(f∗at(x) ∗

+∞∑n′=−∞

δ(x− n′a))∗

(fat(−x) ∗

−∞∑n′′=+∞

δ(n′′a− x)).

(2.93)

Convolutions are commutative and associative, so we rearrange (2.93):

P0(x) =(f∗at(x) ∗ fat(−x)

)∗

( +∞∑n′=−∞

δ(x− n′a))

∗( −∞∑n′′=+∞

δ(n′′a− x)). (2.94)

Recall that a convolution of two functions requires a shift, overlap, multi-plication, and integration. Because the δ-functions are infinitesimally narrow,there is zero overlap of the two series of δ-functions unless the shift, x, satisfiesthe condition x = na, where n is an integer. Therefore:

Page 55: Experimental Inelastic Neutron Scattering - Caltech Center for

42 2. Scattering( ∞∑n′=−∞

δ(x− n′a))∗

( ∞∑n′=−∞

δ(x− n′a))

= N ′( ∞∑n=−∞

δ(x− na)). (2.95)

Here N ′ = ∞, which is as expected for an infinite number of overlaps of aninfinite chain of atoms. For a chain of N atoms, the Patterson function is:

P0(x) = N(f∗at(x) ∗ fat(−x)

)∗

( ∞∑n=−∞

δ(x− na)), (2.96)

The Fourier transformation of P0(x) provides the diffracted intensity,I(Q). By the convolution theorem of Sect. A.1, the two convolutions andone multiplication of (2.96) become, after Fourier transformation, two mul-tiplications and one convolution. Using (2.86):

I(Q) = N∣∣fat(Q)

∣∣2 ∗ F[ ∞∑n′=−∞

δ(x− n′a)]. (2.97)

The Fourier transform of the δ-function series is:

F[ ∞∑n′=−∞

δ(x− n′a)]

=

∞∫−∞

e−iQx∞∑

n′=−∞δ(x− n′a) dx . (2.98)

The condition Qa = 2πh (where h is an integer) must be satisfied, or theintegration over an infinite range of x is zero. The k-space Fourier transformis therefore zero except when Q = 2πh/a precisely, so:

F[ ∞∑n′=−∞

δ(x− n′a)]

= N

∞∑h=−∞

δ(Q− 2πh/a) = N∑g

δ(Q− g) . (2.99)

Here again N is the number of terms in the sum in (2.99). In a formal problem,N becomes a mathematical infinity, but it is useful to keep the N because itshows the proportionality to the size of the crystal. The diffraction intensityof (2.97) is:

I(Q) = N2∣∣fat(Q)

∣∣2[ ∞∑h=−∞

δ(Q− 2πh/a)]. (2.100)

Equation (2.100) is a familiar result in a new form. The series of δ-functions gives the centers of the Bragg peaks from the crystal. These peaksare still sharp, but are attenuated at large Q by the atomic form factor in-tensity, |fat(Q)|2.

2.4.6 Deviations from Periodicity

In many cases of interest, a scattering factor distribution, f(r), can be ex-pressed as the sum of a perfectly periodic function, 〈f(r)〉, plus a deviation

Page 56: Experimental Inelastic Neutron Scattering - Caltech Center for

2.4 Correlation Function for Elastic Scattering – The Patterson Function 43

function, ∆f(r), which provides the random or semi-random deviations fromperfect periodicity. We know that the perfectly periodic function, 〈f(r)〉, pro-vides sharp Bragg diffractions, but how does the deviation function, ∆f(r),affect the diffracted intensity? To find out, we calculate the Patterson func-tion of f(r):

f(r) = 〈f(r)〉+∆f(r) , (2.101)P (r) ≡ f∗(r) ∗ f(−r) , (2.102)P (r) = 〈f∗(r)〉 ∗ 〈f(−r)〉+ 〈f∗(r)〉 ∗∆f(−r)

+∆f∗(r) ∗ 〈f(−r)〉+∆f∗(r) ∗∆f(−r) . (2.103)

Look at the second term in (2.103). We rewrite it with the aid of (2.85):

〈f∗(r)〉 ∗∆f(−r) =[〈f∗at(r)〉 ∗

∑Rn

δ(r −Rn)]∗∆f(−r) . (2.104)

Convolutions are associative, so we can group the second and third factorsin (2.104), and consider the new convolution:∑

Rn

δ(r −Rn) ∗∆f(−r) =∑Rn

∆f(−Rn) , (2.105)

where we used (2.71) in the same way as for (2.90)–(2.91). We assume thatthe deviation function, ∆f(−Rn), has zero mean value.9 Therefore:

x

Σδ(x–na)n∆f(x)

Fig. 2.6. Overlap of periodic delta functions,∑n δ(x−na), with a random function

of zero mean, ∆f(x). Since the deviation function ∆f(r) has zero mean and is non-periodic, the periodic delta functions overlap ∆f(−r) at as many positive valuesas negative values, demonstrating (2.106).

∑Rn

δ(r −Rn) ∗∆f(−r) = 0 . (2.106)

The second term for P (r) in (2.103) is therefore zero (see also Fig. 2.6).Because Rn has precise periodicity over an infinite distance, (2.106) alsoholds true when ∆f(r) has short-range structure. By the same argument,the third term in (2.103) is also zero. Equation (2.103) becomes:9 This does not restrict generality because any non-zero mean could have been

transferred into 〈f(r)〉 in (2.101).

Page 57: Experimental Inelastic Neutron Scattering - Caltech Center for

44 2. Scattering

P (r) = 〈f∗(r)〉 ∗ 〈f(−r)〉+∆f∗(r) ∗∆f(−r) . (2.107)

The Patterson function for an alloy with disorder is reduced to two partsdefined as the two terms in (2.107): 1) a Patterson function from the averagecrystal, Pavge(r), and 2) a Patterson function from the deviation crystal,Pdevs(r):

P (r) = Pavge(r) + Pdevs(r) . (2.108)

The diffracted intensity is the Fourier transform of the Patterson functionof the alloy:

I(Q) = F[Pavge(r) + Pdevs(r)

], (2.109)

and since Fourier transforms are distributive:

I(Q) = F[Pavge(r)

]+ F

[Pdevs(r)

]. (2.110)

Equation (2.110) shows that the diffraction patterns from the average crys-tal, 〈f(r)〉, and the deviation crystal, ∆f(r), are additive. In terms of thediffracted waves from these average and deviation crystals (cf., (2.85)):

I(Q) =∣∣F 〈f(r)〉

∣∣2 +∣∣F [

∆f(r)]∣∣2 . (2.111)

We are familiar with the first term in (2.111), |F 〈f(r)〉 |2, which gives thesharp Bragg diffractions from the average crystal.

The second term in (2.111),∣∣F [

∆f(r)]∣∣2, is new. It is often a broad,

diffuse intensity, as we show next. We will also show that with increasingdisorder and larger ∆f(r), the sharp Bragg diffractions become weaker, andthe diffuse intensity becomes stronger. Two important sources of ∆f(r) ina crystalline alloy are atomic displacement disorder and chemical disorder.Atomic displacement disorder comprises small deviations of atoms from thesites of a perfect crystal. These displacements may be static, or dynamicas in the case of thermal motion. Chemical disorder exists when there israndomness in the species of atoms that occupy the sites of a crystal. Weconsider these two types of disorder in sequence.

2.4.7 Uncorrelated Displacements

Atomic displacement disorder exists when atoms do not sit precisely on theperiodic sites of a crystal. Atomic size differences in an alloy cause staticdisplacements from lattice sites, and thermal vibrations cause dynamic dis-placement disorder. Both cause diffuse scattering. Here we consider a simpletype of displacement disorder where each atom has a small, random shift, δ,off its site of a periodic lattice as shown in Fig. 2.7.

For now we assume there are no correlations between the displacements,δj , of neighboring atoms.10 The Patterson function, f(x) ∗ f(−x), for this

10 For example, we assume that if one atom is displaced to the left, its neighbor tothe right is equally likely to be displaced to the left or to the right.

Page 58: Experimental Inelastic Neutron Scattering - Caltech Center for

2.4 Correlation Function for Elastic Scattering – The Patterson Function 45

x'1a 2a 3a 4a 5a 6a 7a0–1a

δ1

Fig. 2.7. Atomic displacementdisorder in a one-dimensionalcrystal.

displacement distribution is shown in Fig. 2.8a. To understand this Pattersonfunction, consider the overlap of the atom center distribution with itself aftera shift of x = na + ξ, where a is the lattice parameter, n is an integer,and ξ is a small distance (typically ξ < a). With no correlation between thedisplacements of neighboring atoms, the probability of overlap of two atomcenters is the same for a shift of the crystal by many lattice constants, na+ξ,as it is for a shift of one lattice constant, 1a + ξ. The important exceptionoccurs around x = 0, i.e., when n = 0. All the atom centers overlap perfectlywith themselves when ξ is exactly zero, but even for the smallest shift, ξ = 0,there are zero overlaps of atom centers.

x–4a –3a –2a –a 0 a 2a 3a 4a

P (x)

a

x–4a –3a –2a –a 0 a 2a 3a 4a

P avge(x)

b

x–4a –3a –2a –a a 2a 3a 4a

P devs2 (x)x

–4a –3a –2a –a a 2a 3a 4a

P devs(x)

x–4a –3a –2a –a a 2a 3a 4a

P devs1(x)c

Fig. 2.8. (a) Patterson function for the random displacements of Fig. 2.7 and(2.108). (b) The Patterson function at top is the sum of Pavge(x) and Pdevs(x). (c)Pdevs(x) is the sum of Pdevs1(x) and Pdevs2(x).

Page 59: Experimental Inelastic Neutron Scattering - Caltech Center for

46 2. Scattering

The best way to work with the Patterson function in Fig. 2.8a is to breakit into periodic and non-periodic parts (2.108), as shown in the two plots inFig. 2.8b. The diffracted intensity from our crystal with displacement disorderis obtained from (2.110) as the sum of the Fourier transforms of these twofunctions, Pavge(x) and Pdevs(x). The Fourier transform of Pavge(x) is thewell-known series of Bragg peaks. These peaks are suppressed at large valuesof Q owing to the breadths of the peaks in Pavge(x) caused by displacementdisorder (see top of Fig. 2.9). This suppression of the Bragg peaks at largeQ is similar to the suppression caused by the atomic form factor, which alsobroadens the scattering centers of the atoms.

k0 1/a 2/a 3/a 4/a–4/a –3/a –2/a –1/a

k0 1/a 2/a 3/a 4/a–4/a –3/a –2/a –1/a

k0 1/a 2/a 3/a 4/a–4/a –3/a –2/a –1/a

devs1FP (x)

FP (x)avge

F( )+ +

devs2FP (x)

P (x)avge devs1 P (x) devs2P (x)

Fig. 2.9. The Fourier trans-form of the Patterson func-tions of Fig. 2.8. Fouriertransform of Pavge(x) (top),Fourier transforms of thetwo components of Pdevs(x)(middle). The sum of allthree components (bottom)is the diffraction intensityfrom our linear crystal withGaussian displacement dis-order.

The Fourier transform of Pdevs(x) is new for us. To understand its contri-bution to the diffraction intensity, we split Pdevs(x) into two parts, Pdevs1(x)and Pdevs2(x) (Fig. 2.8c). The first, Pdevs1(x), is a Dirac delta function, whoseFourier transform is a constant in k-space (F

[Pdevs1(x)

]in Fig. 2.9). The

second part, Pdevs2(x), is a short, broadened function with negative sign. (InSect. 2.4.8 we will consider it to be a Gaussian function.) Its Fourier trans-form, F

[Pdevs2(x)

], is also shown in Fig. 2.9. The areas of these two parts,

Pdevs1(x) and Pdevs2(x), are equal, since both arise from the same total num-ber of atom-atom overlaps (equal to the number of atoms, N). This has animportant consequence for the diffracted intensity at Q = 0:

I(Q=0) =

∞∫−∞

Pdevs(x) e−i0x dx =

∞∫−∞

Pdevs(x) dx , (2.112)

Page 60: Experimental Inelastic Neutron Scattering - Caltech Center for

2.4 Correlation Function for Elastic Scattering – The Patterson Function 47

which is simply the area of the Patterson function, Pdevs(x). Since Pdevs1(x)and Pdevs2(x) have equal and opposite areas, at Q = 0 there is zero diffusescattering from atomic displacement disorder.

The F[Pdevs2(x)

]has a negative sign that decreases in magnitude with

Q. The diffuse scattering therefore increases with Q, as the flat contributionoriginating from F

[Pdevs1(x)

]increasingly dominates over F

[Pdevs2(x)

]. The

function Pdevs2(x), incidentally, has the same shape as the individual peaksin Pavge(x). In this case the Q-dependence of the rolloff of the Bragg peaksis the same as the Q-dependence of the diffuse scattering. The effects of dis-placement disorder increase with the characteristic size of the displacements,δj . The larger the characteristic δ, the faster the rolloff of the Bragg peakswith Q, and the greater the intensity of the diffuse scattering.

2.4.8 Temperature

During thermal vibrations, the distances between atoms undergo rapidchanges with time. It is useful, however, to think of each x-ray scatteringevent as taking an instantaneous snapshot of the atom positions. The diffrac-tion data are averages of many different instantaneous atom configurations.Over a large crystal, however, each instantaneous snapshot looks approx-imately the same. The same argument of the previous section on atomicdisplacement disorder is then appropriate for understanding the diffractioneffects caused by thermal disorder in atom positions. This section uses asimple model of atom vibrations to calculate two effects of temperature:

• the Debye–Waller factor that causes the Bragg peaks to lose intensity,• the thermal diffuse scattering, which is where the “lost” intensity reap-

pears.11

A detailed analysis of thermal vibrations is not simple, because it shouldbe performed with knowledge of the polarizations and numbers of all phononmodes. A complete analysis considers the contribution of each phonon to therelative separation of each atom-atom pair in the solid. In phonons with longwavelengths, for example, neighboring pairs of atoms tend to move together.12

In contrast, high frequency phonons affect strongly the mutual displacementsof neighboring atoms. In addition, it is important to know how the atommotions within each phonon are oriented with respect to Q – atom motionsnearly perpendicular to Q have weak effects on the scattering. Calculatingthe Patterson function from the densities of phonons with all polarizations isa problem for computers, and is beyond the scope of this book.11 The total coherent cross-section remains constant.12 Another aspect of the problem is that a crystal has fewer long-wavelength than

short-wavelength vibrational modes. However, the lower energy of the long-wavelength modes means that their occupancy is higher at all temperatures,especially low temperatures.

Page 61: Experimental Inelastic Neutron Scattering - Caltech Center for

48 2. Scattering

Thermal vibrations broaden the Patterson function of the scattering fac-tor distribution. To develop a simple analytical model, we assume each atomcenter has a thermal spread around its crystal site that is a Gaussian functionof characteristic width, σ. (A plausibility argument for a Gaussian function isprovided in Appendix A.11.) For any nth neighbor pair of atoms, we expectthe vibrations of both atoms to affect the Patterson function. Suppose weplace a stationary atom 1 at a point in space. When an atom 2 vibrates withrespect to atom 1, there is a probability distribution for their interatomicseparation, x:

patom2(x) =1√π σ

e−x2/σ2

. (2.113)

This function is shown schematically in Fig. 2.10a. Now let atom 1 vibrate.For every interatomic separation provided by the thermal motion of the atom2, make a thermal distribution for the position of atom 1. To obtain the dis-tribution of separations between atoms 1 and 2, the displacement distributionof atom 2 serves to weight the displacement distribution of atom 1. The vari-ous weights are shown in Fig. 2.10b, and the weighted sum of the net thermaldistribution of atom 1 with respect to atom 2 is shown schematically in Fig.2.10c as p ∗ p(x). The procedure we followed was in fact a convolution: thedistribution of atom 1 was shifted, patom1(x − x′), multiplied by patom2(x′),and summed (integrated) over all values of x′:

Ptherm(x) =

∞∫−∞

patom2(x′) patom1(x− x′) dx′ . (2.114)

atom1

atom2

AAA

AAAAA

A AA

AAA

A

AAA

AAAAA

A AA

AAA

A

atom1p (x-x')

p (x')

weights for the p (x–x')

p p(x)*

a

b

c

Fig. 2.10. (a) The thermal spread of centers foratom 2. (b) Weights for the centers of the thermaldistribution of the atom 1. (c) The distributionof all thermal separations of atom 1 with respectto atom 2.

Page 62: Experimental Inelastic Neutron Scattering - Caltech Center for

2.4 Correlation Function for Elastic Scattering – The Patterson Function 49

For nth neighbor pairs of atoms, the Patterson function of the thermalspread, Ptherm(x), is the convolution of the Gaussian thermal spread functionsof both atoms (cf., (8.24)):

Ptherm(x) =( 1√

πσe−x

2/σ2)∗

( 1√πσ

e−x2/σ2

)when n = 0 . (2.115)

Ptherm(x) =1√2πσ

e−x2/(2σ2) when n = 0 . (2.116)

A detailed analysis treats closer pairs of atoms differently from more distantpairs, but here we ignore this difference except for the case of n = 0. In thespecial case of n = 0, we are considering the autocorrelation function betweenthe positions of the individual atoms with themselves. Each atom sees itselfas being at rest, so the Patterson function for the thermal spread is:

Ptherm(x) = Nδ(x) when n = 0 . (2.117)

We now obtain the Patterson function for the entire crystal by convolutingthe thermal spread function, Ptherm(x), with the Patterson function of theperfect crystal (2.96). The Patterson function, P (x), for the crystal withthermal displacement disorder is the following modification of (2.96). Notethe special treatment of the n = 0 term, which provides the δ-function:

P (x) = N[f∗at(x) ∗ fat(−x)

]∗[δ(x) +

( n=∞∑n =0;n=−∞

δ(x− na))∗

( 1√2πσ

e−x2/(2σ2)

)].(2.118)

We rewrite the sum in (2.118) by adding and subtracting the n = 0 term(the same trick used in Fig. 2.8 to give an uninterrupted infinite series forPavge(x)):

P (x) = N[f∗at(x) ∗ fat(−x)

]∗

[δ(x)− 1√

2πσe−x

2/(2σ2)

+( n=∞∑n=−∞

δ(x− na))∗

( 1√2πσ

e−x2/(2σ2)

)].(2.119)

The diffracted intensity is the Fourier transform of the Patterson func-tion of (2.119). The transformation from (2.119) to (2.120) follows that from(2.96) to (2.100), plus the fact that the Fourier transform of a Gaussian is aGaussian:

I(Q) = N∣∣fat(Q)

∣∣2[ (1− e−σ2(Q)2/2)

+ e−σ2(Q)2/2

∑h

δ(Q− 2πh/a)]. (2.120)

The last term in the square brackets is the expected set of sharp Bragg peaks,but attenuated at larger values of Q by the “Debye–Waller factor,” D(Q):

Page 63: Experimental Inelastic Neutron Scattering - Caltech Center for

50 2. Scattering

D(σ,Q) = e−σ2(Q)2/2 . (2.121)

The Debye–Waller factor suppresses the intensity of Bragg peaks at high Q,as does the size of the atom through the factor |fat(Q)|2 of Sect. 3.3.2, so theDebye–Waller factor can be considered a “thermal fattening of the atoms.”The intensity lost from the Bragg peaks reappears13 as the first term inbrackets in (2.120), 1− e−σ

2(Q)2/2, which is the “thermal diffuse scattering.”The thermal diffuse scattering has no distinct peaks, but usually has gradualmodulations that increase with Q as shown in Fig. 2.9.

The Debye–Waller factor can provide quantitative information about themean-squared displacement,

⟨x2

⟩, during thermal motion of the atoms. The

larger is⟨x2

⟩, the smaller the Debye–Waller factor (and the larger the sup-

pression of the Bragg diffractions). We first relate⟨x2

⟩to the σ2 in the

thermal spread function of the individual atoms. This is the second momentof the Gaussian function:⟨

x2⟩

=

∞∫−∞

x2 1√π σ

e−x2/σ2

dx =12σ2 , (2.122)

so from (2.121) and (5.20):

D(σ,Q) = e−〈x2〉(Q)2 = e−〈x2〉(4π sinθ/λ)2 . (2.123)

At modest temperatures and small Q we can often linearize the exponentialto predict a suppression of the Bragg peaks that is quadratic in Q:

D(σ,Q) 1−⟨x2

⟩ (4π sinθ

λ

)2

. (2.124)

Physically, the Debye–Waller factor accounts for the loss of constructive inter-ference in diffraction when the mean-squared atomic displacements becomecomparable to the x-ray wavelength. The Debye–Waller factor always sup-presses the intensity of Bragg peaks.

Equations (2.123) or (2.124) can be used to determine⟨x2

⟩from experi-

mental data on diffraction intensities.14 Conversely, it is often important topredict the Debye–Waller factor for a material at a known temperature. Inessence,

⟨x2

⟩is proportional to the potential energy of a harmonic oscillator,

and scales linearly with temperature, T . Although⟨x2

⟩can be calculated

easily for the single oscillator in the Einstein model, it is more handy toexpress the Debye–Waller factor in terms of a Debye temperature, θD, sincetabulations of θD are conveniently available. For the Debye model the Debye–Waller factor has been worked out, and at temperatures comparable to theDebye temperature or higher, the Debye–Waller factor is:13 Never forget that the total cross-section for coherent scattering is constant.14 Note that

⟨x2

⟩is along the direction of Q. In an isotropic material

⟨x2

⟩would

equal 1/3 of the mean-squared atomic displacement (cf., (??)).

Page 64: Experimental Inelastic Neutron Scattering - Caltech Center for

2.4 Correlation Function for Elastic Scattering – The Patterson Function 51

D(T,Q) exp[−12h2T

mkB θ2D

( sinθλ

)2], (2.125)

D(T, θ) 1− 22, 800Tmθ2

D

( sinθλ

)2

(2.126)

Here the units of mass are the atomic weight (e.g., 55.847 for Fe), T and θDare in Kelvin, and λ is in A. For use in (2.123) and (2.124), in the Debyemodel:⟨

x2⟩

= 144.38T

mθ2D

. (2.127)

Although the Debye–Waller factor pertains to the thermal spread of dis-tances between pairs of atoms, a Debye–Waller factor is often assigned tothe scattering from a single atom. With this approximation, the atomic formfactor, f , of each atom is replaced with f exp(−M). The Debye–Waller fac-tor for the intensity is therefore exp(−2M). Also defined is the parameter B,related to

⟨x2

⟩. Standard relationships are:

2M =⟨x2

⟩(4π sinθλ

)2

, (2.128)

M = B( sinθ

λ

)2

. (2.129)

In the case of an alloy, it is typical to assign different Debye–Waller factorsfor each type of atom, A or B, written as e−MA and e−MB :

ψ(Q) =∑r

[e−MAfA δA(r) + e−MBfB δB(r)

]eiQ·r . (2.130)

Here the δ-functions are Kroneker delta functions indicating the presence ofan A or B atom at r.

At temperatures below approximately half the Debye temperature, andespecially below a quarter of the Debye temperature, (2.125) is no longer reli-able for calculating the Debye–Waller factor. Two quantum effects are impor-tant at low temperatures. First, owing to Bose–Einstein phonon populationstatistics, the higher frequency phonons are not excited in simple proportionto the ratio kT/ε, where ε is the phonon energy. Second, at temperaturesbelow about half the Debye temperature, the “zero-point” vibrations of thesolid account for an increasingly large fraction of the atom displacements.Owing to zero-point vibrations, the thermal diffuse scattering can never beeliminated, even by cooling to arbitrarily low temperature.

The derivation of (2.120) was clean because we assumed the same Gaus-sian thermal spread for all interatomic correlations. For long wavelengthphonons, however, adjacent atoms tend to move together in a group. In gen-eral, the nearest-neighbor pair correlations are less broadened than the cor-relations for more distant neighbor pairs. If atoms tend to move in groups,as in acoustic modes, the displacement has long-range modulations, and thethermal diffuse scattering intensity is concentrated near the reciprocal lattice

Page 65: Experimental Inelastic Neutron Scattering - Caltech Center for

52 2. Scattering

points. The detailed shape of the thermal diffuse scattering depends on thelattice dynamics of the crystal vibrations [9.2]. With a Born–von Karmanmodel of lattice dynamics, for example, it is possible to calculate the pro-jected components of the atom movements normal to the diffracting planes,and obtain a more accurate Ptherm(x) of (2.116). Alternatively, the phononspectrum of the crystal can be deduced from measurements of the thermaldiffuse scattering, at least in principle. In practice, such measurements re-quire careful correction for other sources of diffuse intensity (such as atomicsize and displacement effects).

2.5 Correlation Function for Inelastic Scattering – TheVan Hove Function

2.5.1 Overview

Elastic scattering involves momentum transfers and positions Q, r, whichare complementary variables in quantum mechanics: Q ↔ r. Inelastic scat-tering is an extension into energy and time Q, E, r, t, which provides pairsof complementary variables: (Q, E) ↔ (r, t). The amplitude of the scat-tered wave, ψ, is the sum of phase factors of wavelets emitted from individ-ual atoms, but now we allow for a time variation. The phase informationin ψ(Q, E) includes details of atom positions and their motions. Recall thecase for elastic scattering, where we obtained by inverse Fourier transfor-mation: f(r) = F−1

Q ψ(Q). For inelastic scattering the analogous result is:f(r, t) = F−1

Q F−1E ψ(Q, E).

An inelastic experiment measures an intensity and not a wave amplitude.The experimental information on r, t is obtained directly from the scatteredintensity I(Q, E). The space-time information is obtained with the Fourierinversion F−1

Q F−1E I(Q, E), rather than F−1

Q F−1E ψ(Q, E), but this sacrifices

some information about atom positions and the phases of their motions.Nevertheless, the intensity is the actual quantity measured in a scatteringexperiment and we must make do with its analysis. Inelastic scattering has animportant analog to the Patterson function of elastic scattering. A powerfultool for calculating scattered intensities is the “Van Hove function,” defined inSect. 2.5.3 as an autocorrelation function of the scattering factor distributionin space and time.Whereas the scattered wave, ψ(Q, E), is the double Fourier transform of thescattering factor distribution, the scattered intensity, I(Q, E), is the doubleFourier transform of the Van Hove function of the scattering factor distribu-tion.We begin by proving the emphasized statement above. The subsequent sec-tion uses the Van Hove function to explain scattering phenomena involvingvarious dynamical excitations.

Page 66: Experimental Inelastic Neutron Scattering - Caltech Center for

2.5 Correlation Function for Inelastic Scattering – The Van Hove Function 53

2.5.2 Atom Centers at Points in Space and Time

As was the case for elastic scattering, most of the important results can beobtained by assuming the scatterers are points. The point scatterer emits awavelet from position rj at time tk. This rj and tk provide the phase of thewavelet from the point emitter relative to wavelets from other point emitters:Q·rj−ωtk. The amplitude of the scattering is given by the scattering strengthof the point emitter, f(rj , tk), which is an amplitude at a point in space andan instant in time. For a nucleus we may consider f as being at a point,although for magnetic spin distributions the shape of electron orbitals maybe included later by convolution. For the distribution in time, we will usuallyconsider a Fourier series with different frequencies, or energies E = ω.

It proves convenient to consider a distribution of scatterers, f(r, t), withcontinuous variables, r and t, rather than a sum over discrete points, rj,and snapshots in time tk. We change variables as:

ψ(Q, E) =N∑rj

∑tk

frj ,tke−i(Q·rj−ωt) =

+∞∫∫−∞

f(r, t) e−i(Q·r−ωt)d3r dt .(2.131)

To equate a continuous integral to a discrete sum requires that f(r, t) is nota smooth function of position or time. Over most of space and time, f(r, t) iszero, but when the scattering amplitude exists at r = ri and t = tk, f(ri, tk)is a Dirac delta function times a constant, frj ,tk :

f(rj , tk) = frj ,tkδ(r − ri)δ(t− tk) . (2.132)

To extend (2.132) to include many atom centers, we take the sum over rjand tk:

f(r, t) =N∑rj

∑tk

frj ,tkδ(r − rj)δ(t− tk) , (2.133)

so we satisfy the equality in (2.131) between points in space and time, rj , tk,and continuous functions of r, t.

2.5.3 Definition of the Van Hove Function

We define the “Van Hove function,” G(r, t):

G(r, t) ≡+∞∫∫−∞

f∗(r′, t′)f(r + r′, t+ t′) d3r′dt′ . (2.134)

Equation (2.134) is a double autocorrelation function – a space-time correla-tion function with limits of integration over all space and all time.

The most important feature of the Van Hove function is that its Fouriertransform is the scattered intensity in kinematical theory. To show this, weuse (2.131) to write I(Q) = ψ∗ × ψ as:

Page 67: Experimental Inelastic Neutron Scattering - Caltech Center for

54 2. Scattering

I(Q, E) =

+∞∫∫−∞

f∗(r′) ei(Q·r′−ωt′)d3r′dt′

×+∞∫∫−∞

f(r′′, t′′) e−i(Q·r′′−ωt′′)d3r′′dt′′ . (2.135)

Since r′ and r′′ are independent variables, as are t′ and t′′:

I(Q, E) =

+∞∫∫−∞

( +∞∫∫−∞

f∗(r′, t′)f(r′′, t′′)

× e−i[Q·(r′′−r′)−ω(t′′−t′)] d3r′′dt′′)

d3r′dt′ . (2.136)

Define r ≡ r′′ − r′ and t ≡ t′′ − t′, and change variables r′′ → r + r′ andt′′ → t+ t′. In so doing, the limits of integration for r are shifted by −r′ and−t′, but this is not of concern for integrations performed over all of spaceand all of time:

I(Q, E) =

+∞∫∫−∞

×( +∞∫∫−∞

f∗(r′, t′)f(r + r′, t+ t′) e−i(Q·r−ωt) d3r dt)

d3r′ dt′ , (2.137)

I(Q, E) =

+∞∫∫−∞

( +∞∫∫−∞

f∗(r′, t′)f(r + r′, t+ t′)d3r′ dt)

× e−i(Q·r−ωt) d3r dt . (2.138)

Using the definition of (2.134), we rewrite (2.138):

I(Q, E) =

+∞∫∫−∞

G(r, t) e−i(Q·r−ωt) d3r dt . (2.139)

Equation (2.139) shows that the scattered intensity is the Fourier transformof the Van Hove function:

I(Q, E) = FrFtG(r, t) , (2.140)

and by the inverse transformation we must have:

G(r, t) = FQFEI(Q, E) . (2.141)

For comparison, the scattered wave, ψ(Q, E) of (2.131), is the Fouriertransform of the scattering factor distribution, f(r, t). We therefore haveanother relationship between I(Q, E) and f(r, t):

Page 68: Experimental Inelastic Neutron Scattering - Caltech Center for

2.5 Correlation Function for Inelastic Scattering – The Van Hove Function 55

I(Q, E) = ψ∗(Q, E)ψ(Q, E) , (2.142)

I(Q, E) =(FrFtf(r, t)

)∗FrFtf(r, t) =

∣∣FrFtf(r, t)∣∣2 . (2.143)

Comparing (2.140) and (2.143):

FrFtG(r, t) =∣∣FrFtf(r, t)

∣∣2 . (2.144)

Equation (2.144) is consistent with the convolution theorem of Sect. A.1– a (double) convolution in real space (the Van Hove function of (2.134))corresponds to a multiplication in Fourier space (right-hand side of (2.144)).

2.5.4 Examples of Van Hove Functions

In this section we examine the scattering from a simple form of the Van Hovefunction from 2.139 with one spatial dimension:

I(Q,E) =

∞∫−∞

∞∫−∞

G(x, t) e−i(Qx−ωt) dxdt . (2.145)

In all our examples we assume coherent scattering so there are predictablephase relationships between different scattering centers. Section 2.5.5 devel-ops further the cases where incoherent averaging of the space and time cor-relations produce a “self-correlation function” and the “Patterson function.”

We later treat the incoherent case by following the “self-correlation func-tion” of the individual scatterers.

First consider an elementary excitation in a solid that provides a periodicmodulation of the scattering factor in space and time:

f(x, t) = ei(qx−ω0t) . (2.146)

We use (2.134) to obtain its Van Hove function:

G(x, t) =

∞∫−∞

∞∫−∞

e−i(qx′−ω0t′) ei[q(x+x′)−ω0(t+t′)] dx′dt′ , (2.147)

G(x, t) =

∞∫−∞

eiqxdx′∞∫−∞

e−iω0t dt′ = eiqx

∞∫−∞

dx′ e−iω0t

∞∫−∞

dt′ , (2.148)

G(x, t) = ei(qx−ω0t) , (2.149)

where we have ignored the normalization, and we find that G(x, t) = f(x, t).In this case where G(x, t) has the form of a wave (2.149), (2.145) becomes:

Page 69: Experimental Inelastic Neutron Scattering - Caltech Center for

56 2. Scattering

I(Q,E) =

∞∫−∞

∞∫−∞

ei(qx−ω0t) e−i(Qx−ωt) dxdt , (2.150)

I(Q,E) =

∞∫−∞

ei(q−Q)x dx

∞∫−∞

ei(ω−ω0)t dt , (2.151)

I(Q,E) = δ(q −Q− g) δ(ω − ω0) . (2.152)

Equation (2.152) shows that the momentum transfer must match that of thewave, modulo a reciprocal lattice vector, g (which provides a factor of eigx = 1in the integrand).

An elementary excitation in a solid with unique q, ω0 provides intensityat a single point in energy, and at a distance of Q away from each recip-rocal lattice point. This of course assumes coherent scattering – incoherentscattering places a restriction on ω only.

Local Excitations. It is instructive to develop the Van Hove function andthe scattered intensity with a pictorial approach, as in Fig. 2.11. The scat-tering factor distribution is shown in Fig. 2.11a as it undergoes a full cycleof oscillation.15 The construction of the Van Hove function G(x, t) parallelsthat of the Patterson function in Fig. 2.5. The detailed steps of shifting andintegrating in Fig. 2.5 are not shown here. Suffice to say that situation alongthe x-dimension is quite analogous to that of Fig. 2.5. For the case wheret = 0, for example, it is necessary to average the shifting and integrating ofFig. 2.5 for all nine times shown in Fig. 2.11a. Notice that although someof the scattering factor distributions have zero intensity at odd multiples ofa, the result for G(x, t) always has intensity at these locations (althoughweaker). The time dimension of G(x, t) is obtained in a similar way. Considerthe first time interval for time differences of t1. For this case it is necessaryto match all pairs of the scattering factor distributions that differ by one intheir vertical stacking in Fig. 2.11a. These eight cases are then overlappedand shifted along the x-axis as before, and their results are averaged. Theother time intervals require taking pairs separated further in time, but alwaysit was eight cases whose shift and overlap are evaluated for constructing Fig.2.11b.

The final step is to obtain the I(Q,ω) of Fig. 2.11c. In this case thesituation is fairly simple. There is only one time frequency in Fig. 2.11a,equal to 2π/t8. If we allow creation and annihilation of such an excitation,we expect intensity at frequencies ω = ±2π/t8. The spatial periodicity of theproblem includes a superlattice periodicity, so peaks appear at intervals of±nπ/a, where n is either even or odd.

Dispersive Excitations. The next example in Fig. 2.12a is essentially thescattering factor distribution shown in Fig. 2.5, but set in motion to the15 The convention is that times tk with larger subscripts are later times.

Page 70: Experimental Inelastic Neutron Scattering - Caltech Center for

2.5 Correlation Function for Inelastic Scattering – The Van Hove Function 57

Fig. 2.11. (a) Variationsof a scattering functionf(x, ti) in space andtime. Nine snapshots areshown vertically for nineti. (b) The Van Hovefunction, G(x, t), ob-tained by overlapping allpairs of scattering factordistributions in (a), andsumming the resultingproduct of overlaps forall pairs separated by thesame number of time in-tervals. (c) The scatteredintensity, I(Q,ω). It isassumed possible to bothcreate and annihilate anexcitation as shown in(a), hence points at ±ω0.

right. It therefore has the same inversion symmetry along x as shown inFig. 2.5 (which was used to demonstrate Friedel’s law). The scattering factordistribution is assumed to move continuously to the right with increasingtime. In assessing the overlap of the scattering factor distributions, for allcases of time zero (i.e., the overlap of the scattering factor with itself beforeit has a chance to move), the largest intensity occurs at lattice translationvectors. For larger times, t, evaluation of G(x, t), requires the overlap of pairs

Page 71: Experimental Inelastic Neutron Scattering - Caltech Center for

58 2. Scattering

of f(x, tk) in Fig. 2.12a that are separated in time. The best overlaps ofthese time-shifted f(x, tk) generally do not occur at lattice translations. Thestructures of f(x, tk) remain rigidly unchanged with time, however, so thesame structure exists around the best overlap. We see in Fig. 2.12b that theshape of G(x, t) is the same at each t, but it moves to the right with increasingtime.

The scattered intensity I(Q,ω) in Fig. 2.12c shows peaks much as in Fig.2.11c. It is evident that along the time dimension of Figs. 2.12a,b the patternrepeats itself with a periodicity of eight time snapshots in Figs. 2.12a. Theinelastic part of the scattering therefore occurs at ±2π/t8, assuming thatexcitations of the type shown in Fig. 2.12a can be both created and annihi-lated. There is another point worth noting about the time dependence in Fig.2.12c. Along the time dimension we encounter sets of three δ-functions foreach fundamental periodicity of the wave. The δ-functions, and their group-ing into threes, requires that we have higher-order Fourier components in thefrequency domain – formally, we expect a whole series of excitations over aninfinite range of energies: ±nω0 = ±n2π/t8. These high energies are im-probable in nature, so the use of sharp scattering centers (drawn as arrows inFig. 2.12a) may be misleading for problems of time dynamics. Delta-functionsare not a problem for the spatial coordinates, however, since diffraction exper-iments occur with zero energy transfer. Along the time dimension, however,we expect our excitations to have the shape of a sine wave, since additionalFourier components are quite costly in energy.

Also shown in Fig. 2.12c, however, are other related types of excitations(dashed vertical lines). Suppose that the velocity of the arrows in Fig. 2.12ais a constant, but the horizontal separation of the arrows can be varied. Forexample, assume it is possible to double their spatial periodicity from a inFig. 2.12a, to 2a. In this case it takes twice as long to repeat the pattern ofFig. 2.12a, so the frequency is halved. As long as the velocity of the excitationin Fig. 2.12a is the same, there will be a linear relationship between Q andω. This is shown for a whole dispersion of such excitations as dashed verticallines in Fig. 2.12c. Their arrangement in straight lines is characteristic of theexcitations all moving with the same velocity. Normally there would also beexcitations expected where the scattering factor distribution moves to the leftin Fig. 2.12a, so each reciprocal lattice point at ω = 0 would also be crossedby a dispersion of excitations with a negative slope in the space of Q,ω.Disordered Excitations. Another example is presented in Fig. 2.13. Thisexample is a space-time analog of displacement disorder presented in Sect.2.4.7. Here we assume that the scattering factor distribution is initially pe-riodic, but is set in motion. Each atom is first displaced to the right, buteach atom oscillates with a slightly different frequency. We assume that thefrequencies have a narrow spread ∆ω about a central frequency ω0. Likewise,we assume that the amplitudes of the displacements are not large, so each ar-row does not travel far from its lattice site. Eventually the oscillation damps

Page 72: Experimental Inelastic Neutron Scattering - Caltech Center for

2.5 Correlation Function for Inelastic Scattering – The Van Hove Function 59

Fig. 2.12. (a) Variationsof a scattering functionin space and time. Ninesnapshots in time areshown vertically. (b) TheVan Hove function, ob-tained by overlapping allpairs of scattering factordistributions in (a), andsumming the resultingproduct of overlaps forall pairs separated bythe same number of timeintervals. It was assumedthat the scattering factordistribution moves to theright continuously be-tween the time snapshotsshown in (a). (c) Thescattered intensity. It isassumed possible to bothcreate and annihilate anexcitation as shown in(a), hence points at ±ω0.

away, and the scatterers are back to their initial periodic configuration. Itis easiest to first analyze the situation for long times. Here the scatterersare in periodic positions, and have stopped moving. As the time interval be-comes long with respect to the damping time, most of the spatial correlationswill involve correlations between precisely periodic structure. For long times,G(x, t) will exhibit a set of peaks at equal intervals of x = a.

At short time separations, the individual arrows in Fig. 2.13b have notdisplaced much. At the shortest times after the neutron impact, the scatterersand have nearly the same displacements since they move nearly in phase. Itis incorrect, however, to assume that the peaks in G(x, t) are displaced tothe right. Recall that it is an average over many different time-separatedsnapshots of f(x, t) in Fig. 2.13a, many of which are moving to the left. Forsmall t, G(x, t) is therefore similar to that of a perfect crystal in its spatialperiodicities, with sharp peaks at each lattice translation.

Page 73: Experimental Inelastic Neutron Scattering - Caltech Center for

60 2. Scattering

At intermediate times, however, this this regularity is lost, even betweenneighboring arrows in this example. Figure 2.13c shows the intensity fromthis G(x, t). For ω = 0 the situation is as in Fig. 2.9, but for ω = 2π/t8 theintensity is broadened along the ω axis, owing the spread in frequencies. Itis also expected that the disorder along the time domain will produce extraincoherent scattering between the sharp peaks in G(x, t).

The initial coherence of the arrows is lost at intermediate times (assum-ing that the dephasing time 2π/∆ω is less than the damping time). If weassume that there are no short-range spatial correlations, we have preciselythe situation considered in Sect. 2.4.7. Figures 2.8 and 2.9 show the situationfor long times, or equivalently for ω = 0 in the I(Q,ω) of Fig. 2.13.

2.5.5 Autocorrelation Functions

The Van Hove function is worthy of deep respect, because it includes allthe information available from all types of scattering: (coherent, inelastic),(coherent, elastic), (incoherent, inelastic), (incoherent, elastic). Subsets ofthis total information are often important, perhaps because the scattering isprimarily incoherent, or is primarily elastic, for example. In particular, twoimportant, although less general, correlation functions are:

• The Patterson function, P (r), contains the spatial information obtainedfrom diffraction measurements with elastic coherent scattering.

• The “self-correlation” function, Gs(t), contains the time information ob-tained from measurements of incoherent inelastic scattering. It involves anaveraging over Q.

General Concept of Patterson and Self-Corrrelation Functions. Fig-ure 2.14 shows the essential ideas. A “snapshot in time” is obtained by hor-izontal sampling across the figure. In a real experiment the samplings willbe at many different times, but here we see that all such snapshots havethe same periodic structure. As we know from Sect. 2.4.3, the intensity forthis time snapshot is obtained by the Patterson function, whose periodicityin space gives the Bragg diffractions. In this particular case of a sine wave,however, we have Bragg peaks only at Q = 0 and Q = ±g. If we had a seriesof δ-functions with the same periodicity, however, we would have a series ofBragg peaks to arbitrarily large orders of Q = ng. To obtain the Pattersonfunction, the horizontal lines in Fig. 2.14a, each at a particular tk, are con-voluted with themselves, and the results are averaged for all tk. The f(x, tk)for dfferent tk in Fig. 2.14a do not interact with each other until after theconvolution is performed. Specifically:

P (x) =

∞∫−∞

∞∫−∞

f∗(x′, t′) f∗(x′ + x, t′) dx′ dt′ , (2.153)

Page 74: Experimental Inelastic Neutron Scattering - Caltech Center for

2.5 Correlation Function for Inelastic Scattering – The Van Hove Function 61

Fig. 2.13. (a) Variationsof a scattering functionin space and time. Ninesnapshots in time areshown vertically. (b) TheVan Hove function, ob-tained by overlapping allpairs of scattering factordistributions in (a), andsumming the resultingproduct of overlaps forall pairs separated by thesame number of time in-tervals. (c) The scatteredintensity. It is assumedpossible to both createand annihilate an exci-tation as shown in (a),hence points at ±ω0.

Page 75: Experimental Inelastic Neutron Scattering - Caltech Center for

62 2. Scattering

where we use the same value of t′ in both arguments of the scattering factor.The P (x) includes an averaging over time, but does not consider correlationsin time. This information is probed by elastic scattering experiments, whichdo not allow for measuring the time variations and hence energy transfers.

Likewise we can take a “snapshot in space” by taking a vertical samplingof the moving wave, at r1 for example (although the results for all other valuesof rj are the same in this example). Notice how the wave in Fig. 2.14 showsa time periodicity along a vertical line. This time periodicity of our movingwave is, of course, ω, in the wave function: eiQx−ωt. The restriction to a singlevalue of Q eliminates the possibility of obtaining any spatial information onthe excitation, but the ω-dependence is as expected. We obtain the timecorrelations for a specific position:

Gs(t) =

∞∫−∞

∞∫−∞

f∗(x′, t′) f∗(x′, t′ + t) dx′ dt′ , (2.154)

where we use the same value of x′ in both arguments of the scattering fac-tor. The Gs(t) includes an averaging over position, but does not considercorrelations in position. This information is probed by incoherent inelasticscattering experiments, which do not allow for measuring the Q-dependencesand hence spatial information.

More information comes by identifying correlations in both time andspace, however, as is indicated by the diagonal line in Fig. 2.14. This re-quires the full Van Hove function, G(r, t), without summing the correlationfunctions of different space or time shapshots to obtain Gs(t) or P (r). Never-theless, it is instructive to evaluate the Patterson function and self-correlationfunction for each of the three examples shown in Figs. 2.11, 2.12, 2.13.

Fig. 2.14. A simple sine wave, mov-ing to the right with increasing time.Three methods of sampling the in-tensity of the wave in space and timeare shown as straight lines, as ex-plained in the text. The relevant cor-relation functions for each samplingare shown for each line.

Local Excitations. Along the horizontal axis of ω = 0 in Fig. 2.11c, weobtain a diffraction pattern with strong fundamentals at Q = ±nπ/a, wheren is an even integer, and somewhat weaker superlattice diffractions for oddn. The same result is true for two other values of ω = ±2π/t8. This periodic

Page 76: Experimental Inelastic Neutron Scattering - Caltech Center for

2.5 Correlation Function for Inelastic Scattering – The Van Hove Function 63

structure inQ is evident from the Van Hove functionG(x, t) in Fig. 2.11b. Thespatial correlation function of (2.153), P (x) =

∫∫f(x′, tk) f(x′+x, tk)dx′dtk

has spatial periodicities that are similar at any time tk, although differentweights for the superlattice diffractions. The average over all tk is of coursewhat makes the final result for I(Q,ω = 0) in Fig. 2.11c.

Now look at the correlation functions along lines parallel to the time axisfor fixed x′ in G(x′, t) of Fig. 2.11b. The time periodicity of G(x′, t) in Fig.2.11b differs in phase for even and odd n in x′ = ±na. All time periodicitiesare the same, however, and include only the frequencies −2π/t8, 0,−2π/t8.16

The frequency spectrum of G(x′, t), measured along x′ = 0, is generallythe same as the inelastic scattering along any other x′ = na. If we av-erage the intensities along these individual x′, we lose the information onphases of scattering between the scatterers at different x′. The mixed con-structive and destructive interference between these different scatterers re-sults in intensities between individual atoms only. The result is a “self-correlation” function of (2.154), or a case of incoherent inelastic scattering,Gs(t) =

∫∫f(xj , t′) f(xj + x, t′ + t)dxjdt′. In this particular case, the inco-

herent average of these (obtained by summing the intensities at all Q) looksgenerally the same as the spectrum along a slice along any particular Q.

Dispersive Excitations. The Patterson and self-correlation functions ofFig. 2.12 can be understood in much the same way. The largest horizontalperiodicity in Fig. 2.12b is a, so this Patterson function gives diffraction peaksat multiples of 2π/a. The self-correlation function likewise has the simple pe-riodicities of−2π/t8, 0,−2π/t8, neglecting the detailed structure in cuts alongthe time axis that would give higher-order Fourier components. More interest-ing are the dispersions of different excitations that have the same wave speed(presented as dashed vertical lines in Fig. 2.12c). These longer-wavelengthexcitations could be obtained by periodically deleting rows of arrows in Fig.2.12b, for example. All these excitations would be measured in an incoher-ent inelastic scattering experiment, since the averaging over all x′ of G(x′, t)in Fig. 2.12b would intersect all time periodicities. An incoherent inelasticscattering experiment would collapse all the inelastic intensity onto a singleω-axis, and lose the relationship between ω and Q that is so evident from thecoherent inelastic scattering shown in Fig. 2.12c. For dispersive excitations,the self-correlation function has considerably less information compared tothe full Van Hove function. On the other hand, if one is interested in obtain-ing an accurate density of states (i.e., a total energy spectrum), irrespectiveof the values of Q, the self-correlation function may be advantageous. It doesnot require accurate measurements of intensities over all values of Q and ω.

Disordered Excitations. Finally we consider the Patterson function andself-correlation function of Fig. 2.13. The scatterers oscillate about their lat-16 Incidentally, if the arrows were to oscillate through zero in Fig. 2.11a, we would

have no value of ω = 0, and no elastic scattering. This corresponds to half thescatterings occurring out-of-phase with the other half.

Page 77: Experimental Inelastic Neutron Scattering - Caltech Center for

64 2. Scattering

tice sites, and the Patterson function is therefore as expected of a perfect crys-tal. For the time average, there is displacement disorder in the arrangement,however, so we expect a diffuse background, increasing with Q as shown inFig. 2.9. The self-correlation function for incoherent inelastic scattering is thesame for all x, since the scatterers are assumed independent in their motions,without positional correlations that may case neighbors to move together inphase. In this case we expect the same time structure for Gs(t) and G(x, t),and hence inelastic incoherent scattering will have the same energy spectrumas the coherent inelastic scattering for all Q. Both will show a broadeningin frequency of the excitation around ω0. The broadening arises from twoeffects. First is the frequency spread of the oscillators, postulated to be ∆ω.The second effect is the damping of the oscillations. The damping time of τprovides a broadening in energy of /τ , known as “lifetime broadening.” Inthe present problem we have assumed that the broadening of the excitationat ω0 is dominated by the frequency spread ∆ω, since the dephasing timewas assumed shorter than the damping time.

2.6 General Formulation of Nuclear Scattering

A more general treatment of nuclear scattering is possible than was presentedin the previous Sect. 2.3.5. It starts with Fermi’s golden rule, and avoids theexplicit use of wavefunctions for the scatterer (i.e., it does not require phononsolutions like ul,κ(q, t) of (2.60)).

2.6.1 Fermi’s Golden Rule

Fermi’s golden rule gives the transition rate from an initial state to a finalstate, W , at time t′:

W (t′) =2π|〈Ψf(r, t′)|V (r, t′)|Ψi(r, t′)〉|2 . (2.155)

For nuclear scattering of a neutron, the states |Ψ〉 include coordinates for theneutron and coordinates for the crystal. The nuclear forces of interaction arevery short range, compared to the atom motions in the crystal, so the poten-tial in (2.155) is Vnuc(r, t′), which involves the coordinates of the neutron andnuclei only. It includes the crystal only insofar as the positions of the nucleialter the location of the δ-functions of the Fermi pseudopotential of (2.48).Moving the atoms will connect the neutron and crystal coordinates throughthe conservation of momentum and energy only. The electronic interactionsbetween the atoms are not affected by the neutron, however, and the forcesbetween the nucleus and the neutron and the nucleus are not affected by theatom positions. We can therefore separate the state |Ψi(r, t)〉 into a latticepart |λi〉 and a neutron part |ki〉:

|Ψi(r, t)〉 = |λi(rnu, t)〉 |ki(rne, t)〉 , (2.156)

Page 78: Experimental Inelastic Neutron Scattering - Caltech Center for

2.6 General Formulation of Nuclear Scattering 65

where the independent coordinates rnu and rne refer to the postions of thenucleus and neutron. We have assumed the neutron states are plane-wavestates characterized by the wavevector kf (as in (2.16) and (2.35), but hereki = kf). In practice, the 〈 | | 〉 in (2.155) denotes an integration over allpositional coordinates at the instant t′ when W is evaluated. To get the totalprobability of the transition, Pi→f , we integrate this over all times when thetwo states interact in the presence of the perturbing potential V (r, t):

Pi→f =2π

∫〈λi(r, t)| 〈ki(r, t)|V ∗(r, t)|λf(r, t)〉 |kf(r, t)〉

〈λf(r, t)| 〈kf(r, t)|V (r, t)|λi(r, t)〉 |ki(r, t)〉 dt , (2.157)

where we have substituted (2.156) into (2.155), written out the | |2, and in-tegrated over all times.

Recall that the time evolution of the state of the scatterer is:

|ψ(t)〉 = e−iHt/|ψ(t=0)〉 , (2.158)〈ψ(t)| = 〈ψ(t=0)|e+iHt/ , (2.159)

We assume that the states of the crystal |λj〉 are eigenstates with specificenergies εj, so we can simplify (2.158 ) and (2.159) using εi = ωi as:

|λi(t)〉 = e−iωit|λi(t=0)〉 , (2.160)〈λi(t)| = 〈λi(t=0)|e+iωit , (2.161)

The general formulation makes use of these expressions because they allow usto work with states of the crystal at t = 0 such as |λ1(0)〉 and |λ2(0)〉, whichare constant and can be pulled out of any integration over time. Similarly forthe position evolution of plane-wave states of the neutron |k〉, which haveconstant momentum:17

|ki(r)〉 = e−iki·r|ki(r=0)〉 , (2.162)〈ki(r)| = 〈ki(r=0)|e+iki·r . (2.163)

Returning to the evaluation of (2.157), into it we substitute (2.160),(2.161) and (2.162), (2.163):

Pi→f =2π

∫〈λi(0)|eiωit 〈ki(0)|eiki·r V ∗(r, t) e−ikf ·r|kf(0)〉 e−iωf t|λf(0)〉

〈λf(0)|eiωf t 〈kf(0)|eikf ·r V (r, t) e−iki·r|ki(0) 〉e−iωit|λi(0)〉 dt ,(2.164)

where the operators r refer to the neutron coordinates, and the (0) refer to t =0 and r = 0 (although we are not concerned about the time-dependence of theneutron wavefunction or the position-dependence of the crystal excitation).

The next step in simplifying (2.164) is to substitute the scattering poten-tial for V . As before, we use the sum of Fermi pseudopotentials at all crystal17 Plane waves prove their convenience here. For other states we would have to

integrate over k-space.

Page 79: Experimental Inelastic Neutron Scattering - Caltech Center for

66 2. Scattering

sites (i.e., (2.49)). These δ-functions are most convenient in selecting the rwhere the neutron sees the nuclei, because the integrations over spatial co-ordinates become trivial — we delete the integral over position, and in eachmatrix element we substitute the nuclear positions with Rj and Rk, and thetimes tj and tk. We sum over all nuclei in the crystal:

Pi→f =2π

∫ ∑j

〈λi(0)|eiωitj 〈ki(0)|eiki·Rj b∗j e−ikf ·Rj |kf(0)〉 e−iωf tj |λf(0)〉

∑k

〈λf(0)|eiωf tk 〈kf(0)|eikf ·Rk bk e−iki·Rk |ki(0)〉e−iωitk |λi(0)〉dt .(2.165)

The notation (0) refers to both t = 0 and r = 0, since we made use of therelations (2.160)–(2.163). At t = 0), r = 0, the phase factors, ei((Q)·r−ωt), ofthe plane-wave states of (2.16) and (2.35) are equal to 1. Therefore:

〈ki(0)|kf(0)〉〈kf(0)|ki(0)〉 = 1 . (2.166)

We define the difference in frequency as ω:

ωi − ωf ≡ ω . (2.167)

Substituting (2.166) and (2.167) into (2.165):

Pi→f =2π

∫ ∑j

eiωtj b∗j 〈λi(0)| eiki·Rj(tj)e−ikf ·Rj(tj)|λf(0)〉

∑k

e−iωtkbk〈λf(0)|eikf ·Rk(tk) e−iki·Rk(tk)|λi(0)〉dt , (2.168)

The integration is over all times, so we can redefine t as a difference betweenscattering times:

t ≡ tj − tk , (2.169)

and likewise we define the scattering vector Q:

Q ≡ ki − kf . (2.170)

Substituting these differences into (2.168):

Pi→f =2π

∫eiωt

∑j

b∗j 〈λi(0)| eiQ·Rj(t)|λf(0)〉

∑k

bk〈λf(0)|e−iQ·Rk(0)|λi(0)〉dt , (2.171)

The next step is to consider changes in the state of the crystal, the|λ(0)〉. First consider the final states, |λf(0)〉. We do not have controlover which final state is obtained, and in prinicple all acceptable final stateswill occur over the duration of a long experiment. In effect, an experimentsums over final states, but this sum is special. Since the final states are as-sumed to form a complete set:

Page 80: Experimental Inelastic Neutron Scattering - Caltech Center for

2.6 General Formulation of Nuclear Scattering 67∑f

|λf(0)〉〈λf(0)| = 1 , (2.172)

for each term in the double sum (2.171). The initial states |λi(0)〉 canbe controlled by thermodynamics. Temperature will alter the distributionof intial states by the appropriate thermodynamic distribution, i.e., a Bose–Einstein distribution for phonons. Instead of writing this distribution n(ε)directly, we define the brackets

⟨⟩to mean the thermodynamic average:

Pi→f =2π

∫eiωt

∑j

∑k

b∗jbk⟨eiQ·Rj(t) e−iQ·Rk(0)

⟩dt , (2.173)

Pi→f =2π

∫eiωt

∑j

∑k

b∗jbk⟨eiQ·Rj(t) e−iQ·Rk(0)

⟩dt , (2.174)

We make use of the prefactors described in Sect. 2.3.5 to convert the transitionprobability into a cross-section:

d2σ

dΩ dE=

kf

ki

(2π)3

2V0

∑j

∑k

b∗jbk

∫eiωt

⟨eiQ·Rj(t) e−iQ·Rk(0)

⟩dt . (2.175)

Equation (2.175) is the most general result that can be obtained fromFermi’s Golden Rule. At its heart is a thermodynamic average of phase factorsfrom scattering by atoms j and k at their different positions in space andat different snapshots in time. Note that the space coordinates for the twoatoms are generally not evaluated at the same time. If there were no timedependence to the atom positions, the Fourier transform would yield a deltafunction δ(ω − 0), indicating pure elastic scattering. If there were no spatialperiodicities, the thermodynamic average over all phase factors would notproduce any constructive or destructive interferences at different angles, sothere would be no structure of the cross section in solid angle, Ω. The topicof this book is inelastic scattering, so we assume motion of the scatterers, andwe will be sensitive to the how the two phase factors change with time. Theupcoming approximation will address the thermal spread of atom positionsover time. Specifically we will assume this is a Gaussian function, or at leastit is small. For the spatial periodicities of the scatterers, we will assume thetranslational periodicity of a crystal. This is a more restrictive assumptionabout the sample, and can be misleading in cases of disordered solids. Itis therefore sometimes important to return to (2.175) for guidance on thescattering problem, since the only assumption is that the neutron is scatteredone time.

2.6.2 Detailed Balance

The intensities of inelastic spectra depend on the ratio of energy transfer totemperature, at least in the usual case where the sample is in thermodynamic

Page 81: Experimental Inelastic Neutron Scattering - Caltech Center for

68 2. Scattering

equilibrium before scattering. There is a detailed balance between the ratesof two scattering processes, one with the creation of an excitation, and theother with the annihilation of the same excitation. Consider the temperaturedependence of the positive and negative energy transfers between the neutronand the specimen. One extreme is when the sample is at a very low temper-ature (in practice, where kBT is much smaller than the energy resolution ofthe instrument). In this case there are no excitations present in the sample,so no scattering can occur with the annihilation of excitations. Excitationscan be created by transfer of energy from the incident neutron, of course.At low temperatures the inelastic spectrum will have intensity on one sideof the elastic peak, but no intensity on the other side. The other extremeis for very high temperatures (in practice, at temperatures where kBT ismuch larger than largest energy transfer measured). Because the probabilityof creating or annihilating one additional excitation such as a phonon makeslittle difference to the energy of the sample, we expect the quantization ofexcitations to be less obvious. Scattering processes involving the creation orannihilation of excitations occur with similar probabilities when the sampleis at high temperatures. Nevertheless, even at relatively high temperaturesthere is a measurable difference in the inelastic intensity on the loss and gainsides of the elastic peak. Each creation process has an inverse annihilationprocess, and in all cases these are in the ratio of a Boltzmann factor. Theenergy in this Boltzmann factor is the extra excitation energy required for thesample to be ready for the annihilation process. Since this Boltzmann factorratio occurs in detail for each pair of creation and annihilation processes, thisBoltzmann factor applies to all intensities across an inelastic spectrum.

The condition of detailed balance, (2.186) below, follows from two as-sumptions:

• The probability of the initial state of the sample, the |λi〉 in (2.156), is asexpected for thermodynamic equilibrium.

• The interaction operator for the transition probability, the V (r, t′) of(2.155), is Hermitian. (This is certainly true for the delta function (2.48)for the Fermi pseudopotential.)

To show the essence of the derivation of the detailed balance condition, as-sume the initial state |λ1〉 exists, and consider the probability, W ′1→2, for atransition to a final state |λ2〉, and the probability for the reverse transition,W ′2→1 from a pre-existing state |λ2〉:

W ′1→2 = |〈λ2|V |λ1〉|2 , (2.176)W ′2→1 = |〈λ1|V |λ2〉|2 , (2.177)

which are both products of a number with its complex conjugate:

W ′1→2 = 〈λ2|V |λ1〉(〈λ2|V |λ1〉

)∗, (2.178)

W ′2→1 =(〈λ1|V |λ2〉

)∗〈λ1|V |λ2〉 . (2.179)

Page 82: Experimental Inelastic Neutron Scattering - Caltech Center for

2.6 General Formulation of Nuclear Scattering 69

For a Hermitian operator, recall that V = (V T)∗ ≡ V †. We use the transposeto operate on the other side of V , for which we use the complex conjugatesof the bras and kets:

W ′1→2 = 〈λ2|V |λ1〉 〈λ1|V |λ2〉 , (2.180)W ′2→1 = 〈λ2|V |λ1〉 〈λ1|V |λ2〉 , (2.181)

so:

W ′1→2 = W ′2→1 ≡W ′ . (2.182)

This result (2.182) is true so long as V is Hermitian. Starting in the knownstates |λ1〉 and |λ2〉, the transition probabilites between these states are equal.

Now assume that the states |λi〉 are populated in thermodynamic equi-librium, differing by a Boltzmann factor. The measured cross sections areproportional to W1→2 and W2→1:

W1→2 =e−E1/kBT

ZW ′1→2 =

e−E1/kBT

ZW ′ , (2.183)

W2→1 =e−E2/kBT

ZW ′2→1 =

e−E2/kBT

ZW ′ , (2.184)

where Z is the partition function. Now that we have taken into considerationthe fact that the initial states have probabilities as expected from thermo-dynamic equilibrium, we can relate the observed intensity for the transition1 → 2 to the observed intensity for its reverse transition 2 → 1:

W1→2 = e(E2−E1)/kBT W2→1 . (2.185)

Suppose the state |λ2〉 has an energy higher (more positive) than |λ1〉,because the state |λ2〉 has an extra excitation in the sample. The transition1 → 2 is uphill energetically, and requires the neutron to transfer energyto create an excitation sample. Nevertheless, this transition is more intenseexperimentally because the initial state |λ1〉 is more probable thermodynam-ically. Equation (2.185) shows that the intensity W1→2 < W2→1 becauseE2 > E1 and the exponential is greater than 1. To clarify (2.185), we recog-nize that the difference in energy, E = E2 − E1, is the energy of the excitationin the solid. It is more traditional to write the condition of detailed balanceas:

S(E) = eE/kBT S(−E) . (2.186)

where E is the energy of the excition in the solid, and the argument −E corre-sponding to W2→1 signifies that S(−E) is on the phonon annihilation side ofthe elastic peak in the spectrum. Detailed balance remains valid when a singlescattering creates or annihilates multiple excitations – a detailed balance be-tween forward and reverse processes still exists because the thermodynamicprobabilities of the required initial states are set by E.

A practical use of detailed balance is to check the quality of experimentaldata. For example, in a spectrum measured at 300 K, equivalent to 25 meV,

Page 83: Experimental Inelastic Neutron Scattering - Caltech Center for

70 2. Scattering

the intensities at ±25 meV on the two sides of the elastic peak must be inthe ratio of e−1. If this were not true, we might suspect instrument artifacts,such as differences in sensitivity or resolution. A noise background could alsocause measured data to violate the condition of detailed balance, and perhapsdetailed balance could be exploited to help subtract some sources of back-ground from experimental data. We warn the reader, however, about suchsimple interpretations with data from a time-of-flight chopper spectrometer.The value of Q varies across the energy scale of data from a particular de-tector, and the relationship is not symmetric, i.e., Q(E) = Q(−E). Whenmultiphonon scattering is strong, and the Debye–Waller factor is significant,detailed balance will not be observed in the experimental data unless theyare rebinned for constant Q.

2.6.3 Crystalline Periodicity

The translational periodicity of crystals allows the reduction of the doublesum in (2.175) to a single sum. We separate the atom position operators,Rj(t), into static, xl,κ, and time-varying, ul,κ(t), components:

Rj(t) = xl + xκ + ul,κ(t) , (2.187)

where the static positions were broken into lattice vectors (index l) and basisvectors (index κ) in (2.187). The exponentials in (2.175) refer to pairs of atomsseparated by a distance xj−xk. In an infinite crystal, where all unit cells areequivalent, these exponentials cannot depend on the absolute position of theunit cell, but only on the lattice translation vector xl. Any one of the N unitcells can be taken as the origin, and the terms from the lth neighbor must bethe same. This distance, xl, has no time dependence, and is a constant. Ittherefore commutes through the other distance operators, and we can write:

d2σ

dΩ dE=

kf

ki

(2π)3N |b|22V0

∑l

eiQ·xl∫

eiωt⟨eiQ·ul(t) e−iQ·u0(0)

⟩dt . (2.188)

Here, for simplicity we have also assumed all nuclei are the same so bj =bk ≡ b, and we have assumed a simple lattice without a basis. The result in(2.188) accounts for the interactions of waves scattered from pairs of nuclei,recognizing that their instantaneous displacements may differ by a phasefactor. This difference in phase factor gives a constant prefactor eiQ·xl . Theother exponentials are not constants, however, and need to be handled withcare. The temptation would be to combine the exponentials into a singlefactor such as eiQ·(Rj(t)−Rj(0)). Unfortunately, this tempting step would beincorrect, except for classical systems. The quantum argument, describednext, is subtle.

2.6.4 A Subtlety of Quantum Mechanics

Calculating the expectation value of an operator A using the left- and right-hand sides of (2.158) and (2.159) gives:

Page 84: Experimental Inelastic Neutron Scattering - Caltech Center for

2.6 General Formulation of Nuclear Scattering 71

〈ψ(t)|A|ψ(t)〉 = 〈ψ(t=0)|e+iHt/Ae−iHt/|ψ(t=0)〉 . (2.189)

Evidently the time-dependence of the matrix element can be transferredfrom the state functions ψ to the operator A by replacing the operator bye+iHt/Ae−iHt/. This moves us into the “Heisenberg picture” of quantummechanics where state functions are fixed, but the time-dependence is in theoperator. The motivation for putting the dynamics into the operators is asfollows. In passing from classical mechanics to quantum mechanics, we replacethe position vector R(t) with an operator, denoted R(t). In particular, wewill alter soon work with phase factors that are a time-dependent operators:

eiQ·R −→ eiQ·R . (2.190)

Changing R to the operator R leads to a subtlety in calculating the inten-sity from the wave amplitude. It turns out that the operator R(0) does notcommute with the operator R(t) for the same atom at a different time. Theoperators are related as:

R(t) = e+iHt/R(0)e−iHt/ , (2.191)e−iHt/R(t) = R(0)e−iHt/ , (2.192)

and likewise for the exponentiated operators:

eiQ·R(t) = e+iHt/eiQ·R(0)e−iHt/ , (2.193)e−iHt/eiQ·R(t) = eiQ·R(0)e−iHt/ . (2.194)

We cannot interchange the order of R and H because H includes the mo-mentum operator.

To better understand how this works, we need a result about exponenti-ations of non-commuting operators. Operators in exponential functions aredefined in terms of the power series expansion of the exponential. Considertwo operators A and B:

exp(A) = 1 +A− 12AA+ . . . , (2.195)

exp(B) = 1 +B − 12BB + . . . , (2.196)

Now take the product, including all terms to the second order:

exp(A) exp(B) =[1 +A− 1

2AA+ . . .

][1 +B − 1

2BB + . . .

],(2.197)

exp(A) exp(B) = 1 + B − 12BB

+ A − AB + O3

− 12AA + O3 + O4 (2.198)

exp(A) exp(B) = 1 + A + B

− 12

[AA+ 2AB +BB

]+O3 , (2.199)

Page 85: Experimental Inelastic Neutron Scattering - Caltech Center for

72 2. Scattering

where we have been fastidious about keeping the operator A to the left ofthe operator B, because they may not necessarily commute.

Now evaluate the exponentiation of the sum A+B, again to second orderin the operators:

exp(A+B) = 1 + (A+B)− 12(A+B) (A+B) +O3 , (2.200)

exp(A+B) = 1 + A + B

− 12

[AA+AB +BA+BB

]+O3 , (2.201)

Note that (2.199) and (2.201) are not equal unless A commutes with B. Ingeneral, however:

AB = 12

[AB +BA

]so : (2.202)

exp(A) exp(B) = exp(A+B) . (2.203)

In classical physics, of course we have exp(A) exp(B) = exp[(A +B)

].

We need to re-examine the results of Sect. 2.3.5 in light of the inequality of(2.203). Equation (2.202) shows that the difference between the two sides of(2.203) is approximately:

AB − 12

[AB +BA

]=

12

[AB −BA

]. (2.204)

It turns out that the right side of (2.204) is the second term in a power seriesexpansion of exp

(12

[AB − BA

]), a factor that equates the two sides of

(2.203). That is:

exp(A) exp(B) = exp(A+B) exp(1

2[AB −BA

]). (2.205)

Proof of (2.205) is provided in Appendix I.1 of the excellent book by Squires,but here we have demonstrated its plausibility. An important point in theproof is that the commmutator [A,B] is a pure number, rather than a differ-ential operator. Fortunately this holds true whenA andB are atom displace-ments generated by phonons (obtained from the annihilation and creationoperators, a and a†).

2.6.5 Gaussian Thermal Averages

Now that we have the expression (2.205), we can use it to rearrange (2.188)into a form that shows intensity contributions from different numbers ofphonon excitations. To clarify the next steps, it is traditional to make thedefinitions:

U ≡ −iQ · u0(0) , (2.206)V ≡ iQ · ul(t) . (2.207)

Page 86: Experimental Inelastic Neutron Scattering - Caltech Center for

2.6 General Formulation of Nuclear Scattering 73

Now we substitute (2.206) and (2.207) into (2.205):

exp(U) exp(V ) = exp(U + V ) exp(1

2[U V − V U

]). (2.208)

At this point we need to take a thermal average (the 〈〉 in (2.188)). In doingso, we make the assumption that the vibrational atom displacements aredistributed with a Gaussian spread. The Gaussian distribution function canbe used to average a squared displacement, X2:

〈X2〉 =

∞∫−∞

X2 1√πσ2

e−X2/σ2

dX , (2.209)

〈X2〉 =12σ2 , (2.210)

a standard result.For comparison, we next average an exponential eX :

〈eX〉 =

∞∫−∞

eX1√πσ2

e−X2/σ2

dX , (2.211)

by completing the square:

− (X/σ − σ/2)2 = −(X2/σ2 −X + σ2/4

), (2.212)

so by adding and subtracting the last term of (2.212) in the exponential:

〈eX〉 =

∞∫−∞

1√πσ2

e−(X/σ−σ/2)2eσ2/4 dX , (2.213)

〈eX〉 = eσ2/4

∞∫−∞

1√πσ2

e−(X/σ−σ/2)2 dX , (2.214)

〈eX〉 = eσ2/4 , (2.215)

where the last result was obtained by integrating the normalized Gaussianfunction. By comparing (2.210) and (2.215), we obtain:

〈eX〉 = eX2/2 . (2.216)

Using (2.216), we obtain a factor with our operators U and V :

〈exp(U + V )〉 = exp(1

2(U + V

)2). (2.217)

We use this result to obtain the thermal average of (2.208):

〈expU expV 〉 = exp(1

2(U + V

)2)

exp(1

2〈U V − V U〉

), (2.218)

〈expU expV 〉 = exp(1

2〈U2 + V 2 +UV + V U +UV − V U〉

),(2.219)

〈expU expV 〉 = exp(1

2〈U2 + V 2〉

)exp〈UV 〉 . (2.220)

Page 87: Experimental Inelastic Neutron Scattering - Caltech Center for

74 2. Scattering

By examining (2.206) and (2.207), we can see that:

〈U2〉 = 〈V 2〉 , (2.221)

because the average vibrational amplitudes do not change over time, and allunit cells are equivalent in the crystal. This allows a final simplification of(2.220):

〈expU expV 〉 = exp〈U2〉 exp〈UV 〉 . (2.222)

Equation (2.222) was obtained with the one assumption of a Gaussian ther-mal spread of atom positions. Even if this in not quite the case, (2.222) isexpected to be valid when the atom displacements are small. By expandingboth sides of (2.216), and recognizing that the thermal average of odd powersof X are zero, (2.216) seems a reasonable approximation.

Finally, we use (2.222) to rewrite (2.188) in a way that will later let usidentify individual phonon scatterings. Making use of the definitions (2.206)and (2.207):

d2σ

dΩ dE=

kf

ki

(2π)3N |b|22V0

∑l

eiQ·xl∫

eiωt exp〈U2〉 exp〈UV 〉dt . (2.223)

Taking the thermal averages has removed much of the time dependence inour factors. The only remaining time dependence is within the 〈UV 〉 factor,so we rewrite:

d2σ

dΩ dE=

kf

ki

(2π)3N |b|22V0

∑l

eiQ·xl exp〈U2〉∫

eiωt exp〈UV 〉dt . (2.224)

Using (2.206), the factor exp〈U2〉 in (2.224) becomes exp(−〈[Q·ul(0)]2〉). Werecognize this as a Debye–Waller factor. To its right in (2.224) is a sum overpairs of atoms separated by xl. There is a phase associated with the atomseparation in the pair. Suppose for the moment that there were no displace-ments of the atoms from their lattice sites. In this case the final exponentialexp〈UV 〉 would equal e0 = 1. This is the case of elastic scattering, and thesum of phase factors of (2.224) would reduce to to the elastic scattering resultof (2.57). It is the final factor, the Fourier transform of exp〈UV 〉, that makes(2.224) interesting, and it is in a convenient form for further development.

2.6.6 Impulse Approximation

It is relatively easy to adapt the general result (2.175) to the case wherethe energy of the incident neutron is much higher than the characteristicexcitations in the solid. We therefore ignore the interatomic interactions,and consider the collision of the neutron with a single nucleus at R. Thisapproaches the problem of hitting a ball with a classical projectile, so we lose

Page 88: Experimental Inelastic Neutron Scattering - Caltech Center for

2.6 General Formulation of Nuclear Scattering 75

some features of wave mechanics.18 We do have to account for momentumand energy transfer, of course. The impulse approximation begins with thereplacement of the operator:

Rj(t) −→ Rj(0) + tvj , (2.225)

Rj(t) −→ Rj(0) +t

Mjpj, (2.226)

where we expect t to be small since the neutron is moving fast. Becausethe incoherent character of the multiple excitations suppresses the phaserelationships between different scatterers, and we consider terms j = k in(2.175). It is tempting to substitute (2.226) directly into (2.175) to obtain:

d2σ

dΩ dE? =?

kf

ki

(2π)3

2V0

∑j

∑k

b∗j bkδj,k

×∫

eiωt⟨eiQ·(Rj(0)+t/Mjp

j) e−iQ·Rk(0)

⟩dt , (2.227)

and with Rj(0) = Rk(0):

d2σ

dΩ dE? =?

kf

ki

(2π)3

2V0

∑j

|bj |2∫

eiωt⟨eit/MjQ·p

j

⟩dt . (2.228)

The missing piece in (2.228) is a phase factor associated with the energy gainof the scatterer. The energy gain is kinetic, Ekin = p2

2Mj=

2Q2

2Mj. Fermi’s

Golden Rule, which connects the wavefunctions before and after the scatter-ing, is senstitive to the phases of the initial and final states of the scatterer.The transfer of energy causes a relative change in the phase of these two statesby the factor: exp(iEkin

−1 t). This phase relationship for the total energytransfer leaves a minimal amount of quantum mechanics in the scatteringproblem (which we expect to go away at very high incident energies):

d2σ

dΩ dE=

kf

ki

(2π)3

2V0

∑j

|bj |2∫

eiωtei(2Q2

2Mj

)−1 t

⟨eit/MjQ·p

j

⟩dt . (2.229)

In Sect. 2.6.5 we calculated the thermal average, 〈〉, when the displace-ments of the scatterer had a Gaussian thermal spread. To apply this resultto (2.229), we use the result: 〈eiX〉 = e−X

2/2:

d2σ

dΩ dE=

kf

ki

(2π)3

2V0

∑j

|bj |2∫

eiωtei(2Q2

2Mj

)−1 te−(〈Q·p

j〉t/Mj)

2/2 dt . (2.230)

We complete the square in the exponential, defining:18 Another viewpoint is that we expect multiple excitations to occur in the solid.

The effects of coherence are generally washed out when multiple excitationsoccur. For incoherent inelastic scattering as in Sect. 2.5.5, we expect to analyzethe scattering by considering only a single nucleus at a time. We expect theexcitations to be incoherent.

Page 89: Experimental Inelastic Neutron Scattering - Caltech Center for

76 2. Scattering

x2 ≡(√

at− b

2√a

)2

= at2 − bt+b2

4a, (2.231)

and we obtain a result:∞∫−∞

e−at2+bt dt =

∞∫−∞

e−x2

√a

dx =√π

aeb

2/4a . (2.232)

With the associations for a and b:

a =12

( 〈Q · pj〉

Mj

)2

, (2.233)

b = i(ω +

Q2

2Mj

), (2.234)

(2.230) becomes:

d2σ

dΩ dE=

kf

ki

(2π)7/2

2V0

∑j

|bj |2(

Mj

〈Q · pj〉

)2

exp

−(Q2

2Mj+ ω

)2

2(〈Q·p

j〉

Mj

)2

. (2.235)

The differential scattering cross section in (2.235) has the shape of aGaussian function, centered at an energy ω:

ω = −2Q2

2Mj. (2.236)

The center of the Gaussian is simply the energy transfer from a scatteringwith a single-particle recoil. This result could be obtained by classical me-chanics. The spread of this Gaussian is obtained from from the denoninatorin the Gaussian of (2.235). This width increases with Q and with the mean-squared velocity of the scatterers. The ratio of shift to width grows larger withQ, however. In the classical limit of very large Q, the width is negligible, sothe energy and momentum transfers are well-defined.

2.6.7 Multiphonon Expansion

We return to develop (2.224) with the “multiphonon expansion,” which isobtained from the expansion of the exponential exp〈UV 〉. This is seen mosteasily in the incoherent approximation, where we replace:

exp〈UV 〉 −→ exp〈U〉〈V 〉 = exp〈U〉〈U〉 . (2.237)

so that, treating U as a displacement and not an operator:

d2σ

dΩ dE=

kf

ki

(2π)3N |b|22V0

∑l

eiQ·xl exp〈U2〉

×∫

eiωt exp (−iQ · u iQ · u) dt . (2.238)

Page 90: Experimental Inelastic Neutron Scattering - Caltech Center for

2.6 General Formulation of Nuclear Scattering 77

Following (2.62), the harmonic oscillator energy Mω2u2max, is assumed quan-

tized in units of ω. From ω ∝ Mω2u2max, we replace the displacement

u =√/(2Mω), for which we expect a time-dependence:

d2σ

dΩ dE=

kf

ki

(2π)3N |b|22V0

∑l

eiQ·xl exp〈U2〉

×∫

eiωt exp(Q2

2MωΥ (t)

)dt , (2.239)

d2σ

dΩ dE=

kf

ki

(2π)3N |b|22V0

∑l

eiQ·xl exp〈U2〉

×∫

eiωt

1 +2Q2

2M

ωΥ (t) +

12

(2Q2

2M

ωΥ (t)

)2

+ . . .

dt .(2.240)

The terms in the expansion of (2.240) are recognized as a series in powersof ERecoil/(ω) — the recoil energy, p2/(2M), divided by the energy of thephonon, ω. It is instructive to compare (2.240) to (2.56), which is re-writtenhere. Note that it did not include a Debye–Waller factor:

Ψsc(Q, r) = −ei(kf ·r−ω0t)

|r|

×∑l,κ

bκ eiQ·xl,κ(

1 + iQ · ul,κ(t)−12(Q · ul,κ(t))2 + . . .

).(2.241)

Analyzing the two series in (2.240) and (2.241), term-by-term, we find:

• The first term, the 1, provides a Fourier transform of a constant, whichis a delta function, δ(ω). Since the excitation energy is therefore zero,this is an elastic scattering process. Note that the sum of phase factorseiQ·xl over lattice sites and the Debye–Waller factor e〈U

2〉 are as expectedfor diffracted neutron wavefunctions. Elastic nuclear scattering has no Qdependence, except through the Debye–Waller factor.

• The second term, involving 2Q2

2M /(ω), is the inelastic scattering that oc-curs by exciting one phonon. We found in (2.67) that its Fourier transformled to a delta function δ(ω − ω(q)) from the conservation of energy. Aconservation of momentum led to a similar delta function, δ

((q−Q)− g

).

Single phonon scattering increases with Q as Q2.

• The third term, involving(2Q2

2Mω

)2

, is the scattering that involves the ex-

citation of two phonons. This occurs in one scattering event, not throughthe creation of two phonons by two different deflections of the neutron.(The latter is “multiple scattering.”) When the time function is squared,such as cos2(ωt) = 1/2

(1 + cos(2ωt)

), the frequency is doubled, and en-

ergy conservation provides the delta function δ(ω − 2ω(q)). Two-phonon

Page 91: Experimental Inelastic Neutron Scattering - Caltech Center for

78 2. Scattering

scattering involves twice the energy transfer as a one-phonon process. Notehow it increases rapidly with Q, going as Q4.

• Higher order terms, involving + . . . , involve the excitation of many phononsin one scattering of the neutron. These higher-order terms approach clas-sical behavior. Typically the scattering of a particle with a large a largemomentum transfer causes the excitation of many phonons, sometimesbetter described as the creation of heat.

We note that the analysis here has assumed ignored phase relationships inmultiphonon scattering. This is typical of even more sophisticated treatmentsof the problem. Multiphonon scattering is usually analyzed in the incoherentapproximation.

2.7 Magnetic Scattering

2.7.1 Magnetic Form Factor and Scattering Amplitude

Magnetic scattering originates with the interaction between the spin of theneutron and the spins of electrons and/or the motions of electrons. Magneticscattering is inherently more complicated than nuclear scattering because thepotentials have vector character. The magnetic forces are also long range.

The scattering potential can be written in the general form V = −µn ·B,where B, which originates with the electrons, has a spin component BS andan orbital component BL:

B = BS +BL . (2.242)

These components have different mathematical forms19:

BL ∝R× pR2

, (2.243)

BS ∝ ∇×(s× RR2

). (2.244)

From (2.42) we obtain the scattering amplitude in the first Born approxima-tion as the Fourier transform of the scattering potential V = −µn ·B

fmag(Q, E) =√kf

ki

2m2

14π

∞∫−∞

eiQ·r (−µn ·B) dr . (2.245)

fmag(Q, E) =√kf

ki(−γre)

∞∫−∞

eiQ·r σ ·(

1

R× pR2

+ ∇×(s× RR2

))dr ,(2.246)

19 Note that BL has the form of the Biot-Savart law for the electron current (withelectron momentum p) about the atom. The BS can be written as a curl of avector potential, BS = ∇×A, if A = µe ×R/R2, and µe = −e/me = −2µBs.

Page 92: Experimental Inelastic Neutron Scattering - Caltech Center for

2.7 Magnetic Scattering 79

where σ is the neutron spin, later to be the spin operator. Many constantswere combined into the “classical electron radius,” re = e2/(mec

2), and γ isthe gyromagnetic ratio of the neutron, γ = 1.913.

The evaluation of (2.246) is most expedient with two mathematical tricks:∞∫−∞

R

R2e−iQ·R dR = −4πi

Q

Q, (2.247)

∇×(s× RR2

)=

12π2

∞∫−∞

q × (s× q) e−iq·R dq . (2.248)

The derivation of (2.247) is not difficult – it involves transformation to spher-ical coordinates where the R2 in the denominator is cancelled by an R2 inthe differential volume element.20 Unfortunately, (2.248) is much more workto obtain unless one is rather clever with, or accepting of, vector identities.A sketch of its derivation is given in Appendix B.2 of Squires’ book.

In using the tricks (2.247) and (2.248), the necessary steps are:

• With the neutron at r and the ith electron at ri, the position for themagnetic field, R in (2.243) and (2.244), is the distance separating r andri: R = r − ri.

• The Fourier transform of R×p/R2 first involves replacing the exponentiale−iQ·R = e−iQ·r e+iQ·ri , in order to use coordinates of the neutron and theith electron. The second phase factor e+iQ·ri , is a constant, and is removedfrom the integration over all space. The remaining spatial integration be-comes, from (2.247), −i4π Q× p/Q.

• Notice that the right-hand side of (2.248) has its only dependence on Rin the exponential (which we again write as e−iq·R = e−iq·r e+iq·ri). Whenis (2.248) substituted into (2.246), a double integral (over r and q) isobtained. After the phase factor, eiq·ri , is isolated, the r-integral is of theform

∫ei(Q−q)·rdr. The r-integral therefore gives a three-dimensional δ-

function, (2π)3δ(Q− q).The result from these manipulations with (2.247) and (2.248) is:

fmag(Q, E) =√kf

ki(−γr0)

×σ ·( ∞∫−∞

eiq·ri 12π2

q × (s× q) (2π)3δ(Q− q) dq

− i4π

eiQ·ri Q× pQ

). (2.249)

20 Note that (2.247) is the inverse transformation of (A.27) in the Appendix, withthe interchange of R and Q.

Page 93: Experimental Inelastic Neutron Scattering - Caltech Center for

80 2. Scattering

Integrating over the δ-function forces q −→ Q:

fmag(Q, E) =√kf

ki(−γr0) eiQ·ri

×4πσ ·(Q× (s× Q) − i

Q× pQ

). (2.250)

With the definition of M⊥(Q), which involves a sum over all electrons inthe sample:

M⊥(Q) ≡∑ri

eiQ·ri

(Q× (s× Q) − i

Q× pQ

), (2.251)

fmag(Q, E) = 4π√kf

ki(−γr0)σ · M⊥(Q) . (2.252)

Equation (2.258) is a general expression for the magnetic scattering fromthe spin and orbital moment of the electrons. It includes a sum over the phasefactors for electrons at all ri. Unfortunately, the spin and orbital terms inthe large parentheses in (2.251) have different forms, and to see more cearlythe vectorial character of magnetic scattering it is convenient to make themequivalent using the expression (proved with some effort in Squires AppendixH.1)

M⊥L ≡iQ

∑ri

eiQ·ri(Q× p) =1

2µBQ×

(ML(Q)× Q

), (2.253)

where the Fourier transform of the magnetic form factor from the spatialdistribution of electron currents is:

ML(Q) ≡∫ML(r) eiQ·ridr . (2.254)

It is natural to write (2.251) as:

M⊥ ≡ M⊥s + M⊥L , (2.255)

M⊥ =1

2µBQ×

(M(Q)× Q

), (2.256)

where M(Q) is the Fourier transform of the spatial distribution of all mag-netization (as in (2.254)):

M(Q) ≡∫M(r) eiQ·ridr , (2.257)

We arrive at the cleaner expression for the magnetic scattering factor

fmag(Q, E) = 4π√kf

ki(−γr0)

∑ri

eiQ·riσ ·(Q× (M × Q)

), (2.258)

Page 94: Experimental Inelastic Neutron Scattering - Caltech Center for

2.7 Magnetic Scattering 81

2.7.2 Vector Orientations in Magnetic Scattering

Equation (2.258) shows that the magnetic scattering is proportional to thevector Q×M×Q. The maximum magnetic scattering therefore occurs whenthe direction of the spin, S, or magnetization, M(r), is perpendicular to thescattering vector, Q. This is illustrated in Fig. 2.7.2, which shows intensitycontours measured about the forward beam in a small-angle scattering exper-iment. A magnetic field of 8 kG was applied to the specimen, perpendicularto the direction of the incident beam. This field should was sufficient to satu-rate the magnetic moment of the sample (a soft magnetic material), aligningall its spins. Notice that the contours are oriented perpendicularly to thedirection of the applied magnetic field. The scattering along the directionof the magnetic field is non-zero, however, because Ni-Fe has strong nuclearscattering. By comparing intensities parallel and perpendicular to the appliedmagnetic field, it is possible to extract individual profiles for magnetic andnuclear scattering.

Fig. 2.15. Experimental intensity contours from small-angle neutron scattering(SANS) from fcc Ni-Fe in the presence of an 8 kG applied magnetic field. Theforward beam was perpendicular to the plane of the paper. The intensity decreaseswith angle from the forward beam, but more rapidly in the direction of the appliedmagnetic field.

The relationship between the generalized magnetization, M , its projec-tion, M⊥, and the scattering vector, Q, is illustrated with the help of Fig.2.7.2 and its caption. By comparing the two parts of this figure, we find

Q× M × Q = M − Q(M · Q) . (2.259)

The cross-section for magnetic scattering is proportional to |fmag|2. Weneed to take the product of M⊥ with its Hermitian adjoint to obtain theintensity

M†⊥M⊥ =

(M† − Q(M

† · Q)) (M − Q(M · Q)

). (2.260)

Page 95: Experimental Inelastic Neutron Scattering - Caltech Center for

82 2. Scattering

Fig. 2.16. Important vectors for magnetic scattering. (left) The gray plane, parallel

to the paper, is defined by the vectors M and Q. The vector product M × Q is

perpendicular to the plane of the paper and M⊥ ≡ Q × M × Q again lies in the

plane. (right) The vector of length M · Q along the direction Q.

When distributing the product in (2.261), the two middle terms have thesame form but opposite sign to the fourth term, so

M†⊥M⊥ = M

†M − (M

† · Q)(M · Q) . (2.261)

We resolve M and Q into Cartesian components

M†⊥M⊥ =

∑α,β

S†αSα − S†αQαSβQβ , (2.262)

M†⊥M⊥ =

∑α,β

(δαβ − QαQβ

)S†αSβ . (2.263)

2.7.3 Averaging over Neutron Polarizations

To obtain an experimental cross-section from (2.258), we need to average overthe spin orientations of the incident neutrons (orientations of σ). We expectto write the cross-section as |fmag|2

d2σ

dΩ dE= (γre)2

kfki

∣∣∣〈λf , σf |σ · M⊥|λi, σi〉∣∣∣2 δ(Ef−Ei+ω) . (2.264)

Compared to nuclear scattering, (2.264) includes additional coordinates inthe matrix element, σi and σf , to account for the change in spin of theneutron after scattering. Again, the λi and λf refer to states of the scatterer.For magnetic scattering, a change in λ may originate with the creation orannihilation of an excitation of the electron spins. Further progress with thesecoordinates will require a magnetic dynamics model. The total cross-sectionrequires that we sum over all initial and final states of the neutron:

d2σ

dΩ dE= (γre)2

kfki

∑i

∑f

∣∣∣〈λf , σf |σ · M⊥|λi, σi〉∣∣∣2 δ(Ef−Ei+ω) .(2.265)

The coordinates σi and σf describe to the neutron spin, which we expectto be up or down (sometimes ↑, ↓). Equation (2.264) is the cross-section forone scattering process, but in an experiment we expect to average over the

Page 96: Experimental Inelastic Neutron Scattering - Caltech Center for

2.7 Magnetic Scattering 83

spins of many neutrons. The total cross-section should include weighting func-tions such as pσi to account for different probabilities of initial spin up andspin down neutrons, as for example with polarized beam experiments. Thefinal spin states are assumed unbiased, however, and so have no associatedweight function.

The operator in (2.268) can be resolved into its vector components:

σ · M⊥ = σxM⊥x + σyM⊥y + σzM⊥z . (2.266)

The coordinates of σα pertain to the neutrons only, and the coordinates ofM⊥α pertain only to the electrons. The products in (2.266) serve to group thefactors involving electrons and neutrons, but they separate as for example:

〈λf , σf |σxM⊥x|λi, σi〉 = 〈λf |M⊥x|λi〉 〈σf |σx|σi〉 . (2.267)

The cross-section of (2.268) can be separated into nine different terms by useof (2.266) and (2.267) (note the sequencing of subscripts x and y):

d2σ

dΩ dE= (γre)2

kfki

∑i

∑f(

〈λi|M⊥x|λf 〉 〈σi|σx|σf 〉〈σf |σx|σi〉〈λf |M⊥x|λi〉

+〈λi|M⊥x|λf 〉 〈σi|σx|σf 〉〈σf |σy|σi〉〈λf |M⊥y|λi〉

+〈λi|M⊥y|λf 〉 〈σi|σy|σf 〉〈σf |σx|σi〉〈λf |M⊥x|λi〉+ . . .

)δ(Ef−Ei+ω) . (2.268)

By closure,∑

f |σf 〉〈σf | = 1, there is simplification of the spin factors

d2σ

dΩ dE= (γre)2

kfki

∑i

∑f(

〈λi|M⊥x|λf 〉 〈σi|σxσx|σi〉〈λf |M⊥x|λi〉

+〈λi|M⊥x|λf 〉 〈σi|σxσy|σi〉〈λf |M⊥y|λi〉

+〈λi|M⊥y|λf 〉 〈σi|σyσx|σi〉〈λf |M⊥x|λi〉+ . . .

)δ(Ef−Ei+ω) . (2.269)

The spin operators have the properties21

σx| ↑〉 = | ↓〉 , σy| ↑〉 = +i| ↓〉 , σz| ↑〉 = +| ↑〉 ,σx| ↓〉 = | ↑〉 , σy| ↓〉 = −i| ↓〉 , σz| ↓〉 = −| ↓〉 . (2.270)

21 These relations are obtained, for example, from explicit forms of the Pauli spinmatrices.

Page 97: Experimental Inelastic Neutron Scattering - Caltech Center for

84 2. Scattering

Equation (2.269) includes terms with the factors 〈↑ |σxσy| ↑〉 and 〈↑|σyσx| ↓〉. Evaluating them with (2.270) gives:

〈↑ |σxσy| ↑〉 = 〈↑ |σx(+i)| ↓〉 = 〈↑ |+ i| ↑〉 = +i〈↑ | ↑〉 = +i , (2.271)〈↑ |σyσx| ↑〉 = 〈↑ |σy| ↓〉 = 〈↑ | − i| ↑〉 = −i〈↑ | ↑〉 = −i , (2.272)

where the last result used the normalization 〈↑ | ↑〉 = 1. It is not surprisingthat (2.271) and (2.272) give opposite results because the spin operatorsσx and σy do not commute. The consequence is that there is a pairwisecancellation of the six terms in (2.269) that involve the subscripts xy, yx, xz,zx, yz, zy.

For unpolarized neutrons with | ↑〉 and | ↓〉 of equal probabilities, weexpect no bias for the three remaining terms of (2.269), which becomes

d2σ

dΩ dE= (γre)2

kfki

∑i

∑f(

〈λi|M⊥x|λf 〉 〈σi|σ2x|σi〉〈λf |M⊥x|λi〉

+〈λi|M⊥y|λf 〉 〈σi|σ2y|σi〉〈λf |M⊥y|λi〉

+〈λi|M⊥z|λf 〉 〈σi|σ2z |σi〉〈λf |M⊥z|λi〉

)δ(Ef−Ei+ω) . (2.273)

The three remaining terms have factors 〈σi|σ2x|σi〉, 〈σi|σyx2|σi〉, and

〈σi|σ2z |σi〉. These terms evaluate to 1 as for example

〈↑ |σ2x| ↑〉 = 〈↑ |σx| ↓〉 = 〈↑ | ↑〉 = 1 . (2.274)

simplifying (2.273)

d2σ

dΩ dE= (γre)2

kfki

∑i

∑f(

〈λi|M⊥x|λf 〉 〈λf |M⊥x|λi〉

+〈λi|M⊥y|λf 〉 〈λf |M⊥y|λi〉

+〈λi|M⊥z|λf 〉 〈λf |M⊥z|λi〉)δ(Ef−Ei+ω) . (2.275)

In (2.275) we recognize that that the three terms in parentheses are theprojections onto a set of final states of the three components of the vectorM⊥. This can be obtained as 〈λf |M⊥|λf 〉〈λf |M⊥|λi〉. We therefore makeuse of (2.263) to rewrite (2.275) as

Page 98: Experimental Inelastic Neutron Scattering - Caltech Center for

Further Reading 85

d2σ

dΩ dE= (γre)2

kfki

∑α,β

(δαβ − Mα Mβ)

∑i

∑f

〈λi|M⊥α|λf 〉 〈λf |M⊥β |λi〉 δ(Ef−Ei+ω) . (2.276)

2.8 N/A Lipmann-Schwinger Equation

N/A Further Reading

The contents of the following are described in the Bibliography.Leonid V. Azaroff: Elements of X-Ray Crystallography, (McGraw-Hill, NewYork 1968), reprinted by TechBooks, Fairfax, VA.M. Born and K. Wang: Dynamical Theory of Crystal Lattices (Oxford Classicseries, 1988).B. Fultz and J. M. Howe: Transmission Electron Microscopy and Diffractom-etry of Materials, Second Edn. (Springer–Verlag, Heidelberg, 2002).S. W. Lovesey: Theory of Neutron Scattering from Condensed Matter, Vol. 1(Oxford,1984).S. W. Lovesey: Theory of Neutron Scattering from Condensed Matter, Vol. 2(Oxford,1984).A. A. Maradudin, E. W. Montroll, G. H. Weiss and I. P. Ipatova: The Theoryof Lattice Dynamics in the Harmonic Approximation, Second Edn. (AcademicPress, New York, 1971)V. F. Sears: Neutron Optics (Oxford, 1989).G. L. Squires: Introduction to the Theory of Thermal Neutron Scattering(Dover, Mineola, New York 1996).

Page 99: Experimental Inelastic Neutron Scattering - Caltech Center for
Page 100: Experimental Inelastic Neutron Scattering - Caltech Center for

3. Dynamics of Materials and CondensedMatter

3.1 N/A Models of Structure

3.2 Lattice Dynamics

3.2.1 Atomic Force-Constants

Following the notation of Maradudin, et al. [1], we consider a crystal gener-ated by the infinite repetition in space of a parallelepipedic unit cell definedby three noncoplanar vectors a1,a2,a3. The vectors a1, a2, a3 are theprimitive lattice vectors of the crystal. We label each unit cell by a triplet lof integers (positive, negative or zero): l = (l1, l2, l3). The equilibrium positionof the origin of the unit cell l is denoted

x(l) = l1a1 + l2a2 + l3a3 . (3.1)

If there are r > 1 atoms per unit cell, we assign an index κ = 1, 2...r to eachatom of a unit cell and write its mass Mκ. We describe the atomic equilibriumpositions with respect to the origin of a unit cell with so-called basis vectorsx(κ), κ = 1, 2...r so that the equilibrium position of atom κ in cell l is thengiven by the sum of the lattice plus basis vectors

x(lκ) = x(l) + x(κ) . (3.2)

Thermal fluctuations induce displacements in the atomic positions; thevector u(lκ) is the displacement of the atom (lκ) from its equilibrium po-sition x(lκ), and the uα(lκ) (α = x, y, z) are the corresponding cartesiancomponents. The instantaneous position R(lκ)(t) of atom (lκ) at time t isthen

R(lκ)(t) = x(lκ) + u(lκ)(t) . (3.3)

The total potential energy Φ of the crystal is assumed to be a function of theinstantaneous positions of all the atoms in the crystal

Φ = Φ(...,R(lκ), ...R(l′κ′), ...) . (3.4)

and it can then be expanded in a Taylor series of the atomic displacements

Page 101: Experimental Inelastic Neutron Scattering - Caltech Center for

88 3. Dynamics of Materials and Condensed Matter

Φ = Φ0 +∑lκα

Φα(lκ)uα(lκ)

+12

∑lκα

∑l′κ′α′

Φαβ(lκ; l′κ′)uα(lκ)uβ(l′κ′) + ... . (3.5)

In the harmonic approximation of lattice dynamics, we keep only theterms of the series written explicitly in (3.5) – we neglect terms of orderthree and higher in the displacements. The coefficients of the Taylor seriesare the derivatives of the potential with respect to the displacements:

Φα(lκ) =(

∂Φ

∂uα(lκ)

)0

, (3.6)

Φαβ(lκ; l′κ′) =(

∂2Φ

∂uα(lκ)∂uβ(l′κ′)

)0

, (3.7)

where the subscript zero means that derivatives are evaluated in the equi-librium configuration (all displacements equal to zero) and Φ0 is the staticpotential energy of the crystal. Because the force on any atom must vanishin the equilibrium configuration, we have [1]

Φα(lκ) = 0 ∀ α, l, κ . (3.8)

The nuclear part of the classical Hamiltonian for the whole crystal isH = T + Φ where T =

∑κ,l

p2κ.l

2Mκis the kinetic energy of the nuclei in the

crystal. In the harmonic approximation we obtain

H =∑κ,l

p2κ.l

2Mκ+ Φ0 +

12

∑lκα

∑l′κ′α′

Φαβ(lκ; l′κ′)uα(lκ)uβ(l′κ′) . (3.9)

We can rewrite the Hamiltonian in matrix form

H =∑κ,l

p2κ.l

2Mκ+ Φ0 +

12

∑lκ

∑l′κ′

uT (lκ)Φ(lκ; l′κ′)u(l′κ′) , (3.10)

where we have defined the 3 × 3 force-constant matrix Φ for the atom pair(lκ; l′κ′) by

Φ(lκ; l′κ′) = [Φαβ(lκ; l′κ′)] . (3.11)

If (l, κ) = (l′, κ′), then the components of the force-constant matrix aregiven by the second-order derivatives of the potential of (3.7). On the otherhand, if (l, κ) = (l′, κ′) ,then Φ is a so-called “self-force constant”, whoseexpression is derived from the requirement that there is no overall translationof the crystal:

Φ(lκ; lκ) = −∑

(l′,κ′) =(l,κ)

Φ(lκ; l′κ′) . (3.12)

Because −Φ(lκ; l′κ′)u(l′κ′) is the force acting upon atom (lκ) when atom(l′κ′) is displaced by u(l′κ′), it follows that Φ(lκ; l′κ′) must be a real symetricmatrix:

Page 102: Experimental Inelastic Neutron Scattering - Caltech Center for

3.2 Lattice Dynamics 89

Φ(lκ; l′κ′) =

a b cb d ec e f

. (3.13)

Because any crystal is invariant when translated by a lattice vector, the force-constant matrices must also have the following property:

Φ(lκ; l′κ′) = Φ(0κ; (l′ − l)κ′) = Φ((l − l′)κ; 0κ′) (3.14)

3.2.2 Equations of Motion

From the crystal Hamiltonian, one can derive the equations of motion for allnuclei in the crystal. In the harmonic approximation, we obtain:

mκ··u(lκ)2 = −

∑l′,κ′

Φ(lκ; l′κ′)u(l′κ′) ∀ l, κ . (3.15)

Up to this point, we have considered an ideal crystal with an infinite numberof atoms and unit cells; in the previous equations, the indices l and l′ wererunning over an infinite countable set. Recognizing that a real crystal can onlybe of finite size, we write N cell

x (resp. N celly , N cell

z ) for the number of unitcells in the crystal in the x (resp. y, z) direction, and N cell = N cell

x N celly N cell

z

is the total number of unit cells. According to 3.15, we thus have 3 × r ×N cell equations of motion to solve. It is then convenient to impose periodicboundary conditions on the crystal, by requiring that:

u((lx, ly, lz)κ) = u((lx +N cellx , ly, lz)κ) (3.16)

= u((lx, ly +N celly , lz)κ) (3.17)

= u((lx, ly, lz +N cellz )κ) . (3.18)

We can seek the solutions having the form of plane waves of wavevector q,angular frequency ωq,j , and polarization e(κ, qj):

u±(κl, qj) =1√Nmκ

e(κ, qj) ei(q·rl±ωq,jt) . (3.19)

The periodic boundary conditions impose the condition that the set ofpossible wavevectors q are discrete, although the typically large number ofunit cells in the crystal translates into a very fine mesh of q-points in recip-rocal space. The number of physically distinguishable wavevectors is equal toN cell, and this is the number of wavevectors within the so-called first Bril-louin zone in reciprocal space. A monoatomic crystal with one basis vectorhas a total of 3×N cell

x ×N celly ×N cell

z vibrational modes. With r atoms in thebasis of the unit cell, the crystal has 3×r×N cell vibrational modes, in agree-ment with its total number of mechanical degrees of freedom. Because thereis a factor of 3r more modes than wavevectors, each wavevector q is associ-ated a-priori with 3× r vibrational modes, identified by a “branch incex”, j.Each of the 3r different modes corresponds to a different polarization vectore(κ, qj) and angular frequency ωq,j (1 ≤ j ≤ 3r), although degeneracies canbe induced by symmetry, as discussed in section 3.4.

Page 103: Experimental Inelastic Neutron Scattering - Caltech Center for

90 3. Dynamics of Materials and Condensed Matter

3.2.3 The Eigenvalue Problem for the Polarization Vector

The polarization vector, e(κ, qj), a characteristic of each mode qj, containsinformatio on the excursion of each atom κ in the unit cell. The vectorse(κ, qj) for all the atoms in the basis (1 ≤ κ ≤ r) and their associatedangular frequencies ωq,j can be calculated by diagonalizing the “dynamicalmatrix” D(q). The dynamical matrix is obtained by substituting (3.19) into(3.15). It has the dimensions (3N × 3N) and is constructed from (3 × 3)submatrices D(κκ′, q):

D(q) =

D(11, q) . . . D(1N, q)...

. . ....

D(N1, q) · · · D(NN, q)

. (3.20)

Each sub-matrix D(κκ′, q) is obtained by taking the Fourier transform of theforce-constant matrix Φ(lκ, l′κ′), considered as a function of (l′ − l):

D(κκ′, q) =1√

mκmκ′

∑l′

Φ(0κ, l′κ′) eiq·(rl′−r0) , (3.21)

where we took l = 0 since the summation is over all values of l′ and the crystalis infinite periodic (i.e., the origin cell is arbitrary). By similarly collectingthe polarization vectors into a vector of size 3× r, we can rewrite our systemof differential equations with the plane wave solutions (3.19) in the form ofan eigenvalue problem:

D(q) e(qj) = ω2q,j e(qj) , (3.22)

where

e(qj) =

ex(1, qj)ey(1, qj)ez(1, qj)

...ez(N, qj)

. (3.23)

It can be shown that the (3r × 3r) dynamical matrix D(q) is hermitian(for any value of q), and thus is fully diagonalizable. The 3r eigenvectors andeigenvalues of the dynamical matrix evaluated at a particular wavevector qthen correspond to the 3r eigenmodes of vibration of the crystal for thatwavevector.

3.2.4 Calculation of the Phonon Density of States

In order to calculate the phonon density of states (DOS) of the crystal, weneed to diagonalize the dynamical matrix at a large number of points in thefirst Brillouin zone of reciprocal space. The diagonalization of D(q) at eachq point returns 3r eigenvalues of angular frequency ωq,j (1 ≤ j ≤ 3r), which

Page 104: Experimental Inelastic Neutron Scattering - Caltech Center for

3.3 Harmonic, Quasiharmonic and Anharmonic Phonons 91

are then binned into a DOS histogram. By carrying the procedure at a largenumber of wavevectors in reciprocal space, we can calculate the density ofstates.

Some description of procedures is needed to help connect to the actualcomputer codes.

3.2.5 Symmetry Constraints on the Force-Constant Matrices

3.2.6 References

[1] A. A. Maradudin, E.W. Montroll, G. H. Weiss and I. P. Ipatova: TheTheory of Lattice Dynamics in the Harmonic Approximation, Second Edn.(Academic Press, New-York, 1971)[2] G. Venkataraman, L. A. Feldkamp and V. Sahni: Dynamics of PerfectCrystals (MIT Press, Cambridge, 1975)[3] M. Born and K. Huang: Dynamical Theory of Crystal Lattices (OxfordClassic series, 1988)[4] P. Bruesch: Phonons: Theory and Experiment I, Lattice Dynamics andModels of Atomic Forces (Springer-Verlag, Berlin, 1982)[5] D. C. Wallace: Thermodynamics of Crystals (Wiley, 1972)

3.3 Harmonic, Quasiharmonic and Anharmonic Phonons

3.3.1 Definitions

In mechanics, the words “harmonic oscillator” and “anharmonic oscillator”are well understood. A harmonic oscillator is composed of masses connectedby generalized forces that are linear with a displacement of a generalizedcoordinate. This is Hooke’s law. The word “anharmonic” describes any oscil-lator with forces that deviate from this linear response. In thermodynamics,the word “anharmonic” is further subdivided into “quasiharmonic” and “an-harmonic,” which is given a more restricted meaning. Unfortunately, there isno universal agreement on where this division occurs. Furthermore, the word“harmonic” is itself sometimes a bit negotiable.

For thermodynamics, we will use the following choices of words to explainhow phonon frequencies change with the intensive variables temperature andpressure:

• Harmonic phonons undergo no change in frequency with T or P . The fre-quencies of harmonic phonons at all T and P are the same as at 0 K and0 GPa pressure.

• Quasiharmonic phonons have frequencies that depend on volume only. Ata fixed volume, however, they behave as harmonic oscillators. These fre-quencies can change with temperature, but only because thermal expansion

Page 105: Experimental Inelastic Neutron Scattering - Caltech Center for

92 3. Dynamics of Materials and Condensed Matter

alters the volume of the solid. Their frequencies would not change with tem-perature if a controlled pressure were used to maintain a constant volumeof the material.

• Anharmonic phonons change their frequencies for other reasons. For ex-ample, the interatomic potential may change with temperature becausechemical bonding is altered owing to electronic excitations across the Fermisurface. Thermal expansion is not necessarily linked to this process, so thereis a pure temperature dependence to the phonon frequencies, independentof volume effects.

3.3.2 Phonons in Thermodynamics

We can relate phonon changes with V and T to thermodynamics by consid-ering how the energy, E, and entropy, S, vary with temperature (the inde-pendent variable). The Helmholtz free energy, F = E − TS, is expected tovary with temperature as:

dFdT

=∂E

∂T

)V

+∂E

∂V

)T

dVdT

− S − T

[∂S

∂T

)V

+∂S

∂V

)T

dVdT

]. (3.24)

For the thermodynamics of electrons and phonons (neglecting magnetic en-tropy, for example), the physical origins of the five terms in Eq. (3.24) are:

• ∂E/∂T)V

includes the temperature-dependent occupancies of phonon andelectron states.

• ∂E/∂V)T

dV /dT is the change in electronic energy that can be describedas the work done against the bulk modulus owing to thermal expansion,dV /dT .

• S, evaluated at temperature T , is a large term that contains both electronand phonon parts, Sel and Sph. It is often the only temperature-dependencein simple harmonic models for which dF/dT ∂F/∂T . The big source ofthis temperature dependence of S(T ) is the Bose-Einstein occupancy factorof phonon states. At high temperatures, the energy in each phonon modeis kBT , and all phonon modes contribute equally to the heat capacity.For harmonic solids at high temperatures, differences in the phonon DOSwill cause a difference in entropy for different phases, but this differencein entropy does not change with temperature. (S increases with T by thesame amount for each phase.)

• ∂S/∂T)V

accounts for the temperature-dependence of the electron andphonon entropy, beyond what is expected from the Bose-Einstein occu-pancy factor. The temperature dependence of the phonon entropy involveschanges in the energies of the phonon states (an anharmonic effect). Itis commonly assumed that this term is zero (i.e., the energies of phononstates do not change with temperature if the volume is constant), but thisassumption is often incorrect.

Page 106: Experimental Inelastic Neutron Scattering - Caltech Center for

3.3 Harmonic, Quasiharmonic and Anharmonic Phonons 93

• ∂S/∂V)T

dV /dT includes both phonon and electron contributions. Thephonon part is often parameterized by a Gruneisen parameter, but theelectronic part can also be parameterized by an “electronic Gruneisen pa-rameter.”

We define harmonic, quasiharmonic, and anharmonic entropies in theterms of (3.24). For the phonon part of the entropy we have:

Sharm = S , (3.25)

Squasi = S +∆T

[∂S

∂V

)T

dVdT

], (3.26)

Sanh = S +∆T

[∂S

∂V

)T

dVdT

+∂S

∂T

)V

]. (3.27)

One view of the Gruneisen parameter, γ, is that it relates the change inentropy to the fractional change in volume of a solid:

S = S0

(V

V0

, (3.28)

∂S

∂V

)T

γS . (3.29)

Further recognizing that dV/dT = βV , where β is the volume coefficient ofthermal expansion, we can use (3.29) to simplify (3.26) and (3.27):

Squasi = S[1 +∆Tγβ

], (3.30)

Sanh = S[1 +∆Tγβ

]+

∂S

∂T

)V

, (3.31)

where we have switched to entropy per unit volume.When electronic entropy is included, it is possible to use an analogous

“electronic Gruneisen parameter” to express the volume dependence of theelectronic entropy

∂Sel

∂V

)T

= γelSel . (3.32)

Equation (3.32) can be used to extend the definition of the word quasihar-monic, but this convention has not yet been established. The temperaturedependence of the electronic contributions to S caused by Fermi-Dirac ther-mal occupancy factors are quite conventional, and are perhaps appropriatefor a “harmonic” models. Effects of electron-phonon interactions, however,are probably best considered as “anharmonic” effects.

Page 107: Experimental Inelastic Neutron Scattering - Caltech Center for

94 3. Dynamics of Materials and Condensed Matter

3.3.3 Phonons and Heat Capacity

Suppose we have measured the phonon DOS at different temperatures, andfound that the DOS changes with temperature. What are the effects of thistemperature-dependence on the heat capacity of the material? We need toknow how the heat goes into the material. Energy goes into phonon creation,but energy also goes into the expansion of a crystal against its bulk mod-ulus, electronic excitations, magnetic excitations, and these excitations mayinteract with each other. For a harmonic solid without other interactions, itis acceptable to consider only the energy required to populate the phononstates with increasing temperature. Although energy goes into the phononstates, phonons also contribute to the entropy of the solid. In a general ther-modynamic analysis, it is necessary to minimize a free energy function thatincludes phonon energy, phonon entropy, and the elastic energy of thermalexpansion, for example. The latter can make a large contribution and changethe heat capacity in a qualitative way.

Consider two analyses of phonon softening:1. First ignore thermal expansion. The heat capacity is calculated as CV for adistribution of harmonic oscillators. We can account for how the frequencies ofthese oscillators decrease with temperature, and CV is obtained by accountingfor this continuous decrease in frequency as a function of temperature. Fora particular phonon DOS, shown as the inset in Fig. 3.1, CV was computedat each temperature with the (softened) phonon DOS appropriate to thattemperature. In this case all phonon softened by the same fraction of theirenergy to maximum of 6.5 % at 300 K. This fraction was assumed linear withtemperature. At each temperature T , each mode of energy ε was assumed tocontribute to the heat capacity the amount

CV,mode(T ) = kB

kBT

)2 exp(ε/kBT )(exp(ε/kBT )− 1)2

. (3.33)

This expression can be obtained by differentiating the Planck distribution,[exp(ε/kBT )− 1]−1, and weighting by the energy of the mode, ε.

Notice in Fig. 3.1 that the total heat capacity curve differs little fromthe pure harmonic case with no phonon softening. The rise in heat capac-ity occurs at temperatures that are a bit lower, but the effect is essentiallynegligible. Additionally, there is no increase in the heat capacity above theDulong-Petit limit of 3R at high temperature. In the high-temperature limit,with phonon occupancies of kBT/ε per mode, the softening of the modesgives an increase in occupancy proportional to 1/ε, but a decrease in energyproportional to ε. The product of these two factors produces a heat capacityCV at high temperatures that is unaffected by mode softening. Even withphonon softening, CV at high temperatures remains 3R.2. Now allow for thermal expansion. We have to consider a minimization offree energy where the phonon entropy compensates the elastic energy of ex-

Page 108: Experimental Inelastic Neutron Scattering - Caltech Center for

3.3 Harmonic, Quasiharmonic and Anharmonic Phonons 95

pansion.1 Here we first need to assess the entropy of the harmonic oscillatorsas a function of temperature

Sosc(T ) =ε/T

exp(ε/kBT )− 1− kB ln[1− exp(−ε/kBT )] . (3.34)

This expression can be obtained from the partition function of a harmonicoscillator, Z =

∑n exp(−nε/kBT ) = [1 − exp(−ε/kBT )]−1. Obtain the free

energy from this partition function as F = −kBT lnZ, and differentiate toobtain (3.34) as S = −∂F/∂T . Without thermal expansion, (3.34) is consis-tent with (3.33) if we integrate:

SV,osc(T ) =

T∫0

CV,mode(T ′)T ′

dT ′ , (3.35)

(an expression which can be remembered from T dSV,osc(T ) = CV,mode(T ) dT ).The 6.5% shift of ε from 27 to 300 K was taken into account by making εa linear function of T in the same way as in example 1. With the total en-tropy of the solid (assumed to be entirely phonon entropy), we can calculatethe amount of heat going into the solid at constant pressure by using thedefinition of Cp

Cp,mode(T ) = TdS

dT

)p

. (3.36)

The result is also shown in Fig. 3.1.

1.0

0.8

0.6

0.4

0.2

0.0

Hea

t Cap

acity

[3R

]

300250200150100500

Temperature [K]

harmonic

softens with expansion

softens 7%, no expansion

difference: (no exp – harmonic)difference: (expansion – harmonic)

5

4

3

2

1

0

DOS [1/meV]

1412108642

Energy [meV]

Fig. 3.1. Heat capacityversus temperature for twoassumed physical models(examples 1 and 2 in text).Inset is the phonon DOSat 0 K – all modes wereassumed to soften by 6.5% at 300 K. A simple har-monic heat capacity witha phonon DOS unchangedwith temperature is alsoshown.

1 In general, other sources of entropy may compensate for this expansion, or othertypes of excitation can occur with temperature.

Page 109: Experimental Inelastic Neutron Scattering - Caltech Center for

96 3. Dynamics of Materials and Condensed Matter

At high temperatures, Cp,mode(T ) can be shown to approach 3R if thereis no thermal expansion. With thermal expansion, however, the differencebetween Cp and CV is the famous classical result: 9Bvα2T , where B, α, and vare bulk modulus, coefficient of linear thermal expansion, and specific volume.This exceeds 3R at elevated temperature, as shown in Fig. 3.1. The energygoing into thermal expansion makes a big difference in the heat capacity. Thephonon softening itself provides an entropy to allow this to occur, but thephonon contribution to the heat capacity from softening alone is not so largeas the energy of the expanded solid.

3.4 Group Theory and Lattice Dynamics

3.4.1 Real Space

The paper by A. A. Maradudin and S. H. Vosko “Symmetry Properties ofthe Normal Modes of a Crystal”, Reviews of Modern Physics 40, 1-37 (1968),shows how group theory can be used to understand the normal modes ofcrystal vibrations. The focus of their substantial manuscript is on using thesymmetry of the reciprocal lattice to find the eigenvectors of the dynamicalmatrix and classify them. The degeneracies of the different normal modesare addressed rigorously, and their association with the symmetry elementsof the crystal are useful in labeling them. Projection operator methods offerthe possibility of finding eigenvectors and eigenvalues without diagonalizingthe dynamical matrix.

The paper by J. L. Warren “Further Considerations on the SymmetryProperties of the Normal Modes of a Crystal”, Reviews of Modern Physics40, 38-76 (1968), also describes the point group of the bond. The bond meansthe interactions between an atom and its neighbors. The group of the bondrefers to the real space symmetries of the interatomic interactions, i.e., howthe force constants transform under the point group operations at a centralatom.

Consider the space group operator in Seitz notation:

S ≡ S |v(S) + x(m) , (3.37)

where S is a rotation operation, x(m) is a lattice translation, and v(S) is anadditional displacement that is required for non-symmorphic crystals (i.e.,crystals with screw axes or glide planes).2 Apply this operator to a displace-ment vector u (the displacement of an atom off its site during a vibration):

u′α(L,K) =∑β

Sαβuβ(l, κ) , (3.38)

where the operation serves to mix the Cartesian components (denoted sub-script α) of the displacement vector for the atom at l, κ, and translates the2 Note that this vector v(S) mixes the rotation and translation operations.

Page 110: Experimental Inelastic Neutron Scattering - Caltech Center for

3.4 Group Theory and Lattice Dynamics 97

vector to the atom at L,K. The potential energy of the crystal dependsquadratically on the uα, times a force constant matrix involving the spatialderivatives of the potential along the Cartesian axes of the uα. The potentialenergy of the crystal is invariant under symmetry operations of (3.37). Thisleads to the equality:

Φµν(LK,L′K ′) =∑αβ

SµαSνβΦαβ(lκ, l′κ′) . (3.39)

The matrix equation (3.39) must be true for all valid force constant matri-ces Φαβ(lκ, l′κ′). It is instructive to set S = I, the identity, so there is norotation, and only translations are imposed. This can be used to show thatforce constants can depend only on relative separations between atoms, notabsolute positions.

A number of other tests of force constants can be performed with (3.39).Imposing rotations that mix the Cartesian axes can be used to demonstratethat some force constants are equal. Force constants that must equal theirnegative are found – this result means that the force constant is zero. Equa-tion (3.39) could be handy for determining allowed force constants if a set ofspace group matricies, S, are available.

3.4.2 k-space

Quantum Mechanics. In quantum mechanics, group theory addresses thesymmetry of the hamiltonian, H. If an operator, R, commutes with H,

RH = HR , (3.40)∑j

RijHjk =∑j

HijRjk , (3.41)

it is convenient to select basis functions for which R is diagonal, so the singleremaining terms in the sums are:

RiiHik = HikRkk , (3.42)(Rii −Rkk)Hik = 0 . (3.43)

Equation (3.43) shows that when i = k, then the off-diagonal elements Hik =0. The basis functions for which R is diagonal are the same for which H isdiagonal.

For example, consider the rotational symmetry of a hydrogen atom aboutthe z-axis. The Abelian group of rotations has 1-dimensional representationsin terms of functions eimφ. Done. Obtaining the φ-dependence this way wasmuch easier than solving the Schrodinger equation in spherical coordinates.

Lattice Dynamics. The analogous question for lattice dynamics is, “Canwe use symmetry to get the eigenvectors of the dynamical matrix withoutsolving the eigenvalue problem in detail?” The dynamical matrix is:

Page 111: Experimental Inelastic Neutron Scattering - Caltech Center for

98 3. Dynamics of Materials and Condensed Matter

Dαβ(κκ′|k) =1√

MκMκ′

∑l′

Φαβ(lκ; l′κ′) exp[−ik · (x(l)− x(l′))] ,(3.44)

and the relevant eigenvalue equation is:∑βκ′

Dαβ(κκ′|k)uβ(κ′) = ω2uα(κ) . (3.45)

All functions in (3.45) live in reciprocal space. The entire paper of Maradudinand Vosko is in reciprocal space, or k-space.

Table 3.1. Elementary Variables Used by Maradudin and Vosko

l, l′ indices of unit cells

κ, κ′ indices of atom in basis

r number of atoms in basis

xl,κ atom site in a crystal

xl lattice site in a crystal

xκ basis vector

Mκ mass of atom in basis

α, β Cartesian indicies x, y, zu(κ) and uα(κ), uβ(κ) atom displacement in a phonon,

and Cartesian components

Φαβ(lκ; l′κ′) force constant between two atoms

e(k, σ, λ) phonon polarization vector

(with components for all κ in unit cell)

σ (or s) denotes (or index for) a distinct value of ω2j

λ (or a) denotes (or index for) independent

eigenvector for each σ or ω2j

fσ number of eigenvectors for each

degenerate energy (1 ≤ a ≤ fσ)

S ≡ S |v(S) + x(m) Seitz space group operator

h order of the group (number of elements)

S matrix of rotation or improper rotation

v(S) little displacement vector

for a screw axis operation

x(m) lattice translation vector

Γ S(k; S |v(S) + x(m)) 3r × 3r unitary matrix of symmetry

operator (in recip. space)

Ri ≡ R |v(S) + x(m) symmetry operator

for a single wavevector k

Consider the matrix Γ S(k) that performs symmetry operations S on thedynamical matrix. Doing two such operations is tricky, since the k used inconstructing the matrix for the second operation depends on the result of the

Page 112: Experimental Inelastic Neutron Scattering - Caltech Center for

3.4 Group Theory and Lattice Dynamics 99

first operation. Maradudin and Vosko choose instead to work with the spacegroup of a single wavevector k, and designate the symmetry operations byRi = R |v(S)+x(m). These symmetry operations on k produce equivalentwavevectors. In particular, the rotational part of Ri therefore must generatea k that differs only by a reciprocal lattice vector g:

Rk = k − g . (3.46)

This is quite restrictive, and means that g is zero for most vectors k. The situ-ation is much like the allowed k-vectors for ordered structures in the Landau-Khachaturyan formalism of second-order phase transitions. The operationsof (3.46) eliminate the equivalent vectors from the star of k. Inequivalent kcan exist only at special points such as the boundaries of Brillouin zones.

So although:

D(Sk) = Γ−1S (k)D(k)Γ S(k) , (3.47)

and therefore in general:

D(k) = Γ−1S (k)D(k)Γ S(k) , (3.48)

with the restriction to the group of the wavevector k, the unitary matriciesΓRi commute with D:

D(k) = Γ−1Ri

(k)D(k)ΓRi(k) . (3.49)

These ΓRi(k) actually form a 3r-dimensional unitary representation of

the space group of the wavevector, k. They could be used to develop thesymmetry properties of the eigenvectors of the dynamical matrix, but this isnot the approach of Maradudin and Vosko.

Multiplier Representation. Maradudin and Vosko define a new matrixT(k;Ri), which differs from the ΓRi(k) by an exponential phase factor ofmodulus unity:

T(k; Ri |v(S) + x(m)) = exp[ik · (v(S) + x(m))]×ΓRi

(k; R |v(S) + x(m)) , (3.50)

This choice of T(k;Ri) is somewhat unusual because these matricies do notform a group in the usual sense – the product of two of them is not an elementof the group:

T(k;Ri)T(k;Rj) = exp[ig · v(Rj)]T(k;RiRj) . (3.51)

(where the product of exponentials of two cases of (3.50) were simplified bynoting the restrictive condition (3.46) on the allowed R, giving the conditiong · x(m) = 2πm, and exponential phase factors of +1). The phase factorexp[ig ·v(S)] can differ from +1, although it differs from +1 only for crystalswith screw axes AND special k-points.3

3 Is it important to study phonons (or magnons) at special k-points in crystalswith screw axes (non-symmorphic crystals)?

Page 113: Experimental Inelastic Neutron Scattering - Caltech Center for

100 3. Dynamics of Materials and Condensed Matter

Matrices T(k;Ri that obey a multiplication rule of (3.51) are said toform a “multiplier representation” of the group of Ri. The phase factor isthe “multiplier.” For most crystals this is +1, and we are back to ordinarygroup representations. Even if the multiplier is complex, however, if we canget the eigenvectors of these T, we can get the eigenvectors of the dynamicalmatrix, D.

We rewrite (3.45):

D(k)e(kσλ) = ω2σe(kσλ) , λ = 1, 2, 3 . . . fσ , (3.52)

noting that:

D(k)[T(k;Ri)e(kσλ)] = ω2σ[T(k;Ri)e(kσλ)] . (3.53)

The T mix the degenerate e(kσλ) (i.e., they mix those λ that go with thesame σ). Showing this more clearly, we write:

T(k;Ri)e(kσλ) =fσ∑λ′

τ(σ)λ′λ(k;Ri)e(kσλ′) , (3.54)

for every Ri in the group of the wavevector k. The fσ functions transformamong themselves under T(k;Ri). Furthermore, from (3.49) we can showthat T(k;Ri) commutes with D. These conditions are sufficient to show thatthe τ (σ)(k;Ri) provide an fσ-dimensional irreducible multiplier represen-tation of the point group of the wavevector k.

Now make a vector of all eigenvectors:

e(k) =[e(kσ1λ1), e(kσ1λ2), . . .e(kσ2λ1), e(kσ2λ2), . . .

], (3.55)

which transforms as:

T(k;Ri)e(k) = e(k)∆(k;Ri) , (3.56)

and the 3r × 3r dimensional matrix ∆(k;Ri) has the block-diagonal form:

∆(k;Ri) =

τ (1)(k;Ri) 0 0 . . .

τ (2)(k;Ri) 0 . . .

0 0 τ (3)(k;Ri) . . .

.

. (3.57)

The unitary matrices τ (σ)(k;Ri) are known for all 230 space groups. In aformal sense, the problem is solved.

Projection Operators. In a practical sense, we can generate the eigenfunc-tions by projection operator machinery. Maradudin and Vosko show that:

P(s)λλ′(k) = fs/h

h∑Ri

τ(s)λ′λ(k;Ri)∗ T(k;Ri) (3.58)

Page 114: Experimental Inelastic Neutron Scattering - Caltech Center for

3.4 Group Theory and Lattice Dynamics 101

is a projection operator.The projection operator method is considered standard practice, and is

not developed further by Maradudin and Vosko. Perhaps it is useful to reviewit in the context of group theory in quantum mechanics.

Suppose a set of φ(j)λ are partner functions in the representation (j),

and transform among themselves under operation of the symmetry operatorPRi

. Explicitly:

PRiφ(j)κ =

lj∑λ=1

φ(j)λ Γ

(j)λκ(Ri) . (3.59)

Multiply by the complex conjugates of all representation matrices and sumover all elements in the group:

h∑Ri

Γ(i)λ′k′(Ri)∗PRi

φ(j)κ =

h∑Ri

lj∑λ=1

Γ(i)λ′k′(Ri)∗Γ

(j)λk (Ri)φ(j)

κ , (3.60)

h∑Ri

Γ(i)λ′k′(Ri)∗PRi

φ(j)κ = δijδκκ′φ

(j)λ′ , (3.61)

where the last line was obtained through the Great Orthogonality Theoremof group representation theory. Equation (3.61) shows how a projection op-erator, P(j)

λk :

P(j)λk = lj/h

∑Ri

Γ(i)λ′κ′(Ri)∗PRi

, (3.62)

pulls out the function φ(j)λ′ .

For the eigenvectors of the dynamical matrix for a particular k, the pro-jection operator of (3.58) does the same thing. Since the matricies τ (σ)(k;Ri)are available, one could use projection operator techniques to operate on anarbitrary vector and generate all eigenfunctions of the dynamical matrix. La-bels can be assigned to various phonons based on group theory designations.Another step could be to substitute the e(kσλ) into (3.52) and obtain ω2

σ bymatrix multiplication rather than by matrix inversion. Is this useful, or justelegant? Projection operator methods will reveal all degeneracies of normalmodes for a particular k. In such cases where a set of partner eigenvectors isfound, it is not possible to obtain them directly. This requires diagonalizingthe dynamical matrix to solve for the eigenvectors, or more accurately a blockdiagonal form of the dynamical matrix as in (3.57).

Compatibility Relations. The paper by J. L. Warren “Further Consid-erations on the Symmetry Properties of the Normal Modes of a Crystal”,Reviews of Modern Physics 40, 38-76 (1968), adds to the discussion ofMaradudin and Vosko. Compatibility relationships are described in more de-tail in Warren’s paper. Compatibility relationships refer to the new degen-eracies that appear when special high symmetry directions in the Brillouin

Page 115: Experimental Inelastic Neutron Scattering - Caltech Center for

102 3. Dynamics of Materials and Condensed Matter

zone come together at special points, such as at the point Γ at the center ofthe zone, or at the points X, W, K, L on the surface of the zone.

For example, when moving along a line in k-space along the (100) direc-tion, an abrupt change in symmetry occurs when the edge of the zone (X)or center of the zone (Γ ) is reached. The source of this new symmetry isthe fact that at these special points, translational vectors of the reciprocallattice cause the points to become equivalent (identical) to other points inthe reciprocal lattice.4 For example, at an arbitrary position along the (100)direction, the symmetry elements are E, C2

4 , 2C4, 2σv, 2σd. This fourfoldaxis obviously does not have threefold symmetry elements, but the situationchanges at the origin, point Γ . The (111) direction, which includes a three-fold axis, also converges at Γ . Some representations along the (100) axis areexpected to be compatible with some representations along the (111) axiswhen the two axes meet at the origin. The larger symmetry group at theorgin, point Γ , contains the elements of the threefold and fourfold axes assubgroups. Some representations of the groups from the threefold and four-fold axes are compatible at Γ , while some are not. Those that are compatibleat Γ must have eigenvalues that are degenerate in energy. Their associatedphonon branches rigorously converge in energy at Γ .

The way to test for compatibility is to inspect the characters, χ(Ri) =Tr[Γ (Ri)], of the representations of the three groups. This can be done withthe decomposition formula of group representation theory in exactly the sameway as is done for analyzing the degeneracies in crystal field theory. (Afterall, we are considering only the point group of the wavevector.) The decom-position formula for the characters is:

ai =1h

∑Ri

χ(Ri)∗χ(R) , (3.63)

where ai is the number of times that a particular representation of the sub-group (e.g., of the threefold axis) appears in the group representation of thespecial point (e.g., Γ ).

Equation (3.63) is most easily used by inspection of character tables.5 Forexample, if all characters of a representation along the fourfold axis matchthe characters of a representation at Γ , these representations are compatible.In a more complicated situation where there is only one ai = 1, the sum ofthe characters from the representations along the fourfold axis must equal thecharacter of a representation at Γ . For the simplest example, the charactersof all symmetry elements in the ∆1 representation of the group of the fourfoldaxis are +1. The same symmetry elements have characters +1 for the Γ pointfor the representation Γ1. The threefold axis has a different set of symmetry4 These k-vectors are not identical when they are just slightly displaced off these

special points, and related eigenvectors have to be considered independently.5 These are found in the classic paper by L. P. Bouckaert, R. Smoluchowski, and

E. P. Wigner, Phys. Rev. 50, 58 (1936), and an excellent description is providedin Chapter 8 of M. Tinkham’s book on Group Theory and Quantum Mechanics.

Page 116: Experimental Inelastic Neutron Scattering - Caltech Center for

3.4 Group Theory and Lattice Dynamics 103

elements than the fourfold axis, but these elements are also +1 for the Γ1

representation, and are +1 only for the Λ1 representation. We deduce that the∆1 representation of the (100) fourfold axis and the Λ1 representation of the(111) threefold are compatible at the point Γ . These two representations havethe same basis functions as Γ1, but the symmetry operators at Γ interchangethese basis functions because they are degenerate in energy. The significancethat the basis functions of the ∆1 and Λ1 representations must have exactlythe same energy at the point Γ in k-space. They are not degenerate just awayfrom the Γ point (unless accidentally, or in the case of no crystal potential),but group theory says that they are rigorously degenerate at Γ . This is aresult of potential use in the analysis of phonon data. We can determine therequired conditions for the merging of dispersion curves at special point ink-space. (Incidentally, s-type functions are suitable basis functions for thesymmetric representations in this simple example.)

3.4.3 Time-reversal symmetry in the dynamical matrices

Time reversal symmetry must be considered in magnetic systems. Considerthe spin as a rotation in a particular direction. The spin is flipped upon timereversal. Time reversal symmetry must also be considered in certain cases fornon-magnetic systems, and results in additional degeneracies. In most casestime-reversal symmetry does not result in additional degeneracies, however.(Perhaps we could consider additional degeneracies as “accidental,” but getthe software to flag them so we can inspect for this later.)

When the Hamiltonian is invariant by the time-reversal operation (thedirection of momentum, or spin is inverted), the system is said to have thetime-reversal symmetry. The system without the external magnetic field hasgenerally the time-reversal symmetry. The time-reversal symmetry often givesthe nontrivial physical significance like the additional degeneracy of the sys-tem. One of most well-known examples is the Kramers degeneracy, i.e. asystem of an odd number of electrons has the extra degeneracy, but an evennumber does not. Of course, the present ionic lattice system has such sym-metry, too. Therefore, it needs to be checked if there occur additional degen-eracies or not due to the symmetry, which can be done by investigating thesymmetry of the dynamical matrices.

Maradudin and Vosko begins the discussion by considering the additionalrotational element S k = −k in the point group of the crystal. In the sameway as R (in the the point group G0), with each element S R (in the cosetS G0) we associate a new matrix operator T (k;S R), which is defined anti-unitary as it should be. The analysis for T (k;R) in section 4.4.3 can be ex-tended straightforwardly to include the anti-unitary matrix operator T (k;A)(the element S R will be denoted by A hereafter). It is highly desirable toderive the condition for the existence of extra degeneracies due to the time-reversal symmetry, by looking into the linear dependence of the eigenvectors

Page 117: Experimental Inelastic Neutron Scattering - Caltech Center for

104 3. Dynamics of Materials and Condensed Matter

e(ksaλ) and T (k;A)e(ksaλ) (it is clear both should be eigenvectors becausethe system has the time-reversal symmetry). We define

e(ksaλ) = T (k;A)e(ksaλ) (3.64)

and consider and compare the transformation properties of e(ksaλ) ande(ksaλ) under T (k;R)

T (k;R)e(ksaλ) =fs∑λ′

τ(s)λ′λ(k;R)e(ksaλ′) , (3.65)

T (k;R)e(ksaλ) =fs∑λ′

τ(s)λ′λ(k;R)e(ksaλ′) , (3.66)

where it is found that the irreducible multiplier representations τ (s)(k;R)and τ (s)(k;R) belong to the same factor system. They can be either equiv-alent or inequivalent. In particular, they can be separated into three typesdepending on the relationship between two irreducible multiplier representa-tions.

First, we think of a case the irreducible multiplier representations τ (s) andτ (s) are inequivalent, which will be referred to as of the third type. In thiscase, the eigenvectors e(ksaλ) and e(ksaλ) are orthogonal and the fs-folddegeneracy in the dynamical matrix is doubled by 2fs by the time-reversalsymmetry.

On the other hand, it is a bit complicated for an alternative situationτ (s) and τ (s) are equivalent. In the case, two representations are related by asimilarity transformation, τ (s)(k;R) = β−1τ (s)(k;R)β, where β is a unitarymatrix. Thanks to the irreducibility of the matrices τ (s)(k;R), the unique-ness up to a phase factor is followed for the matrix β. By Schur’s Lemmas, thematrix ββ∗τ (s)(k;A−2

0 ) commuting with all the matrices τ (s)(k;R) of anirreducible multiplier representation of the point group must be proportionalto the unit matrix. This results in two cases;

ββ∗ = φ(k;A0;A0)τ (s)(k;A20) , (3.67)

ββ∗ = −φ(k;A0;A0)τ (s)(k;A20) , (3.68)

where φ(k;A0;A0) is a ”multiplier”. Further, as is often the case, ββ∗ = ±1for a suitable element A0 in S G0. Now we can turn our attention to theproblem of liner independence of e(ksaλ) and e(ksaλ). For the purpose, itwould be easy to investigate the scalar product of two eigenvectors. For thenecessary algebra, it is important to note the scalar products of a unitaryand an anti-unitary transformation on vectors are distinguished as

〈T (k;R)ϕ, T (k;R)ψ〉 = 〈ϕ,ψ〉 ,

〈T (k;A0)ϕ, T (k;A0)ψ〉 = 〈ψ,ϕ〉 ,

Page 118: Experimental Inelastic Neutron Scattering - Caltech Center for

3.4 Group Theory and Lattice Dynamics 105

and also the properties for the successive transformations under T (k;R) andT (k;A0) on the eigenvectors e(ksaλ) and e(ksaλ). After a little algebra, itis finally found that, adopting ββ∗ = ±1,

〈e(ksaλ′), e(ksaλ)〉 = ±〈e(ksaλ′), e(ksaλ)〉 , (3.69)

where the upper plus sign is corresponding to a case in Eq.(4) and the lowerminus sign to a case in Eq.(5), respectively. Clearly, if ββ∗ satisfies Eq.(5),then

〈e(ksaλ′), e(ksaλ)〉 = 0 .

This means that two eigenvectors are linearly independent and the minimumdimension of the subspace that is invariant under T (k;R) is 2fs. In thecase, the set of eigenvectors transforms according to an irreducible multiplierrepresentation of the second type under the symmetry operations. The othercase where ββ∗ satisfies Eq.(4) cannot say anything about the linear indepen-dence of two eigenvectors. If they are linearly dependent, they can differ byat most an arbitrary phase factor and there occurs no additional degeneracy.On the other hand, if they are linearly independent, this can be referred toas an accidental degeneracy. This is a case under the irreducible multiplierrepresentations called the first type.

The above discusses the criteria for establishing the type of represen-tation by dealing with the relation between τ (s)(k;R) and τ (s)(k;R).Before closing this section, it may be heuristic to introduce the analogouscriterion for irreducible multiplier representations. Starting from the orthog-onality theorem,∑

R

τ(s)µµ′(k;R)∗τ (s)

νν′(k;R) = (h/fs)β−1µν∗β∗ν′µ′ , first or second type,

= 0 , third type,

where h is the order of the group G0. Using the relation between τ(s)µµ′(k;R)

and τ(s)µµ′(k;A−1

0 RA0) and Eqs.(4) and (5), we arrive at another interestingcriterion∑

R

φ(k;A0R,A0R)τ (s)λλ′(k;A0RA0R) = +(h/fs)δλλ′ , first type,

= −(h/fs)δλλ′ , second type,= 0 , third type.

It is often customary to express the criterion in terms of the characters χs,i.e. χs(k;R) = Trτ s(k;R),∑

R

φ(k;A0R,A0R)χ(s)(k;A0RA0R) = +h , first type,

= −h , second type,= 0 , third type.

Page 119: Experimental Inelastic Neutron Scattering - Caltech Center for

106 3. Dynamics of Materials and Condensed Matter

The criterion can be also expressed as a sum over the elements A0 of thecoset S G0 instead of R of the point group G0∑

A0

φ(k;A0,A0)χs(k;A20) = +h , first type,

= −h , second type,= 0 , third type.

3.4.4 Implementation in DANSE

Some results from group theory seem both useful and practical to implementin software. Others are not such good value:

• The point group of the bond can be used to fill out the force constantmatrix, to check for inconsistencies of the force constants, and to helpin generating them. This should, in principle, be facilitated by the ma-trix operations that are available as Pythonized routines in ComputationalCrystallographic Toolbox from the Lawrence Berkeley National Lab [?].

• The group of the wavevector can be assesed. If the Brillouin zone has beenassessed previously by group theory, we can use the compatibility relation-ships to determine which dispersions are degenerate in energy at specialpoints. This is important information when assessing the behavior of fuzzydata. Knowing that a convergence of curves is expected puts constraints ondata, and allows a larger number of counts to be analyzed simultaneously,improving reliability.

• Time reversal symmetry might be useful to consider in magnetic systems.It seems plausible that one could assess the merging of magnon dispersionsat special points, but we need to see how well this has been worked out bytheorists. It would probably be too much to actually calculate characterdecompositions on the computer for individual cases.

• I think that actually reducing the dynamical matrix by symmetry is toomuch to do. The procedure may be elegant to implement, but the net gaindoes not seem large enough when compared to brute force diagonalization,which works rather well so far.

3.5 Spin Dynamics in Solids

3.5.1 Spin as a Source of Magnetism

Electrons are the source of magnetism in materials. Although the atomicnuclei also have spins and magnetic moments, nuclear moments are smallerby a factor of 1,000. The electron contributes to magnetism in two separateways. One is from orbital motion – the classical origin of magnetism. TheHamiltonian for electron motion in an electromagnetic field is

Page 120: Experimental Inelastic Neutron Scattering - Caltech Center for

3.5 Spin Dynamics in Solids 107

H =1

2m

[p+

e

cA(r)

]2

. (3.70)

Here we assume that the magnetic field H is uniform and take the Coulombgauge of ∇ ·A = 0, consistent with A(r) = 1

2 (H × r):The first order term with respect to A(r) gives

H(1) =e

2mcH · (r × p) (3.71)

= µBH ·L , (3.72)

where L = r × p (orbital angular momentum) and µB = e/2mc (Bohrmagneton). Incidentally, the second order term in (3.70) is:

H(2) =e2

8mc2(r ×H)2 , (3.73)

which is simply the magnetic induction, i.e. Lenz’s law. The first order term(3.72) gives the paramagnetism leading to the magnetization parallel to themagnetic field, while the second order term (3.73) gives the diamagnetismleading to the magnetization antiparallel to the magnetic field. For atomswith closed shells (i.e. L = 0) or superconducting metals, diamagnetismplays the dominant role. Except for such cases, however, paramagnetism isusually more important than diamagnetism.

There is another important contribution to magnetism from the electronbesides its orbital motion. Electron spin angular momentum is the essen-tial ingredient of magnetism in most systems having interesting magneticproperties. In metallic systems where the electron wavefunction is well ap-proximated as a plane wave, it can be shown easily that L = 0. The angularmomentum also vanishes in insulators when the force the electron feels in asolid deviates much from the spherical symmetry the electron would feel inan isolated atom. In these cases, an orbital motion of the electron cannotcontribute to the magnetism.

Electron spins can be localized or itinerant, and these two cases providedifferent types of magnetism. Usually, localized spins are found at ions inmagnetic insulators and itinerant spins are on conduction electrons in metal-lic systems, although there are other important magnetic systems with bothitinerant and localized spins that show unusual properties. The following sec-tions describe the characteristic magnetic properties of localized spins, itiner-ant spins, localized spins immersed in itinerant spins, and strongly correlatedelectrons.

3.5.2 Localized Spins

Consider a system of localized spins, where the spins are arranged periodicallyon a crystal, and interact with each other through an exchange interaction. Tounderstand effects of the spin-spin exchange interaction in the system, several

Page 121: Experimental Inelastic Neutron Scattering - Caltech Center for

108 3. Dynamics of Materials and Condensed Matter

kinds of spin models are available. These textbook models have a long history.Depending on the spin dimensionality, there are the Heisenberg model, theXY model, and the Ising model or n-state Potts model. The commonly-used Heisenberg model treats three-dimensional spins, the XY model treatstwo-dimensional spins, and the Ising model or n-state Potts model treatsone-dimensional spins. This section discusses magnetic properties of localizedspins within the ferromagnetic Heisenberg model.

For an external magnetic field hz, we have the spin interaction Hamilto-nian (J > 0) on the square lattice6

H = −J∑i =j

Si · Sj − gµB∑i

hSzi , (3.74)

where the first term gives the spin-spin interaction intrinsic to the Heisenbergmodel. Now introduce the “mean field” (or “molecular field”) approximation.Details of interactions between neighboring spins are ignored, and the Hamil-tonian H is replaced by:

H = −J∑i =j

Si · 〈Sj〉 − gµBh∑i

Szi . (3.75)

The magnetization 〈Mz〉 = −gµB∑

i〈Siz〉 = −gµBN〈Sz〉 can then be ob-tained through 〈Sz〉 =

∑Sze−βH/Z, where Z =

∑e−βH. The evaluation of

〈Sz〉 is simple because H now includes only scalar quantities. Following thedefinition of the susceptibility χ = limh→0〈Mz〉/h,

χ =C

T − TC, (3.76)

where TC and C are called the Curie temperature and the Curie constant,respectively. The temperature-dependence of χ in (3.76) is characteristic ofa localized spin system.

For understanding dynamical properties of a magnetic system, a startingpoint is its elementary excitations. For the case of three-dimensional spins inthe Heisenberg model, the elementary excitation is known as a spin wave (ormagnon). We consider the operator Oq that creates a specific excitation inthe system,

[H,Oq] = ωqOq , (3.77)

where ωq is the energy of the excitation. The operator Oq raises the spin waveand provides the spin wave energy. Introducing the Fourier transformationof spin operators, we reexpress the Heisenberg Hamiltonian as:

H = −∑q

J(q)S(q) · S(−q) (3.78)

= −∑q

J(q)[Sz(q)Sz(−q) +

12

(S+(q)S−(−q) + S−(q)S+(−q)

)], (3.79)

6 For geometrical reasons, on some lattices the spins cannot have long-range order.

Page 122: Experimental Inelastic Neutron Scattering - Caltech Center for

3.5 Spin Dynamics in Solids 109

where we introduce S(q) =∑

i Sieiq·Ri and S±(q) =∑

i Si±eiq·Ri (Si± =

Six±iSiy). Assuming the ground state is ferromagnetic, the low energy excitedstates should correspond to states with spins slightly deviated from perfectalignment. S−(q) is an operator that performs this role – it creates the spinwave excitation (magnon). The excitation energy of magnon is determinedfrom (3.77):

[H, S−(q)] = ωqS−(q) , (3.80)

which is not, however, exactly solvable and requires an approximation. Themost immediate approach is the mean field approximation forH, which yields:

ωq = 2〈Sz〉[J(0)− J(q)] (3.81)≈ 2(J/N)〈Sz〉a2q2 , (3.82)

where for the three-dimensional cubic lattice:

J(q) = 2(J/N)[cos(qxa) + cos(qya) + cos(qza)] . (3.83)

At low temperatures, 〈Sz〉 ≈ NS and the magnon energy is

ωq = 2JSa2q2. (3.84)

The magnon energy spectrum is gapless, i.e., ωq → 0 as q → 0. The zero tem-perature magnetization (M0) then decreases with increasing T as magnonsare created. At small T :

M(T ) = M0 − gµB∑q

nq , (3.85)

where nq is the Bose distribution function for magnons. A very famous resultis the decrease of magnetization at low T is:

M(T )M0 − 1

∝ T 3/2 , (3.86)

which is obtained by a simple integration of (3.85).

3.5.3 Itinerant Spins

Both itinerant electrons in metals and localized spins in insulators exhibitinteresting magnetism. The magnetization of the system, 〈Mz〉, in an externalmagnetic field h is:

〈Mz〉 = −µB∑k

[〈c†k↑ck↑〉 − 〈c

†k↓ck↓〉

], (3.87)

where c†k↑ (ck↑) is an electron creation (annihilation) operator with a mo-mentum k and spin up. In the noninteracting electron gas, the magneticsusceptibility (called the Pauli susceptibility χP) is:

Page 123: Experimental Inelastic Neutron Scattering - Caltech Center for

110 3. Dynamics of Materials and Condensed Matter

χP = 2µ2BN(εF )[1 +O(T/εF )2] , (3.88)

where N(εF ) is the electron density of states at the Fermi level and εF isthe Fermi energy. χP is almost constant at low temperatures and has a veryweak temperature dependence.

Now consider a ferromagnetic metal. In ferromagnetic metals, the ex-change interaction between electrons can raise the ferromagnetic order byovercoming the competition between kinetic energy and exchange energy. Thesusceptibility, χS , depends on the electron exchange interaction V , called theStoner susceptibility. It can be obtained by extension of χP as:

χS =χP

1− 12µ2BV χP

. (3.89)

Noting that χP ≈ 2µ2BN(εF ) at low temperatures, χS becomes:

χS = 2µ2B

N(εF )1− V N(εF )

. (3.90)

From (3.90), 1 − V N(εF ) ≥ 0 is a ferromagnetic instability condition atT = 0, called the “Stoner condition.” For transition metals, the d-band isnarrow and N(εF ) can be large, so the Stoner condition is often satisfied (asfor Fe, Co, Ni).

The temperature dependence of χS is very weak at room temperature,especially compared to the Curie–Weiss susceptibility. This can be easilyunderstood because only electrons near the Fermi level can participate inthermally-driven magnetic excitations. Nevertheless, the temperature depen-dence of the Stoner susceptibility provides context for a longstanding puzzleof the ferromagnetism observed in Fe (TC =1044 K), Ni (627 K), and Co (1388K). Putting χP = 2µ2

BN(εF )[1 − aT 2], and χS(TC) = ∞ at the transitiontemperature TC, we obtain for χS(T ):

χS =2µ2

B/V a

T 2 − T 2C

=2µ2

B/V a

(T + TC)(T − TC), (3.91)

and, in particular, near TC:

χS ≈µ2B/V aTC

T − TC. (3.92)

The Stoner susceptibility therefore shows a Curie–Weiss behavior near TC.However, it is well known that ferromagnetic metals like Fe, Ni, and Co showCurie–Weiss behavior over much wider temperature ranges. The observedCurie–Weiss behavior has been one of the most important sources of contro-versy over whether spins in ferromagnetic transition metals are itinerant orlocalized. Improving the Stoner spin susceptibility within a picture of itiner-ant spins remains an open problem.

Page 124: Experimental Inelastic Neutron Scattering - Caltech Center for

3.5 Spin Dynamics in Solids 111

Dynamical responses of spins in metals are also very different from thosein localized spin systems. For conduction electrons, magnetic responses oftheir spins are directly related to details of the electron band structure. Inthe noninteracting electron gas, χ0(q, ω) governing the magnetic responsesof the system is

χ0(q, ω) = 2µ2B

∑k

nk − nk+qεk+q − εk − ω

, (3.93)

where nk is the Fermi distribution function and εk is the band energy at k.We note that the Pauli susceptibility χP corresponds to χ0(q, ω) at q = 0and ω = 0. In the same way as was found for non-interacting systems, forinteracting electron systems in the paramagnetic state, χ(q, ω) is:

χ(q, ω) = 2µ2B

F (q, ω)1− V (q)F (q, ω)

. (3.94)

The susceptibility χ(q, ω) is directly related to the neutron scatteringcross section as:

S(q, ω) =2

1− e−βωImχ(q, ω) . (3.95)

It is curious that for temperatures well above TC, neutrons are still scatteredmagnetically by metallic spins. A further consideration makes this even morecurious. In thermal neutron scattering experiments, the neutron velocity vnis typically smaller than the electron velocity vF by a factor of 10−3. Thismeans that a neutron interacts with approximately 103 electrons as it movesacross the magnetic moment of an atom. The average spin of 103 electronswill be zero at T > TC. The answer to this puzzle is provided by further anal-ysis of (3.94). Neutrons are scattered by collective motions of electron spins(called spin-fluctuations)7, not by individual electron spins. More precisely,the paramagnetic scattering of neutrons is caused by fluctuations of the mag-netic force on neutrons exerted by spins of itinerant electrons. On the otherhand, in the ferromagnetic state (T < TC), we need to consider effects fromthe spin polarization from the splitting of the electron band states into upand down spin states. In this case of itinerant band electrons, the elementaryexcitations are like the spin wave and Stoner excitation in the ferromagneticstates, obtained from the condition:

1 = V (q)∑k

nk↑ − nk+q↓εk+q↓ − εk↑ − ω

. (3.96)

Even though the spin wave is usually discussed in the context of systemswith localized spins, it is interesting that spin waves are also excited in the7 The original discussion of spin-fluctuations is provided by T. Izuyama, D.J. Kim,

and R. Kubo, J. Phys. Soc. Jpn. 18, 1025 (1963).

Page 125: Experimental Inelastic Neutron Scattering - Caltech Center for

112 3. Dynamics of Materials and Condensed Matter

ferromagnetic ordered state of itinerant spins. Like the insulating case, we findM(T )/M0−1 ∝ T 3/2, as in (3.86) for ferromagnetic metals. This experimentalfinding strongly implies the existence of spin waves in metallic magnetism.

Returning to the problem of the ferromagnetic transition metals Fe, Co,and Ni, we ask again, “Are these spins itinerant?” or “Can Stoner theoryproperly explain their magnetism?” The answers are still extremely unclear.There have been attempts to incorporate the electron-phonon interactionwithin the itinerant picture. These have improved the Stoner suceptibilitysomewhat and have led to a Curie–Weiss-like behavior with a smaller TC thanobtained from band theory, more consistent with experiment. Nevertheless,many features consistent with local moments are observed experimentally.The observed change in the specific heat of Fe at TC, for example, is asso-ciated with an entropy of order kB ln 2, as expected for localized electrons.Spin-resolved photoemission experiments show that the exchange splittingdoes not vanish at T > TC, strong experimental indication of local momentsin ferromagnetic transition metals. These controversies demonstrate that abetter theory is needed to properly account for electron correlations.8

3.5.4 Localized Spins Embedded in Itinerant Spins

A mixed magnetic system with localized spins (or magnetic impurities) em-bedded in itinerant spins provides many exotic magnetic properties that differfrom the properties of from systems having localized or itinerant spins, butshowing features of both. Consider two cases:

• Mn atoms in Cu metal, where Mn (3d)5 electrons play the role of a magneticimpurity of S = 5/2, and Cu gives a sea of conduction electrons,

• An f -electron system, for example Ce which has a localized f -level and a5d conduction band.

The governing Hamiltonian9 for both cases can be written as

H = t∑ij

c†iσcjσ + J∑il

Sl · σi, (3.97)

where σ is the spin of conduction electrons and S is the localized spin. Al-though both cases can be explained by H, they correspond to different limitsof H.

First, for Mn impurities in Cu, we set t J , so the Hamiltonian expressesan effective indirect interaction of localized spins mediated by conduction8 A compromise model that includes both itinerant and localized features with

“correlated delocalized electrons” is available, where the magnetic moments atdifferent sites fluctuate in magnitude and direction at finite temperatures.

9 This is called the “Kondo lattice model” (KLM). Recently, the ferromagneticKLM (J < 0) has been frequently adopted to describe the colossal magnetore-sistance in manganese oxides, where J is the Hund coupling.

Page 126: Experimental Inelastic Neutron Scattering - Caltech Center for

3.5 Spin Dynamics in Solids 113

electrons. This interaction is called the RKKY (Ruderman-Kittel-Kasuya-Yosida) interaction:

HRKKY = J(kF|ri − rj |) Si · Sj , (3.98)

and J(x) has the functional form:

J(x) ∝ −cosxx3

+sinxx4

. (3.99)

The RKKY interaction is also observed in magnetic multilayer systems com-posed of layers of Fe/Cu, for example, where Cu plays the role of a nonmag-netic metallic spacer. Here it is found that the exchange coupling constantoscillates and has both positive and negative values depending on the thick-ness of the Cu layer, consistent with the kF for the conduction electron seain Cu.

The second case is the opposite limit of t$ J , and approaches the Kondomodel for heavy fermion systems. In the past decades, very unusual low tem-perature behaviors have been observed in rare earth metals (e.g., Ce) andactinides (e.g., U). The linear specific heat at low temperatures shows an un-usually high coefficient, γ, of order 1 J/mol K2, in contrast to a 1 mJ/mol K2

typical of ordinary metals. High values of γ are typical of “heavy fermion” sys-tems.10 Furthermore, these heavy fermion systems have an electrical resistiv-ity of ρ0 +AT 2 at low T with huge values of A of order 10µΩcmK−2, whereasA is of order 10−5µΩcmK−2 or less for ordinary metals. Heavy fermion sys-tems exhibit another basic and universal magnetic property. Below a charac-teristic temperature T ∗,11 heavy fermion systems show Fermi liquid behaviorwith a huge effective mass, and then constant (but very high) Pauli suscepti-bility. Above T ∗, they show a Curie–Weiss susceptibility that originates fromthe localized f electrons. At T ∗, the quasi-particles are screened by conduc-tion electrons and a singlet (nonmagnetic) state is formed, owing to strongelectron correlations. Although heavy fermion systems show differences intheir properties, the disappearance of a magnetic moment is a common fea-ture.

Another unusual property originating with magnetic scattering is theKondo effect. The Kondo effect is a logarithmic increase of the electrical re-sistivity of the Kondo system when the temperature is reduced. It is causedby spin flip scatterings of conduction electrons at magnetic impurities.10 Values of γ for UPt3, CeAl3, CeCu2Si2, UBe13 are 0.45 J/mol K2, 1.6 J/mol K2,

1.1 J/mol K2, and 1.1 J/mol K2, respectively.11 T ∗ is not necessarily same as TK , which is the usual Kondo temperature for a

single Kondo ion, and in most cases we see T ∗ < TK owing to the condensationof Kondo ions.

Page 127: Experimental Inelastic Neutron Scattering - Caltech Center for

114 3. Dynamics of Materials and Condensed Matter

3.5.5 Strongly Correlated Electrons

Since the discovery of high Tc superconductors,12 enormous theoretical efforthas been made to understand the two-dimensional Hubbard model, which wasoriginally introduced to understand the metal-insulator transition in transi-tion metals. The Hubbard Hamiltonian is:

H = t∑ij

c†iσcjσ + U∑i

ni↑ni↓ . (3.100)

In high Tc superconductors, c†iσ(ciσ) is the creation (annihilation) operator ofthe electron (or the hole) at the highest antibonding orbital (predominantlydx2−y2) of Cu2+ positioned at i in CuO2 plane. Approproximately, t ∼ 0.1 eVand U ∼ 1 eV. It is immediately clear that the energy scale of the Coulombcorrelation energy, U , is too high compared to the interesting energy scales,which are around 10 meV for critical temperature of 100 K. The low energyexcitation relevant to superconductivity is therefore believed to originate withspins, not with charge, and effort has been made to derive an effective spinHamiltonian that depends on the hole concentration (doping).

In the undoped case (half-filling), there is one electron at each site andthe hopping into the nearest neighbor costs the energy U . In the limit oft $ U , the electrons look localized at each site because of the high energybarrier U . The Hubbard model can be transformed into the Heisenberg spinHamiltonian:

H = J∑ij

Si · Sj , (3.101)

J = 4t2/U . (3.102)

In this limit of t$ U , the system acts as an antiferromagnetic insulator.By introducing a small fraction, x, of holes, the superconducting phase

appears. Typical fractions for Bi2Sr2CaCu2O8+x (Bi2212) are x ∼ 0.1 (thismay be underdoped, but overdoping occurs for x ∼ 0.2). The effective Hamil-tonian for a small number of holes has also been reduced from the Hubbardmodel, and is called the t− J model:

Ht−J = t∑ij

a†iσajσ + J∑ij

Si · Sj , (3.103)

where a†iσ = c†iσ(1−ni−σ) and aiσ = ciσ(1−ni−σ). In the limit of half-filling,Ht−J is the Hamiltonian of a Heisenberg antiferromagnet. Research interestsare in small deviations from half-filling, where holes move in the antiferromag-netic lattice and counteract antiferromagnetic long-range order. This leads to12 Examples of some high Tc materials are La2−xSrxCuO4 (Tc ∼ 40 K), YBa2Cu3O7

(Tc = 92 K), Bi2Sr2Ca2Cu3O10 (Tc = 110 K), and Tl2Sr2Ca2Cu3O10 (Tc ∼ 125K).

Page 128: Experimental Inelastic Neutron Scattering - Caltech Center for

3.7 Simulations of Spin Dynamics 115

antiferromagnetic spin-fluctuations peaked at a momentum near Q = (π, π).In the last decades, spin fluctuations have been found to play fundamentalroles in high Tc superconductors. In the antiferromagnetic Fermi liquid model,many key properties of superconducting cuprates have been understood bya strong interaction between quasi-particles and spin-fluctuations. For exam-ple, the spin-fluctuation model has been successful in explaining transportproperties such as electrical resistivity (ρ ∝ T ), the magnitude of Tc, resultsfrom nuclear magnetic resonance (NMR) experiments, angle-resolved photoe-mission spectroscopy (ARPES) experiments, and other experimental results.The detailed phenomenological propagator for spin-fluctuations is:

χsf(q, ω) =χQ

1 + ξ2(q −Q)2 − iω/ωsf, (3.104)

which has proved applicable for interpreting NMR measurements and neu-tron scattering experiments. Here ωsf is the spin-fluctuation energy and ξ isthe antiferromagnetic correlation length. Through the value of ξ, the spin-fluctuation depends on the hole concentration. In the limit of ξ → ∞, thesystem in the pure magnon region, i.e. the undoped antiferromagnetic insu-lator with long-range order. An interaction between quasi-particles and spin-fluctuations is especially strong in underdoped materials. It has been shownrecently that strong anisotropies in ARPES data for underdoped Bi2212 orig-inate with a strong coupling between quasi-particles and spin-fluctuations.Incidentally, for other superconducting materials, i.e., La2−xSrxCuO4 andYBa2Cu3O7−x, data from inelastic neutron scattering and measurements ofthe spin-lattice relaxation rate by NMR indicate that the spin-fluctuationsinduce an opening of the gap in the spin excitation13 in the CuO2 plane, withan energy comparable to the BCS gap. The apparent gap develops well aboveTc.

3.6 N/A Simulations of Lattice Dynamics

3.7 Simulations of Spin Dynamics

3.7.1 Monte Carlo Method

Section 3.5 introduced different spin systems and their excitations. Severalapproaches are available for calculating the states and state evolution of thesespin systems. Perhaps the most conventional approach, although not a sim-ulation per se, is the diagrammatic expansion of the Green’s function. Thisformal approach is not practical for many complex systems, however. In-stead, one may use the local density approximation (LDA), or LDA+U to

13 The spin gap corresponds to the pseudogap of a small energy scale.

Page 129: Experimental Inelastic Neutron Scattering - Caltech Center for

116 3. Dynamics of Materials and Condensed Matter

study band magnetism, or the small-size exact diagonalization for more lo-calized spin systems. However, for more complete descriptions of the dynam-ics of spins, the most suitable and reliable method is often a Monte Carlosimulation. There are many variants of Monte Carlo simulations developedand optimized for specific problems. This section explains the Monte Carloapproach for calculating the states and dynamics of classical lattice spin sys-tems. Monte Carlo simulations of classical systems are easier to understandthan quantum Monte Carlo simulations, which are mentioned at the end ofthis section.

A Monte Carlo simulation is a Markovian process. Such processes willreach a steady state of a system that is independent of the initial configura-tion. Unfortunately, especially at low temperatures, this final state of equilib-rium may require a very long time to achieve. If one knows the ground statea priori, at low temperatures it may be appropriate to start with the systemin a ground state configuration, and allow temperature to produce disorderin this configuration. The ground state is often unknown, however, and thisis typical of more complicated systems. It may be possible to start with sev-eral candidate ground state configurations, and identify the true ground statestructure as the one that does not evolve with time.

An alternative approach is sometimes called “simulated annealing,” wherethe simulation begins with the system in a fully random state characteristic ofinfinite temperature. Equilibrium at lower temperatures is achieved by grad-ually reducing the temperature, and allowing the system to relax under thespin-spin interactions. Some delicacy is required for balancing the slownessof cooling with the need to minimize the time of the simulation.

Finally, systems that undergo spontaneous symmetry breaking may posespecial problems. Starting from the random spin configuration at T = ∞ inthe isotropic ferromagnet, one may find that the ordering direction would ro-tate without any preferred direction even below TC. In such a case, therefore,one may include an infinitesimal anisotropy in the Hamiltonian to inducethe symmetry breaking, or one may start with a symmetry-broken groundstate configuration14 at T = 0 and raising the temperature. Without an ap-pled biad, the formation of local domains, each with its own direction of spinalignment, is a common feature. Elimination of the domain boundaries isfavorable energetically, but may take a long time in practice.

3.7.2 Spin Updates in Monte Carlo Simulations

Metropolis Algorithm. In the Metropolis algorithm, a new configurationis generated from an existing one by using a transition probability that de-pends on the energy difference between the two configurations. The state ofthermodynamic equilibrium satisfies the detailed balance between two statesn and m,14 For example, by initially aligning all the spins along a certain direction.

Page 130: Experimental Inelastic Neutron Scattering - Caltech Center for

3.7 Simulations of Spin Dynamics 117

PnWn→m = PmWm→n , (3.105)

where Pn is the probability of the system being in the state n and Wn→m

is the transition rate from n → m. The Metropolis algorithm selects thesimplest choice of the transition rate that is consistent with detailed balance

Wn→m =

exp(−∆E/kBT ) ∆E > 01 ∆E < 0 , (3.106)

where ∆E = En−Em. The Metropolis algorithm updates one spin at a timein a given configuration at temperature T :

1. select the spin at site i,2. evaluate ∆E by updating the spin at i,3. generate a random number η, where 0 < η < 1,4. accept the updated configuration if η < e−∆E/kBT , or reject otherwise,5. return to step 1 for a different spin at site i+ 1.

For the model of continuous spins of |Si| = 1, oriented in three dimensions,one may update the spin at site i by generating two random numbers η1 andη2, such that ζ2 = ζ2

1 + ζ22 < 1 such that ζ1 = 1− η1 and ζ2 = 1− η2 (where

0 < η1, η2 < 1)

Sx = 2ζ1√

1− ζ2 , (3.107)

Sy = 2ζ2√

1− ζ2 , (3.108)Sz = 1− 2ζ2 . (3.109)

The Metropolis algorithm ensures that the steady state of the system isthe actual state of thermodynamic equilibrium. This is proved by assumingthat the system is in thermodynamic equilibrium, and then showing thatthe Metropolis algorithm has the transition rates needed to keep it there. Inthermodynamic equilibrium, the probability Pn is the Boltzmann factor nor-malized by the partition function, e−En/kBT /Z, a central result of statisticalphysics. Substituting into (3.105)

e−En/kBT Wn→m = e−Em/kBT Wm→n , (3.110)

e−(En−Em)/kBT =Wm→n

Wn→m(3.111)

Note that Wn→m = 1 (since the transition n→ m is downhill energetically,it will always occur according to (3.106)). Equation (3.111) becomes:

Wm→n = e−(∆E)/kBT , (3.112)

which is the rate used by the Metropolis algorithm in step 4 or (3.106).All Markovian processes converge to a steady state15, and the Metropolis

algorithm assures us that thermodynamic equilibrium will be achieved be-tween all pairs of spins in the system. It does not ensure that equilibrationwill occur in a reasonable time, however.15 Or a cyclic state in anomalous cases.

Page 131: Experimental Inelastic Neutron Scattering - Caltech Center for

118 3. Dynamics of Materials and Condensed Matter

3.7.3 Low Temperatures

At low temperatures, a more sophisticated update algorithm is necessary.Most random updates cause a large energy exponent ∆E/kBT , so theMetropolis algorithm will reject most changes to the spin configuration. Theequilibration procedure can then become far too slow to be practical. Tospeed things up, the randomly-selected changes in spin can be made smaller,for example. This can be done by attenuating the random changes of spin bya factor δ (0 ≤ δ ≤ 1), i.e. ∆S should be replaced by δ∆S. The factor δ canbe adjusted so that the acceptance rate is around 50% on the average.

An actual implementation could be based on a parameterized temperature-dependent solid angle, Ω(T ), of spin i with respect to its original orientationSi. This is begun by defining α = tan−1 Syi /S

xi and β = cos−1 Szi , from which

we define the rotation matrices Rz(α) and Ry(β):

Rz(α) =

cosα sinα 0− sinα cosα 0

0 0 1

, (3.113)

Ry(β) =

cosβ 0 − sinβ0 1 0

sinβ 0 cosβ

. (3.114)

The updated orientation of spin i, S′i is

S′i = R−1z (α)R−1

y (β)S′′i , (3.115)

where

S′′i = (sinθcosφ, sinθ sinφ, cosθ) , (3.116)θ = Ω(T ) η1 , (3.117)φ = 2π η2 . (3.118)

A useful form16 of Ω(T ) may be

Ω(T ) = π tanh(ξT ) . (3.119)

With this form of Ω(T ), we can adjust ξ so that the acceptance rate is around50%. Note the two extreme limits: Ω(T ) → 0 as T → 0 and Ω(T ) → π asT →∞.

Overrelaxation Technique. The overrelaxation technique is used in com-bination with the Metropolis algorithm for improving the rate of relaxation tothe equilibrium configuration, especially at low temperatures. Let us assumethat we are treating a system of isotropic continuous spins in the Heisen-berg model, with the Hamiltonian H = J

∑ij Si · Sj . In the overrelaxation

method, a spin is precessed about the full interaction field, which it can do16 The form of Ω(T ) given here is just the simplest example. One may introduce a

more complicated form to give a more desirable performance.

Page 132: Experimental Inelastic Neutron Scattering - Caltech Center for

3.7 Simulations of Spin Dynamics 119

without any change of energy. When the angle of precession, θ, is as large asπ, this alteration of the spin structure can promote quicker changes in theorientation of other spins during subsequent Monte Carlo steps.

At the site i, the full interaction field for Si is Snn ≡ J∑

j =i Sj . Theoverrelaxed spin, S′i, is evaluated by successive rotations using rotations byEuler angles. One needs two angles of α and β to define the direction of Snn:

α = tan−1 Synn/Sxnn , (3.120)

β = cos−1 Sznn/|Snn| , (3.121)S′i = R−1

z (α) R−1y (β) Rz(π) Ry(β) Rz(α) Si. (3.122)

In an actual simulation, a single “hybrid” Monte Carlo update of the spin con-figuration could include a Metropolis sweep and two overrelaxation sweeps.

Equilibration (Thermalization). Repeating the hybrid Monte Carlo steps,spins are updated by sweeping the whole spin lattice, eventually reaching theequilibrium configuration at a given T . It is an important problem to min-imize the number of Monte Carlo steps needed to obtain the fully relaxedequilibrium state. The optimization differs, however, depending on the spe-cific problem or the simulation conditions such as temperature and latticesize, for example. It is essential to perform calculations of simple quantitieslike susceptibilities or magnetization, and test if the system is in the equilib-rium state. In more advanced validations, one may check the autocorrelationtime. Substantial gains in efficiency are often found for hybrid Monte Carlosimulations. For the square lattice Heisenberg model, the nonhybrid MonteCarlo method typically requires at least O(104) steps at the temperaturerange of O(0.1J), whereas the hybrid method requires O(103) steps.

3.7.4 Time Evolution of Spins

For a system of spins in the Heisenberg model, the equation of motion forthe spin degrees of freedom is

∂Si

∂τ= −Si ×

∂H∂Si

= −JSi ×∑j =i

Sj . (3.123)

The N spins are coupled to each other, and the time-evolution of the spinsis obtained by solving the coupled differential equations. There are manyintegration algorithms to solve the differential equations. Here we introducethe Suzuki-Trotter decomposition, which is especially suitable for the latticeproblem. Taking the example of the simple square lattice with the nearest-neighbor spin coupling, one can divide the lattice into two sublattices A andB by checkerboard decomposition. Employing the Suzuki-Trotter decompo-sition up to O(dτ5),

Si(τ + dτ) = e(A+B)dτSi(τ) , (3.124)

and e(A+B)dτ is decomposed using

Page 133: Experimental Inelastic Neutron Scattering - Caltech Center for

120 3. Dynamics of Materials and Condensed Matter

e(A+B)dτ =5∏

i=1

epiAdτ/2 epiBτ epiAdτ/2 +O(dτ5) , (3.125)

with

p1 = p2 = p4 = p5 = p = 1/(4− 41/3) (3.126)

and

p3 = 1− 4p . (3.127)

Here A and B are the rotation generators of the sublattices A and B, withfixed SiB and SiA, respectively.

The following algorithmic explanation may be more clear.

eAδτSi : time evolution of sublattice Afor i = 1 to N

when i ∈ ASnn = J

∑j =i(j∈B) Sj

eAδτSi =[(Snn · Si)Snn/|Snn|2

](1− cos(|Snn|δτ))

+ Si cos(|Snn|δτ) + [(Snn × Si)/|Snn|] sin(|Snn|δτ)

eBδτSi : time evolution of sublattice Bfor i = 1 to N

when i ∈ BSnn = J

∑j =i(j∈A) Sj

eBδτSi =[(Snn · Si)Snn/|Snn|2

](1− cos(|Snn|δτ))

+ Si cos(|Snn|δτ) + [(Snn × Si)/|Snn|] sin(|Snn|δτ)

In this algorithm, the time evolution of spins is performed by combinationsof e−Aδτ and e−Bδτ , just as given by the Suzuki-Trotter decomposition.

3.7.5 Observables

Inelastic neutron scattering, especially experiments on single crystal samples,can probe directly the spin-spin correlation function S(q, ω) that describesthe dynamics of spins

S(q, ω) =12π

1N2

∑ij

eiq·(ri−rj)

τmax∫0

eiωτ 〈Si(τ) · Sj(0)〉 dτ . (3.128)

This S(q, ω) can be calculated by Monte Carlo simulation. S(q, ω) is obtainedby a simple Fourier transformation of the time-dependent correlation function

Cij(τ) = 〈Si(τ) · Sj(0)〉 , (3.129)

Page 134: Experimental Inelastic Neutron Scattering - Caltech Center for

3.7 Simulations of Spin Dynamics 121

which is readily evaluated in a Monte Carlo simulation. Pole structuresof S(q, ω), ω(q), can provide information on magnetic excitations and re-laxations, which are fundamental to understanding the spin systems. Inci-dentally, the quasi-elastic response S(q, 0) tells us the kinds of magneticfluctuations (correlations) that dominate at a given T . For instance, ifS(Q, 0) S(0, 0) with say Q = (π, π), we conclude that antiferromagneticexchange interactions are dominant over ferromagnetic ones at the given T .

For powder or polycrystal samples, the measured spectra are in the angle-integrated form

S(|q|, ω) =2N2

∑ij

sin(|q||ri − rj |)|q||ri − rj |

τmax∫0

eiωτ 〈Si(τ) · Sj(0)〉 dτ . (3.130)

In some experiments, or in some stages of data analysis, scattered neutronswith a rather wide distribution of momenta are collected into a single energybin. For such data, the resulting spectra S(ω) probes the local responses ofspins as

S(ω) =∫

S(q, ω) dq =12π

1N

∑i

τmax∫0

eiωτ 〈Si(τ) · Si(0)〉 dτ . (3.131)

The quasi-elastic local response, S(0), is also an interesting quantity. It isdirectly related to the spin-lattice relaxation rate T1 of a local probe as innuclear magnetic resonance (NMR) or Mossbauer spectrometry.

3.7.6 Comments on Quantum Monte Carlo Simulations

An essential difference between classical and quantum Monte Carlo simula-tions is in how the spin configuration is updated, that is, how the Metropolisalgorithm is implemented. The classical Monte Carlo method is easier in thatthe equilibrium probability has the proportionality

P (Si) ∝ e−βH(Si) (3.132)

for the particular configuration Si, that is: H(Si) = E(Si). On theother hand, for the quantum Heisenberg model, for which

H = H0 + V (3.133)

with

H0 = J∑ij

Szi Szj , (3.134)

V = J∑ij

(Sxi Sxj + Syi Syj ) , (3.135)[H0,V

]= 0 , (3.136)

Page 135: Experimental Inelastic Neutron Scattering - Caltech Center for

122 3. Dynamics of Materials and Condensed Matter

we apply the Trotter formula17

e−βH ≈ [e−βH0/me−βV/m]m , (3.137)

Z =∑α

〈α|e−βH|α〉 , (3.138)

Z =∑αk

m∏k=1

〈αk|e−βH0/m|α′k〉〈α′k|e−βV/m|αk+1〉 , (3.139)

where |α〉 can be the eigenstate of H0 and |α1〉 = |αm+1〉. Then the ma-trix element 〈α|e−βV/m|α′〉 is evaluated classically, leading to e−βV(α,α′)/m.A d-dimensional quantum spin problem therefore always corresponds to aneffective (d+ 1)-dimensional problem.18

Besides the quantum (localized) spin model, another important problemis that of electrons with itineracy. One may introduce the Hubbard model asthe simplest example,

H = t∑ij

∑σ

c†iσcjσ + U∑i

ni↑ni↓ . (3.140)

For this problem, we need to apply another kind of quantum Monte Carlomethod that incorporates the path integral formalism. In this method, theitinerant degrees of freedom of electrons are completely integrated out by thepath integral formalism19 and the remaining problem is then cast as an Isingspin problem in (d+ 1)-dimensions.

Further Reading

The contents of the following are described in the Bibliography.Phillip R. Bevington: Data Reduction and Error Analysis for the PhysicalSciences (McGraw-Hill, New York, 1969). See especially Ch. 4.

L. P. Bouckaert, R. Smoluchowski, and E. P. Wigner: Phys. Rev. 50, 58(1936).A. A. Maradudin and S. H. Vosko: ‘Symmetry Properties of the NormalModes of a Crystal’, Reviews of Modern Physics 40, 1-37 (1968).M Tinkham: Group Theory and Quantum Mechanics (McGraw-Hill, NewYork, 1964) Chapter 8.

17 cf. Suzuki-Trotter decomposition for the time evolution integrator18 One additional dimension comes from the Trotter decomposition.19 The basic idea is to transform the Hubbard model into a quadratic form by

introducing the additional Ising-type bosonic field through the Trotter decom-position and the Hubbard-Stratonovich transformation. Fields of the quadratic

action can be always integrated out, that is, Tr[e−

∑ij c†iAijcj

]= det(1 + e−A),

where A carries the Ising-type auxiliary field.

Page 136: Experimental Inelastic Neutron Scattering - Caltech Center for

Further Reading 123

G. L. Squires: Introduction to the Theory of Thermal Neutron Scattering(Dover, Mineola, New York 1996).J. L. Warren: ‘Further Considerations on the Symmetry Properties of theNormal Modes of a Crystal’, Reviews of Modern Physics 40, 38-76 (1968).

Page 137: Experimental Inelastic Neutron Scattering - Caltech Center for
Page 138: Experimental Inelastic Neutron Scattering - Caltech Center for

4. N/A Instruments

4.1 N/A Chopper Spectrometers

4.2 N/A Carpenter Gaussian Analysis

4.3 N/A McStas

N/A Further Reading

The contents of the following are described in the Bibliography.

Page 139: Experimental Inelastic Neutron Scattering - Caltech Center for
Page 140: Experimental Inelastic Neutron Scattering - Caltech Center for

5. Essential Data Processing

This chapter explains procedures for the reduction of data from a time-of-flight inelastic neutron spectrometer. To date the practice of reducinginelastic scattering data from time-of-flight instruments has been poorly-documented, dull, tedious, and error-prone. 1 We hope this chapter tran-scends these traditional shortcomings.

The present chapter explains the rationale behind the data reductionmodules of DANSE (Chapter 7 better explains their use). After an overviewof a typical data reduction process, the individual steps are explained in de-tail. Approximately, analysis steps that are further from the raw data aremore closely-related to the dynamic processes in the sample, and tend to bemore computationally-intensive. These steps (such as corrections for absorp-tion, multiple scattering, and multiphonon scattering) are described later inthis chapter. Although the data analysis steps described first are somewhatindependent of the previous chapters, understanding some of the later steps(such as corrections for multiphonon scattering) may be easier after readingChapters 2 and 3.

The treatment in this chapter presupposes a “direct geometry” configura-tion (monochromation before the sample) and a two-dimensional, pixellateddetector system, composed of an array of linear, position-sensitive detectors.This configuration is used in the Pharos and ARCS spectrometers, for exam-ple.

The first task is to take a raw set of data from an inelastic neutron scat-tering experiment (with a powder sample), and convert it into physical unitssuch as meV and A−1 for energy and momentum transfer. Such basic stepsare needed before the data can be compared to predictions from theory, oreven compared to results from other inelastic spectrometers. Although thespecific steps may depend in part on the scientific issues being studied, somedata processing steps are common for nearly all experimental work, and arerequired to make an inelastic neutron scattering data set useful. There may beothers steps as well, but most experiments follow most of the steps presentedhere.1 ARCSAPyLOOZA has great strength in freeing the experimenter from the

drudgery of the tortuous command line sessions that used to be the norm indata reduction. You’ll be back to the proper business of a graduate student (i.e.,find free food; eat free food) in no time.

Page 141: Experimental Inelastic Neutron Scattering - Caltech Center for

128 5. Essential Data Processing

Some notation is listed in Table 5.1. Fig. 5.1 shows the position of thedetector tubes with respect to the sample, S, in the plane of the spectrometer,Fig. 5.2 the position perpendicular to the plane.

Table 5.1. Notation

ki (kf) modulus of the initial (final) neutron wavevector

Q = ki − kf momentum transferred from the neutron to the sample

φ scattering angle (Q =√k2i + k2

f − 2kikf cosφ)

Ei (Ef) incident (final) neutron energy

ω = ∆E = Ei − Ef Energy transferred from neutron to sample

l2 distance from the sample to the center of a detector

d labels a specific detector

h the height of a pixel in a detector

Fig. 5.1. Layout of the secondary flight path ofa direct geometry time-of-flight spectrometer. Thedetectors are arrayed in a circle of radius l2 aroundthe sample (at S). The beam is incident on thesample from the left. The x and z axes show thecoordinate system used in the discussion of binninginto rings (Sect. 5.1.2), the y-axis of that systempoints out of the page. ψ is the angle from the z-axis to the center of a given detector (in the x-zplane).

Fig. 5.2. Labeling some of the distances inthe secondary flight path of a direct geome-try time-of-flight spectrometer. The center ofthe detector is l2 from the sample (at S), anda given pixel is at height h from the center.The total distance from the sample to a pixelis l2 + b(h) = (l22 + h2)1/2.

Typically one wants to know the dynamic structure factor, or scatteringlaw, S(Q,ω). For coherent nuclear scattering [?]:

Page 142: Experimental Inelastic Neutron Scattering - Caltech Center for

5. Essential Data Processing 129( d2σ

dΩdE

)coh

=σcoh

4πkf

kiNScoh(Q, ω) , (5.1)

with similar expressions for incoherent scattering or magnetic scattering. Ow-ing to several complications originating with how the measurement is made,the measured data are actually:( d2σ

dΩdt

)coh

= Φ[σcoh

4πkf

kiNScoh(d, h, t)× T (d, h, t)× ε(d, t)

+ Snuis(d, h, t) + b(d, h, t)]. (5.2)

Here Φ is the incident flux, and often must be known by an independentmeasurement with a beam monitor, for example. The data are initially his-togrammed as a function of neutron time-of-flight (TOF) rather than neutronenergy,2 where the two are related by E = 1/2mnv

2 = 5.227(l/t)2 (the sec-ond equality holds for speeds in mm/µs or equivalent). Background b andnuisance scattering from the sample, Snuis, pollute the interesting signal.3

Other factors modify the interesting term involving Scoh. The sample mayabsorb neutrons, so only a fraction T of neutrons are transmitted throughthe sample, and this varies with scattering angle and neutron energy. Theefficiency ε of the detectors varies with energy and from one detector toanother. The jobs ahead are:

• Account for incident flux.• Remove background.• Convert from time to energy.• Correct for detector efficiency.• Correct for absorption.• Subtract similarly treated empty can data.• Bin into rings of constant scattering angle φ.• Subtract additional nuisance scattering (multiple scattering and so on).• Convert from angle to momentum.

Errors must be propagated. This is usually done according to a few simplerules, such as when data sets are added or subtracted, the errors add inquadrature; the error for the raw histogram is the square root of the countsin any given bin. This is summarized in Bevington! [?].

While many experiments could be treated by roughly the same process,not all of them can, and it’s the experimenters’ job to know when departures2 The introduction of new data acquisition hardware and software might alleviate

this by histogramming directly into energy and momentum. That may simplifysome tasks, for example eliminating the conversions from TOF to energy andfrom TOF and angle to momentum. However, this may complicate other taskssuch as background subtraction.

3 This list includes anything that doesn’t interest the experimenter. For example,in a phonon measurement this may include all magnetic scattering, multiphononand multiple scattering effects.

Page 143: Experimental Inelastic Neutron Scattering - Caltech Center for

130 5. Essential Data Processing

from the routine require intervention in the reduction process. The sequencein which these tasks are presented here is that in which they are usuallyperformed. As a rule, these operations don’t commute freely, but it’s nothard to figure out what needs to be adjusted when re-ordering things. Forinstance, if the background is known as a function of time, either it should besubtracted before the data are transformed into energy, or the backgroundmust be transformed into energy as well. The sequence for other tasks, suchas conversion to momentum units, is motivated by efficiency (one needs tothink about energy when thinking about momentum, but not vice versa, soone might as well do the energy conversion first, followed by the momentumconversion).

5.1 Steps to Transforming Data into a Function ofEnergy and Momentum

5.1.1 Operations and Data Structures

The basic data structure is a histogram. This implies sets of arrays: the arrayto store the histogram values per se, a similar array for errors, and associatedarrays to store the axis values for each dimension.

Operations can be divided into those that change the structure of some ofthe arrays, and those that change only the contents of the arrays. Those thatchange the structure include energy rebin (§ 5.1.2), sum into rings (§ 5.1.2),and momentum rebin (§ 5.1.2); those that don’t change the array structuresinclude subtracting various artifacts (§ 5.1.2, 5.1.2) and multiplicative correc-tions (§ 5.1.2, 5.1.2). The structure-changing operations require the creationof one or more new arrays; the rest can be done in place (assuming one isconfident of the correction or if the correction can be easily undone). In thesections ahead, changes to the structure of the data will be noted.

5.1.2 A Closer Look at Each Task

Initial Data. The starting point is an array representing I0(t, d, h), the rawcounts for each TOF bin, in each detector, at each detector position. Theerror is assumed to be the square root of the intensity: σ0 =

√I0(t, d, h).

The TOF bins in this histogram usually have a constant time width, so allthe bins are specified by some initial time t0, the bin-width ∆t, and thenumber N of bins.

Initially there are five arrays representing:

• The actual data. Three dimensional array; if there are T time bins, Ddetectors, and H positions per tube, the array dimensions are T ×D×H.

• The error. Same dimensions as the data.• The time of flight. A one dimensional array of length T.

Page 144: Experimental Inelastic Neutron Scattering - Caltech Center for

5.1 Steps to Transforming Data into a Function of Energy and Momentum 131

• The detector angles. A one dimensional array of length D.• The pixel heights. A one dimensional array,4 length H.

Some additional parameters are needed. These include the incident neu-tron energy, Ei, and the geometry of the instrument, especially the length l2from the sample to each detector, and the angle of each detector. We assumethese additional parameters are known.

Normalize for Incident Flux. Typically one divides by the total counts min a peak in a beam monitor, which gives a proportional measure of the inci-dent flux. Other measures may also be considered in unusual circumstances,for example, microamp-hours of proton beam delivered to the target. Regard-less of the source, one still divides each element of the input array by somescalar:

I1(ti, dj , hk) = I0(ti, dj , hk)/m , (5.3)

for all i, j, k, and similarly for the error.

Subtract Background. Physically, the background is another complex sub-ject; computationally, it is not. It can have different origins, from cosmic rayshitting the detectors (probably a small contribution) and neutrons from otherexperiments, to more serious causes, such as fast neutrons thermalizing in theinstrument shielding, or slow neutrons scattering from poorly-masked beam-line components. At times it can be difficult to determine what is backgroundand what isn’t, especially when looking for diffuse scattering.

A common way to estimate the background is to subtract a constant (intime) background determined from the data. This may have some justifi-cation for removing the background that is originates with radiations fromneighboring instruments, or neutrons from far enough away that any timestructure is lost. Another approach subtracts the scattering measured withan empty can. This is better done at a later stage, and is described below.

Because the background could vary with time and detector position, onewrites b(t, d, h); then

I2(ti, dj , hk) = I1(ti, dj , hk)− b(ti, dj , hk) . (5.4)

For each element of I2 one must know about one element of I1 and oneelement of b, and the same for the error.

Convert from Time to Energy. This step changes the structure of thedata arrays. Prior to this step, the structures are the same as the initialarrays. There are still some corrections to be made, but it is easiest to thinkabout them in terms of energy, so it makes sense at this stage to convert thehistogram to energy. This is computationally more intricate than the previoussteps. In fact, it may be done in two steps.4 One might allow for the possibility that the pixel heights vary from one tube

to another. The pixel position array becomes a two dimensional array, with sizeD ×H.

Page 145: Experimental Inelastic Neutron Scattering - Caltech Center for

132 5. Essential Data Processing

First, one creates a new set of histogram bins whose boundaries are deter-mined by t2, the sample-to-detector TOF, and l2, the distance from sampleto detector, via the classical relation

ω = Ei − Ef = 5.227[v2i −

( l2t2

)2]. (5.5)

Note that pixels at different positions along the length of the detector tubeare at different distances from the sample.5 The effect is to coarsen the thespectrometer’s energy resolution. An extra 3 cm is a little more than thediameter of the detector tube, so this makes a contribution to the resolutionsimilar to the size of the detector, or the sample size. For 35 meV neutronsand l2 = 4 m the difference in energy is about 1.5%. One way to account forthis is to write a separate set of histogram energy bin boundaries for eachheight in the detector tube:

ω = Ei − Ef = 5.227[v2i −

( l22 + h2

t22

)]. (5.6)

In making this transition, we need to multiply by the time bin-width anddivide by the energy bin-width:6

I3(ω(h), d, h) = I2(t, d, h)∣∣∣ dtdω

∣∣∣ . (5.7)

At this step, the array describing the time bins has been replaced by atwo-dimensional array describing the energy bins. Here is a list of the arraysat this stage of data reduction:

• Data array. Still T ×D ×H.• Error array. Still T ×D ×H.• Intermediate energy bin boundaries array. Two dimensional, T ×H or so.• Detector angles array, one-dimensional, length H. Same as before.• Pixel position array. Same as before.

The energy binwidth is changing from bin to bin, which makes it hard tothink about in plotting, fitting, and so on. Also, the energy of any given binis a function of the position of the pixel height. This is why one goes to thesecond step, rebinning into constant energy bins. Rebinning will also removethe artifact of each detector position having different energy bin boundariesfrom other detector positions.

For the second step one creates another set of histogram bin boundaries,spaced uniformly in energy. One then assigns counts from the old bins to thenew bins by prorating them. The rules are simple: if an old bin lies entirelywithin a new bin, one puts all of the old counts into the new bin; in doing5 For a nominal l2 of 4m (Pharos), this discrepancy gets as large as about 0.03m

(generally, the extra path length is b = l2[(1 + h2/l22)1/2 − 1] ≈ h2/2l22).

6 This is because the histogram reflects counts per some unit (µs or meV); we havethe constraint that the integral of the cross section be independent of the unit.

Page 146: Experimental Inelastic Neutron Scattering - Caltech Center for

5.1 Steps to Transforming Data into a Function of Energy and Momentum 133

so, multiply by the old bin width and divide by the new bin width. If an oldbin overlaps two new bins, assign counts to the first new bin based on thefraction of old bin overlapped by the first, and assign counts to the secondnew bin according to the fraction of the old bin overlapped by the secondbin (and multiply by the old bin width while dividing by the new). The sameholds true if the old bin overlaps many new bins. One can of course think ofthis the other way around (each new bin asks “what does each old bin oweme”).

One could write:

I3(ω, d, h) =∑i

M(ω, ωi(h))× I3(ωi(h), d, h)×∣∣∣dωidω

∣∣∣ , (5.8)

where M(ω, ω(h)) is a matrix with the overlaps between old bins and thebins. One could get clever and drop the |dt/dω| in Eq. 5.7 if one remembersto use |dt/dω| instead of |dω/dω| in Eq. 5.8. One typically needs to knowsomething about several (but not all) elements of the old array in order tolearn something about one element of the new array.

At the end of this step, three arrays have changed:7

• Data array. Now NE ×D ×H.• Error array. Now NE ×D ×H.• Energy bin values array. One dimensional, NE .• Detector angles array, one-dimensional, length H. Same as before.• Pixel position array. Same as before.

Detector Efficiency. Detector efficiency varies with energy. These data areprovided by the manufacturer. One simply divides by a pre-existing array ofnumbers:

I4(ω, dj , hk) =I3(ω, dj , hk)ε(ω, dj)

. (5.9)

The efficiencies are typically known as a function of final neutron energy, soan additional step is required to convert ε(Ef) into ε(ω).

Absorption correction. The absorption by the sample varies with bothneutron energy and mean path length through the sample. For a single energy,the transmission through a material with unit cell volume V and absorptioncross section per unit cell σabs, the transmission probability would is T =e−lσabs/V . For a wise choice of units for V and σabs, the path length l willcome out in cm. The mean path length through the sample varies with angle,so one needs to compute T (φ, ω).

In a real experiment, the length through the sample depends on wherein the sample the neutron scatters, which direction it scatters to, and thechange in the neutron energy (recall that the absorption cross section perunit cell varies as inversely with neutron speed, so when the speed changes,7 NE is the number of new energy bins

Page 147: Experimental Inelastic Neutron Scattering - Caltech Center for

134 5. Essential Data Processing

the probability of absorption per unit length changes). It does not depend onmomentum transfer. One must calculate this dependence; let’s assume thishas been done. Then one divides each element of the old array by one elementthe array representing T (φ, ω)

I7(φi, ωj) = I6(φi, ωj)/T (φi, ωj) . (5.10)

Section 5.2 of this chapter takes a more detailed look at the absorptioncorrection, while ANOTHER SECTION IN ANOTHER CHAPTER explainsthe use of the NeuPy Absorp module for common geometries.

Subtract empty can data. Having accounted for the sample’s absorption,it now makes sense to subtract the scattering measured from the empty can. Ifthe data from the empty can have been brought through a similar treatmentchain to this stage 8

Bin into Rings. For a powder sample, the useful spatial information is thescattering angle φ. That is to say, for a given Q, Ei, and ω, a powder scattersinto a cone of angle φ . So the two labels d and h can be condensed into thescattering angle φ.

The first step is to identify the φ for each pixel. A conventional instru-ment coordinate system has the sample at the origin and the transmittedbeam forming the z-axis. The x-axis runs horizontally from the sample (forPharos, that’s toward FP-15) and perpendicular to the beam, and the y-axis,determined by right-handedness, points up. (See Fig. 5.1.) It is natural tothink of the detector as lying on a cylinder, with the axis of the cylindercoincident with the y-axis just described. So consider two vectors: p, whichruns from the sample to the pixel, and a, with length l2 running from thesample in the direction of the transmitted beam. In the instrument coordi-nate system, a = l2z, and p = −l2 sin(ψ)x + hy + l2 cos(ψ)z. ψ is the anglebetween the tranmitted beam and the center of the detector; it lies in thex-z plane. The angle between a and p is given by p · a = |a||p| cosφ = azpz:

φ = cos−1( azpz|a||p|

)= cos−1

( pz|p|

)= cos−1

( l2 cos(ψ)√l22 + h2

)= cos−1

( cos(ψ)√1 + h2/l22

). (5.11)

Having found the angle φ for each pixel, an efficient method to combine pixelswith similar angles is desirable. The simplest method uses three nested forloops: one over the new angles, and two over the old detector indices. Moreabstractly:

I5(φk, ω) =∑i,j

N(φk, di, hj)× I4(ω, di, hj) , (5.12)

8 Not an identical chain: hopefully your empty can didn’t need an absorptioncorrection. (If it was made out of vanadium, it might need that!)

Page 148: Experimental Inelastic Neutron Scattering - Caltech Center for

5.1 Steps to Transforming Data into a Function of Energy and Momentum 135

where N is a matrix whose elements are 1 or 0 depending on whether φ forthe ith, jth pixel is within the bounds defined for the kth element of the newarray. It may not be necessary to know all of the points of the old array inorder to find one element of the new array.

This operation depends solely on the instrument configuration (where thedetectors are) and the set of angular rings which one would like to have. Afterthis step, all but one of the arrays have changed. Here is a list of the arraysafter this step of data reduction:

• Data array: NE ×Nφ.• Error array: NE ×Nφ.• Energy bin values array: NE .• Phi-bin values array, Nφ

Subtract Nuisance Scattering. Other nuisance scattering includes allscattering from the sample that one isn’t interested in. This usually includeshigher-order scattering processes, and is generally difficult to compute (es-pecially since one has now applied a number of multiplicative factors whichwill have to be account for). Computationally, this is simply a matter ofsubtracting two arrays, element-by-element, which brings us to:

I6(φ, ω) = I5(φ, ω)− Snuis(Q,ω) (5.13)

Convert to Momentum Transfer. Ideally, there would be a proratingscheme like that used in going between time and energy. Another approachwhich is frequently used is interpolation. Essentially one recognizes that theregularly-spaced angles at which one has measured are an irregularly-spacedarray of momentum transfers, Q. This momentum rebinning is typically per-formed with a convenient interpolation algorithm, say in IDL. Like the energyrebinning, one could write this process as a matrix operator acting on a vec-tor:

S(Q,ωj) =∑i

M(Q,φi, ωj)I7(φi, ωj) . (5.14)

The arrays have changed again. After this step in data reduction, thearrays are:

• Data array: 2D, NE ×Nq.• Error array: 2D, NE ×Nq.• Energy bin values array: 1D, NE .• Q-bin values array: 1D, Nq.

At this point we have isolated the scattering of interest, and converted itinto real physical units. This was considered a real achievement in the 1990’s.For some experimental work the data analysis can be declared complete, andgraphs of the results prepared for publication.

Page 149: Experimental Inelastic Neutron Scattering - Caltech Center for

136 5. Essential Data Processing

5.2 Absorption

With an absorbing sample, one observes d2σ/dΩdω×T (Ω,ω) rather than justd2σ/dΩdω, where T (Ω,ω) is the probability of a neutron being transmittedthrough the sample in a given direction (described by the solid angle Ω) andwith a given final energy (final energy = incident energy - energy transfer,or Ef = Ei − ω). All that needs to be done is to calculate the transmissionfor each final energy and for each detector, and then divide the observedscattering by the transmission probability. For an experiment in which allthe observed neutrons scatter once, the calculation is straightforward, thoughsomewhat computationally demanding.

We suppose that the sample is divided into a number of cells of equal vol-ume; then a neutron observed in any given detector with a given final energywas scattered in any cell with equal probability. We compute the transmis-sion probability for each scattering cell, then average over probabilities for allcells. The reason we have to be so careful is that the transmission probabilitydepends on the distance the neutron travelled through the sample, and thisdepends on where in the sample the scattering occurred, and the outgoingdirection of the neutron9.

For a neutron travelling across an absorbing medium, the probability oftransmission is 10

T =N

N0= exp(−lσabsρ). (5.15)

Here, l is the length of the path through the sample, σa is the absorptioncross section, and ρ is the number density of absorbers. If the neutron changesdirection (scatters) while travelling through the sample, the probability be-comes

T = exp(−lincσabsρ− lfσabsρ) (5.16)

where linc is the path length from where the neutron enters the sample tothe scattering spot, and lf is the path length from the scattering spot towhere the neutron exits the sample. There’s one more wrinkle: the absorptioncross section depends on the neutron energy, so if the scattering is inelastic,there will be two absorption cross sections, σ(ωinc) and sigma(ωf ), and thetransmission probability will have to reflect this:

T = exp(−lincσabs(ωinc)ρ− lfσabs(ωf )ρ). (5.17)

In what follows, we’re going to assume the scattering is purely horizontal.The justification, so far, has been that any horizontal scattering lies within9 We assume the incoming neutrons are perfectly monochromatic and collimated.

10 Think dN/dx = −σρ...

Page 150: Experimental Inelastic Neutron Scattering - Caltech Center for

5.4 Calculation of Multiphonon Scattering 137

about ±5 of the horizontal on an instrument like Pharos,11 and is thereforenegligible.12 So this means each scattering cell needs two labels.

In considering a number of cells, the incoming path length depends onwhere the cell is located. The outgoing path length depends on where thecell is, and in what direction the neutron is headed. We assume that thisdirection can be described by giving which detector d the neutron ends uphitting. So we need four labels for the transmission from a given scatteringcell to a given detector with a given final energy:

T (d, ωf , i, j) = exp(−linc(i, j)σabs(ωinc)ρ− lf (i, j)σabs(ωf )ρ). (5.18)

Finally, we’re going to average over all N cells for each detector andenergy:

T (d, ωf , i, j) =1N

∑i,j

exp(− linc(i, j)σabs(ωinc)ρ− lf (i, j)σabs(ωf )ρ

).

(5.19)

It does not get much easier than that. Now all that’s needed is a program thatcomputes Eq. 5.19 for a number of interesting geometries. This is detailedin Ch. 7, §???. (As of late 2002, there’s a stand-alone absorption programfor samples with annular geometry. Check the ARCS wiki: ”Pages put in byTim/Software Bits/Neutron Absorption by Annular Samples”.)

5.3 N/A Multiple Scattering Correction

5.4 Calculation of Multiphonon Scattering

The multiphonon expansion was developed with some rigor in Section 2.6.7.Here we explain how it works in practice. The total measured spectrum,S(E), is the sum of components,

∑∞n=0 Sn(E), from neutrons scattered after

creating different numbers, n, of phonons in the sample.13 Only the 1-phononscattering is useful for obtaining a phonon DOS, so it is important to have11 the detectors are at most 0.5 m above the scattering plane, while the middle

of the detector is 4 m from the sample, so the maximum angle is about ±7.However, the top and bottom 10 cm or so of the tubes are thrown out...

12 This assumption has not been sufficiently examined. Unless the effect is verysmall ( 1%), it should be included in the calculation when that becomes com-putationally affordable. On Pharos, the extra path length is about 0.5%. Is thisimportant? For instruments with larger vertical divergence (ARCS), this will benecessary anyway, so might as well get used to it.

13 Phonon annihilation is handled by extending the range of E to negative numbersfor each Sn(E).

Page 151: Experimental Inelastic Neutron Scattering - Caltech Center for

138 5. Essential Data Processing

an understanding of the higher-order terms for planning an experiment, or ifone seeks quantitative corrections of experimental data. Performing a multi-phonon expansion is done in two steps.

• First, the weights of the different n-components are calculated indepen-dently with input information on Q and atom displacements u at the tem-perature T .

• Second, the spectral shape of each component Sn(E) is obtained by se-quentially convoluting the 1-phonon profile with itself a total of n − 1times.

Finally, for a chopper spectrometer, detectors at different scattering anglesφ provide energy spectra Sφ(E) where Q varies with E across the spectrum.The multiphonon corrections must take into account the kinematical relationof Q vs. E at each scattering angle φ if data are analyzed from each detectorbank. The constant-Q multiphonon analysis is simpler to understand, and isapplicable for data from triple-axis spectrometers, or for data from chopperinstruments that have been reduced to S(Q,E).

Intensities of n-Phonon Spectral Components. Start with the Debye–Waller factor, which attenuates the elastic scattering S0, to a fraction of thetotal scattering S:

S0 = S exp(−2W ) , (5.20)

which we rearrange and expand:

S = S0 exp(+2W ) , (5.21)

S = S0

∞∑n=0

(2W )n

n!. (5.22)

We now have a series of terms in an expansion, but the next step of substitut-ing (5.20) into (5.22) amounts to nothing more than writing exp(−2W ) exp(+2W ) =1:

S = S exp(−2W )∞∑n=0

(2W )n

n!, (5.23)

1 =∞∑n=0

(2W )n

n!exp(−2W ) . (5.24)

The terms in (5.24) are associated as 0 for elastic scattering, 1 for 1-phononscattering, 2 for 2-phonon scattering, etc. What is special about (5.24) is thatthe nth term in the series is exactly the fraction of the n-phonon spectralcomponent in the total scattering (elastic plus inelastic).

To calculate the fraction of any multiple phonon term (e.g., the amountof 2-phonon scattering), all we need is 2W . Recall the physical origin of 2W :

2W = 〈Q2u2〉 , (5.25)

Page 152: Experimental Inelastic Neutron Scattering - Caltech Center for

5.4 Calculation of Multiphonon Scattering 139

where 〈u2〉 is the mean-squared atom displacement. Equation (5.25) showsthat exp(−2W ) becomes much less than 1 when the atom displacement be-comes comparable to 1/Q ∼ λ/2π, the number of wavelengths associatedwith the scattering angle. This is consistent with 2W originating from thedestructive interference of scattered wavelets. The Q2 and u2 are related tothe energy of recoil, and the thermal energy, respectively. The recoil energy,ER is

ER =

2Q2

2M, (5.26)

where M is the mass of the atom that is scattering, in units of the neutronmass. (The units of M are very similar to the atomic weight.) The thermalenergy is:

kBT =12Mω2〈u2〉 (5.27)

for one mode of frequency ω, and is a quantity that depends on the phononDOS for a real material. Sadly, the proper evaluation of (5.27) is not simple,in part because the phonon states are not fully occupied at modest tempera-tures, but also because of the commutation relationships discussed in Section2.6.4. The result is summarized as γ0, where:

γ0 =

∞∫0

coth(E/2kBT )g(E)E

dE . (5.28)

In the limit of high temperatures, where coth(E/2kBT ) → 1, it is clear from(5.28) that γ0 increases as 1/E (because the amplitudes of atom motionsbecome larger in low-energy modes as predicted by (5.27)). The low-energymodes are even more important at low temperatures, where they have a largerphonon occupancy. The Debye–Waller factor of (5.25) is, rigorously:

2W = γ0ER , (5.29)

In performing a multiphonon expansion for one T and one phonon DOSg(E), the value of γ0 is computed once with (5.28). The 2W from (5.29) forappropriate Q is used in (5.37) to get the fractions of all n-phonon scatterings.We therefore rewrite (5.24 ) as

S(Q) =∞∑n=0

Sn(Q) , where : (5.30)

Sn(Q) =

(2W(Q)

)nn!

exp(− 2W(Q)

). (5.31)

Shapes of n-Phonon Spectral Components. It remains to get the spec-tral shape of each order of the multiphonon scattering. The energy spectrumfor 1-phonon scattering was discussed in Sections 2.3 and 2.6.7. The spec-trum for one-phonon scattering weights more heavily the low-energy modes

Page 153: Experimental Inelastic Neutron Scattering - Caltech Center for

140 5. Essential Data Processing

because they have larger amplitudes of motion, providing a factor of g(E)/E.The number of phonons is the Planck distribution 1/[exp(E/kBT ) − 1], sothe two factors provide the shape of the 1-phonon profile, A1(E):

A1(E) =g(E)Eγ0

1eE/kBT − 1

. (5.32)

Each phonon created has the profile A1(E) of (5.32). When two phonons arecreated simultaneously, the total spectrum of energies is the convolution ofthe 1-phonon profile with the 1-phonon profile.14 The 2-phonon spectrum is:

A2(E) = A1 ∗A1 =

∞∫−∞

A1(E − E′) A1(E′) dE′ , (5.33)

and the n-phonon profile is the convolution of another 1-phonon profile withthe (n− 1)-phonon profile:

An(E) = A1 ∗An−1 =

∞∫−∞

A1(E − E′) An−1(E′) dE′ . (5.34)

Starting with A1, we can generate the spectral shapes of all the orders ofmultiphonon scattering by the systematic application of (5.34). The totalscattering is the sum of these spectral profiles, weighted by the correspondingterms of (5.30):

S(Q,E) =∞∑n=0

Sn(Q) An(E) , (5.35)

S(Q,E) =∞∑n=0

(2W )n

n!exp(−2W ) An(E) . (5.36)

If we define each term in the sum as Sn(E):

S(E) =∞∑n=0

Sn(E) . (5.37)

Examples of Multiphonon Scattering from a Chopper Spectrome-ter. The analysis presented here is for inelastic energy spectra obtained froma group of detectors centered about the scattering angle, φ. The energy trans-fer, E, is obtained simply and reliably from the arrival times of the neutronsat the detector. On the other hand, for each detector bank at φ, the value ofQ varies with E and the energy of the incident neutron Einc as:

Q[A−1] =√

2Einc − E − 2√Einc(Einc − E) cosφ , (5.38)

14 Consider each phonon excitation to be a random variable with a probabilitydistribution of A1. The sum of two random variables has a distribution that isthe convolution of the probability distributions A1 ∗A1.

Page 154: Experimental Inelastic Neutron Scattering - Caltech Center for

5.4 Calculation of Multiphonon Scattering 141

where E and Einc have units [meV]. Curves showing relationships Q(E) arepresented in Figure 5.3. The curves cannot extend to the right beyond Einc

because the incident neutron cannot lose a greater amount of energy to thesample. Notice that the curves are generally asymmetrical in ±E.

Fig. 5.3. Graphs of Q vs. E for a time-of-flight chopper spectrometer, calculatedusing (5.38) for five values of scattering angle φ (labels on curves). Incident energywas Einc = 100 meV. Positive E correspond to phonon creation, negative to phnonannihilation.

For calculating the multiphonon scattering at a particular scattering an-gle φ, it is necessary to evaluate the 2W and the Debye–Waller factor ateach energy of the spectrum, because Q varies with E as in (5.38) and asshown in Figure 5.3. Examples of such calculations are shown in Figure 5.4.Figure 5.4a shows the phonon DOS curve from fcc nickel metal from whichthe subsequent curves were calculated. Figure 5.4b shows the total inelasticscattering calculated for a temperature of 500 K.15 The 1-phonon scatteringis confined to the range ±37 meV, since this is the maximum phonon energy.With the excitation of two phonons, the energy range can be extended to2 × ±37 = ±54 meV, and this is the energy range of the 2-phonon scatter-ing. In Figure 5.4b, the intensity at 40–50 meV is almost entirely 2-phononscattering.

Notice the general trend in Figure 5.4b showing that the inelastic scat-tering to increases with the scattering angle, owing to the factor of 2Wn in(5.31). On the other hand, the scattering is suppressed by the Debye–Wallerfactor, exp(−2W ). At high Q or high T the Debye–Waller factor becomes in-

15 An experimental spectrum would contain a large peak at E = 0 from the elas-tic scattering. In principle, the area of this elastic peak would be the factorexp(−2W ) of the total integrated scattering (elastic plus inelastic).

Page 155: Experimental Inelastic Neutron Scattering - Caltech Center for

142 5. Essential Data Processing

creasingly important, and effects of this are seen in Figure 5.4c. First noticethat although there are about twice as many phonons at 1000 K as at 500K, the inelastic scattering of Figure 5.4c is nowhere near twice as large asin Figure 5.4b. Also notice the change in symmetry of the spectra in Figure5.4c with detector angle. For a detector angle of 60, Figure 5.4c shows aninelastic scattering that is approximately symmetrical in ±E. This is con-sistent with the gradual variation of Q with E in the kinematics as shownin Figure 5.3. On the other hand, for the larger detector angles of 90 and140, the value of Q is larger for −E than +E. This asymmetry causes theDebye–Waller factor to attenuate the scattering at −E more severely thanat +E. When these effects are significant, it is obviously naive to interpretthe asymmetry in E of the inelastic scattering in terms of detailed balance.

5.4.1 Multiphonon Correction – Iterative

The present section describes a correction procedure that can be used toremove higher-order multiphonon scattering from an experimental inelasticscattering spectrum, so the spectrum can the be used to deduce a 1-phononprofile and a phonon DOS. It is based on theincoherent approximation, butthis procedure has been used for many years with coherent multiphonon scat-tering data, and it is often expected to be reliable in such cases, at least forpolycrystalline samples. (The idea is that averaging over crystalline orien-tations provides a broad sampling of reciprocal space, performing a goodaverage over phonon modes. The incoherent approximation is adequate whenall modes are sampled this way. It is unlikely that this approach could be re-liable for the analysis of coherent scattering from single crystals, of course.)

An example of multiphonon calculations and an extraction of 1-phononscattering is shown in Figure 5.5. Cerium is a coherent scatterer, and thedata were acquired at several values of Q to average over the different phononmodes. An inelastic spectrum for one value of Q = 3.924 A−1 is presentedin the figure.16 Steps of an iterative procedure to refine the phonon DOSare shown in Figure 5.5. The first step of the iteration used a very crudeapproximation for the multiphonon scattering plus random background –a simple constant function of approximately 70 counts. After this constantwas subtracted from the experimental data, the DOS curve, g(E) labeled“1” in Figure 5.5b was obtained from the 1-phonon profile from (5.32) witha Debye–Waller factor of (5.31). The 2–5 phonon scattering was calculatedfrom this first iteration of a phonon DOS, scaled in height (plus a constantbackground was also fit to the data), and a second iteration of the DOS wasgenerated by the same procedure. Notice that the second and third iterations16 A spectrum at one value of Q can provide a piece of the dynamical structure

factor intensity, which we loosely call a “phonon DOS,” since the result wouldbe a phonon DOS if the scattering were incoherent. Data were acquired from thetriple-axis spectrometer HB3 at HFIR.

Page 156: Experimental Inelastic Neutron Scattering - Caltech Center for

5.4 Calculation of Multiphonon Scattering 143

Fig. 5.4. (a) Phonon DOS of fcc Ni metal. Inelastic scattering from four anglebanks of a time-of-flight chopper spectrometer with incident neutron energy of 70meV are shown in: (b) for 500 K and (c) for 1000 K. In parts b and c, the four curveswith detailed features are the total scattering, summing the 1-phonon through 4-phonon terms. The broad curves, which are the full intensity above 37 meV, arethe mulitphonon scattering from 2-phonon through 4-phonon contributions.

of the phonon DOS in Figure 5.5b are rather similar. Even for this difficultcase where the 2–5 phonon scattering is a large fraction of the total inelasticscattering, convergence is fairly quick because the 2–5 phonon scattering doesnot have much structure.

The multiphonon expansion assumes that the scattering is incoherent.Unfortunately, a better approximation would require a detailed simulationof the lattice dynamics to account for the Q-dependence. To our knowledge,such a calculation has not been done as of 2004. Another case where theassumptions of this procedure are stretched is the application of the incoher-

Page 157: Experimental Inelastic Neutron Scattering - Caltech Center for

144 5. Essential Data Processing

Fig. 5.5. (a) points: experimental inelastic scattering from cerium metal at 1028Kand Q = 3.924 A−1. The elastic peak at low energy extends an order-of-magnitudebeyond the top of the graph. Calculations of the 1–5 phonon scattering plus aconstant background were scaled to fit these data, and are labeled 1, 2, 3, denotingthe order of iteration. The 2–5 phonon scattering is shown with the same scaling,again with labels 1, 2, 3 for the iteration. By subtacting the 2–5 phonon scatteringfrom the experimental data, the difference was converted into a “phonon DOS”,g(E), by correcting for the thermal factor of (5.32) and Debye–Waller factor of(5.31). (b) The “phonon DOS” obtained from the experimental data of part a atdifferent iterations. The first iteration, labeled 1, was obtained by subtraction ofa constant background from the experimental data, and correcting by the thermalfactor of (5.32). This “DOS” was used for generating the multiphonon correctionsfor the next iteration of the procedure.

ent multiphonon correction procedure to inelastic spectra from alloys. Oneconcern about alloys is that the Debye–Waller factors differ for the differentatoms in the alloy, causing some phonons to be weighted more than oth-ers. Although the multiphonon correction procedure has been used withoutadapting to the different 〈U2〉 of the atoms in the alloy, comparisons withother measurements have shown that the procedure is often acceptable, per-haps because the multiphonon scattering is essentially featureless.

5.4.2 Multiphonon Correction – Fourier Log

Another way to correct for multiphonon scattering is possible for energyspectra at constant Q. Following the notation of Section 5.4, for fixed values

Page 158: Experimental Inelastic Neutron Scattering - Caltech Center for

5.4 Calculation of Multiphonon Scattering 145

of Q and temperature, the energy dependence of the various phonon contribu-tions, Sn(Q,E), is

S(Q,E) =(2W )n

n!e−2WAn(E) , (5.39)

The measured scattering intensity, S(Q,E), is the sum of intensities from allphonon processes:

Sn(Q,E) =∑n

Sn(Q,E) , (5.40)

Our problem is to use the measured S(Q,E) to isolate the single scatteringprofile, A1(E).

An approach to extracting the phonon partial DOS from experimentaldata is called the “Fourier-log deconvolution method.” It was used for analy-sis of plasmon scattering measurements in electron energy-loss spectrometry[Spence]. This method is also used for incoherent inelastic phonon scatter-ing [M. Y. Hu, W. Sturhahn, et al.]. It has the additional feature of beingable to correct for the broadening of the elastic line, but only if the energyresolution is constant across the energy spectrum (not the case in TOF spec-trometers). The zero-loss peak, Z(E), is convoluted with the scattering fromthe specimen as:

S(Q,E) = Z(E) ∗(

e−2W δ(E) +∑n

Sn(Q,E)

), (5.41)

where the first term in (5.41) is the zero-loss peak, reduced by the Debye–Waller factor. Taking the Fourier transform, F [], of (5.41) simplifies the con-volutions of (??), which become multiplications in Fourier space:

F [S(Q,E)] = F [Z(E)]e−2W

(1 +

∑n

(2W )n

n!(F [A1(E)])n

). (5.42)

The term in parentheses () on the right side of (5.42) is recognized as theexpansion of an exponential function:

F [S(Q,E)] = F [Z(E)]e−2W(e2WF [A1(E)]

). (5.43)

Taking the logarithm of (5.43) and rearranging:

F [A1(E)] =1

2Wln

(F [S(E)]F [Z(E)]

)+ 2W . (5.44)

The inverse Fourier transformation, F−1[], provides the single scattering pro-file, A1(E):

A1(E) =1

2WF−1

[ln

(F [S(E)]F [Z(E)]

)]+ 2Wδ(E) . (5.45)

Page 159: Experimental Inelastic Neutron Scattering - Caltech Center for

146 5. Essential Data Processing

If we do not care about the normalization of the single scattering profile, andif we delete the zero-loss peak Z(E) from the data (it is suppressed by thethermal correction anyway), we obtain:

A1(E) =1

2WF−1

[ln

(F [S(E)]F [Z(E)]

)]. (5.46)

5.4.3 Neutron Weighting

Strictly speaking, the phonon DOS arrived at using the procedure outlinedabove and in Fig. ?? is not the true phonon DOS, but rather the neutron-weighted DOS. The neutron-weighted DOS is identical with the phonon DOSfor an elemental scatterer. This is not the case for a sample that contains morethan one type of atom, or scatterer. The neutron-weighted phonon DOS isrigorously defined in (??), which is provided again here:

gNW(E) ∝∑d

gd(E) exp(−2Wd) exp(2W )σdmd

(5.47)

where exp(−2Wd), σd and md are the Debye-Waller factor, total scatteringcross-section and mass of atom d. The Debye-Waller factor is an explicitfunction of gd(E). The term exp(2W ) is the average Debye-Waller correction;this is calculated from the self-consistent neutron-weighted DOS. The factorexp[2(W −Wd)] is approximately unity. For the case where σd/md is thesame for all species d, gNW(E) ≈ g(E).

Obtaining the true phonon DOS from the neutron-weighted phonon DOSrequires a full analysis of the lattice dynamics. This can be performed bysimulational procedures described in a later chapter. The neutron-weight cor-rection as well as other approximations involved in the data analysis can beovercome by fitting a dynamics model to the neutron-scattering data directly.Although this approach is both scientifically and computationally demand-ing, we foresee no better method for extracting the vibrational dynamics frominelastic neutron scattering measurements.

5.4.4 N/A Coherent Case

Further Reading

The contents of the following are described in the Bibliography.Leonid V. Azaroff: Elements of X-Ray Crystallography, (McGraw-Hill, NewYork 1968), reprinted by TechBooks, Fairfax, VA.Bernard D. Cullity: Elements of X-Ray Diffraction, (Addison-Wesley, Read-ing, MA 1978).

protocols

Page 160: Experimental Inelastic Neutron Scattering - Caltech Center for

6. N/A DANSE Reference

6.1 N/A NeXus

6.2 N/A Control Structures

6.3 N/A Instrument Modules for ARCS

6.3.1 N/A chop

6.3.2 N/A isaw

6.4 N/A Rebinning

6.4.1 N/A iliad

6.4.2 N/A homer

6.4.3 N/A opengenie

6.5 Processing of Physical Scattering Data

6.5.1 Multiphonon.py

Description. This Python module performs a multiphonon expansion tosimulate experimental inelastic scattering spectra. Input to the program is adisk file of a phonon DOS in terms of energy, intensity, and error, plus userinput on the temperature, atom mass, energy of the incident neutron, requestfor analysis of data with constant-Q (must supply Q) or TOF angle bank(must supply angle, φ). Multiphonon.py calculates terms in the multiphononexpansion as explained in Section 5.4, using the theory of Section 2.6.7, andsums spectral contributions from the user-specified multiphonon processes. Amultiphonon calculation could be important for confirming that multiphononscattering is small under the selected experimental conditions, or for usein subtracting higher-order phonon scattering to extract the single-phononprofile for conversion into a phonon DOS, for example. The code follows theprocedure of performing a multiphonon expansion as described in Section 5.4.

Page 161: Experimental Inelastic Neutron Scattering - Caltech Center for

148 6. N/A DANSE Reference

The names of the variables in the code are matched to those of the theory,as developed by Varley Sears and used in Section 5.4. An iterative procedurefor performing this correction is explained in Section 5.4.1.

The input file must have the format of a short header followed by a longtable whose entries are sublists with numbers corresponding to the names inthe header. The format is:

header = [’Energy’, ’Intensity’, ’Error’]table = [[0.0,0.0,0.0], [0.25, 0.00193, 0.0],...

[32.0, -5.753, 0.0] ]

The simplest way to use Multiphonon.py is through the shell commandline:

mycomputer% python Multiphonon.py

In this standalone mode, the parameters and data file name are obtained fromthe user-editable file mpUserInput.py. (Alternatively, these input parameterscan be provided by the DANSE framework.) Most of the parameters are self-explanatory and documented in the mpUserInput.py. The parameter constQmay need some explanation, however. If the parameter constQ = None, theprogram works with angle banks of a TOF chopper spectrometer. In thiscase the angle phi must be supplied for the angle bank, with phi = 0.0corresponding to the forward direction, and phi = 180.0 corresponding tofull backscattering. For such TOF data, the multiphonon scattering varieswith the energy across the spectrum from each angle bank. Multiphonon.pywas designed to handle this feature of TOF data by calculating the kinematicsof Q versus E. Alternatively, if the data were acquired (or processed) forconstant Q, the value constQ = 4.6, for example, would set Q = 4.6 A−1.

The code of Multiphonon.py is pure Python without C++ extensions.The main loop of Multiphonon.py is a function named run() that performsthe following operations, using mid-level functions in the file mpFunctions.py:

• Checks that user input parameters are physically reasonable. Calls mid-level function checkUserInput().

• Gets data from the disk file and sets up the run. Calls mid-level functionsetupRun().

• Calculates the 1-phonon quantities A1(E) and S1(Q,E), and other aver-ages over the phonon states such as 2W and γ0. Calls mid-level functiononePhonon().

• Higher-order phonon scattering is calculated by successive convolutionswith the one-phonon profile to calculate the n-phonon quantities An(E)and Sn(Q,E). Calls mid-level function multiPhonon().

• Prepares the results for output. The various orders of n-phonon scatteringare placed on a common energy axis, and summed as requested by the userinput. Calls mid-level function prepareResults().

• Outputs the results to disk. In version 1.0 of the code, the user can selectoutput in the same format as the input (native Python lists), or in 3-

Page 162: Experimental Inelastic Neutron Scattering - Caltech Center for

6.5 N/A Processing of Physical Scattering Data 149

column ASCII format with values of energy, intensity, error on each line.Calls mid-level function outputResults().

All these mid-level functions are contained in the Python module mpFunctions.py.The hierarchy of the files is shown in Figure 6.1. Note that mpFunctions.pymakes use of lower-level functions contained in the module mpUtilities.py.The low-level functions in mpUtils.py are used either by importing into themid-level function module mpFunctions.py, or are called by other low-levelfunctions in mpUtilities.py. The fourth file, mpUserInput.py, is used whenMultiphonon.py is used as a standalone application, but Multiphonon.pycan also be supplied with input parameters from the DANSE framework.

Fig. 6.1. Relationship between Multiphonon.py and its associated files. Arrowsshow directions of the imports.

The low-level functions of mpUtils.py are not seen directly by Multiphonon.py.The low-level functions include I/O, normalization, list manipulations, con-volutions, and thermodynamic functions. The user need not be concernedwith these low-level functions. Nevertheless, the following functions may beof interest for re-use in other programs:

def getData(filenamein):# Get the phonon DOS and the energy values from filename.py# Normalize the pDOS.return E, pDOS

def normalize(list):# Normalize the list so that all entries sum to unity.return list

def Q_value(E_inc, E, phi):# This is the routine to calculate the Q-value in [A-1]# from an energy [meV] and scattering angle [degrees].return Q

def convolve(1phonon, nphonon):# Calculate the convolution of a 1-phonon spectrum with an# n-phonon spectrum.return conv

Page 163: Experimental Inelastic Neutron Scattering - Caltech Center for

150 6. N/A DANSE Reference

def factorial(n):# Calculate n factorialreturn factorial

def W2_calc(Q, Gamma0):# Calculate the quantity 2W, used for example as the exponent# in Debye-Waller factors.return W2

Performance. Although Multiphonon.py is not compiled, it takes of order1 second of runtime including the launching and exiting of the Python inter-preter. The performance degrades with the number of terms, n, calculated inthe multiphonon expansion, as shown in Figure 6.2. Each term in the expan-sion includes a spectrum that extends to a wider range of energy. This widthscales with n, and many of the computational procedures also scale with n.The time for performing a convolution scales with n2, however, and this maybe a bottleneck if n is very large. In practice however, we have rarely foundit necessary to use values of n greater than 4. If larger values are needed, themultiphonon correcion procedure is probably unreliable. Very large valuesof n should approach the Gaussian spectrum of the impulse approximationdescribed in Sect. 2.6.6.

40

30

20

10

0

Time [sec]

20151050

Order [n]

time_cpu

fit = 0.3 + 0.094 * n**2

Fig. 6.2. Performance of Multiphonon.py, including launching of the Python in-terpreter, clocked on an older Macintosh titanium PowerBook G4. Results wereobtained from the UNIX shell by running: time Python Multiphonon.py. Data wasa DOS file from Ni metal containing of 152 points. Vertical axis is CPU time, thehorizontal axis is n, the highest order term in the expansion.

Future Development. At present, Multiphonon.py does not propagateerrors from input to output.

Page 164: Experimental Inelastic Neutron Scattering - Caltech Center for

Further Reading 151

6.5.2 N/A mscatt

6.5.3 N/A mslice

6.5.4 N/A tobyfit

6.5.5 N/A tobyplot

6.5.6 N/A multifrills

6.6 N/A Visualization

6.6.1 N/A irisexplorer

6.6.2 N/A matlab

6.6.3 N/A idl

to be written...

6.7 N/A Modeling of Physical Scattering Data

6.7.1 N/A bvk

6.7.2 N/A unisoft

6.7.3 N/A gulp

6.7.4 N/A spinwave

6.7.5 N/A spinfluct

6.7.6 N/A comparemodel

6.8 N/A Simulation of Physical Scattering Data

6.8.1 N/A mcstas

6.8.2 N/A scatterer

6.8.3 N/A comparesimul

6.9 N/A Existing Scripts

6.10 N/A Customizing Scripts

6.11 N/A N/A Support N/A N/A N/A

N/A Further Reading

The contents of the following are described in the Bibliography.Leonid V. Azaroff: Elements of X-Ray Crystallography, (McGraw-Hill, NewYork 1968), reprinted by TechBooks, Fairfax, VA.Bernard D. Cullity: Elements of X-Ray Diffraction, (Addison-Wesley, Read-ing, MA 1978).

Page 165: Experimental Inelastic Neutron Scattering - Caltech Center for
Page 166: Experimental Inelastic Neutron Scattering - Caltech Center for

7. N/A Structure of Computer Programs

7.1 N/A Abstractions

7.1.1 N/A Abstractions of Procedures

7.1.2 N/A Abstractions of Data

7.2 N/A Functions, Classes, Modules, and All That

7.3 N/A Data Flow and Streams

7.4 N/A Computer Graphics

N/A Further Reading

The contents of the following are described in the Bibliography.H. A. Abelson and G. J. Sussman: Structure and Interpretation of ComputerPrograms (MIT Press, Cambridge Mass, 2001).

Page 167: Experimental Inelastic Neutron Scattering - Caltech Center for
Page 168: Experimental Inelastic Neutron Scattering - Caltech Center for

8. DANSE Architecture and Engineering

8.1 Software for Inelastic Scattering

8.1.1 Overview of Capabilities

Data from inelastic chopper spectrometers can reveal the fundamental dy-namical processes in materials or condensed matter, but not without sub-stantial data analysis to produce even a basic graph of S(Q, E), the intensityas a function of momentum and energy transfers. The elementary excitationsin solids are a substantial topic in themselves, and are covered in the earlierchapters of this book. Making comparisons between the experimental S(Q, E)and the underlying theory requires another level of software sophistication.The it DANSE architecture was designed to make basic data reductions, the-oretical computations, and comparisons between theory and experiment asconvenient as possible. A useful software architecture must be flexible, allow-ing users to rearrange the steps of data analysis, for example. For longevitythis system must allow users to extend its capabilities beyond what those oftoday.

This chapter describes the essential features of the it DANSE architec-ture, although it does not document the individual software components. Thefirst section provides an overview of the scientific capabilities of it DANSE,explaining some of the design philosophy. The second section describes theessential features of the architecture – components acting on data streams.A later section explains how to extend the capabilities of it DANSE by de-veloping new components from C++ code.

8.1.2 Data Reduction

A schematic of the DANSE software for inelastic scattering is presented inFig. 8.1. This figure, first presented as a roadmap in Sept. 2001, shows threepaths for extracting scientific results from the raw data in the upper leftcorner.

The first path, horizontally across the top of Fig. 8.1, is the traditionalapproach to data reduction and visualization. The goal of this analysis is toobtain the intensity as a function of momentum transfer and energy transfer,

Page 169: Experimental Inelastic Neutron Scattering - Caltech Center for

156 8. DANSE Architecture and Engineering

S(Q, E). To do so, the data arrays of counts acquired in terms of instru-ment parameters such as detector pixel and arrival time must be convertedinto normalized intensities with physical units such as A and meV. Instru-ment backgrounds and other distortions must also be removed. It is oftennecessary to correct for other distortions caused by, for example, multiplescattering or multiple excitations. By implementing all software componentsin the interpreted Python language, the DANSE architecture provides a set ofcomponents that are continuous across all data analysis steps. Furthermore,components in the chain can be replaced or rearranged to test different pro-cessing algorithms. It is also important that data streams can be piped intovisualization windows for inspecting the data after the different steps of dataprocessing. An example of a component for energy rebinning of data from achopper spectrometer is described in the context of the data stream archi-tecture in Sect. 8.2.2.

Fig. 8.1. Schematic of DANSE software for inelastic scattering.

8.1.3 Modeling

The second and third paths for extracting scientific results from experimen-tal data are designed to connect experimental data to theory or analyticalmodels.

The second path, the vertical chain in the center of Fig. 8.1, is for compar-ing experimental results to models of sample dynamics. This path is especiallyappropriate for analytical models with adjustable parameters. Consider itsuse for the “neutron-weighting problem” in phonon dynamics, which orig-inates as follows. A measured S(Q,E) from a polycrystalline sample of apure element can often be converted into a phonon density-of-states using

Page 170: Experimental Inelastic Neutron Scattering - Caltech Center for

8.1 Software for Inelastic Scattering 157

a thermal correction procedure. On the other hand, a phonon DOS from abinary compound cannot be otained from the measured S(Q,E) because thedifferent elements in the compound do not scatter neutrons with equal effi-ciencies, causing a “neutron-weighting” of the experimental spectra. Withoutknowing the lattice dynamics of the compound, it is impossible to know thedistortions of an experimental DOS obtained from a measured S(Q,E) aftera thermal correction procedure.

The phonon scattering efficiencies of the different atoms are well known,so a lattice dynamics model can be used to calculate an experimental spec-trum. We do so with an iterative procedure where the force constants in thedynamics model are varied to obtain the best fit to the experimental data.We therefore can use a lattice dynamics model plus a “neutron weighting”correction to obtain the true phonon density-of-states from the measuredS(Q,E) of the compound. The force constants are obtained as parametersthat give the best fit between calculation and experiment. This is now aroutine procedure for us, and new experiments can be designed around thiscapability.

Besides phonon dynamics in ordered compounds, there are many dynam-ics models that can be compared to experimental data. Applications includedata corrections, the determination of parameters such as force constants orexchange stiffnesses, or testing if the model is in fact consistent with themeasured S(Q,E). Four standard types of dynamics models were included inthe baseline design for the inelastic software project:

1. lattice dynamics with a Born–von Karman model (periodic structure)2. spinwave dynamics with a Heisenberg hamiltonian on a periodic structure3. lattice dynamics on a disordered structure, using a moments analysis of

the dynamical matrix4. spin dynamics in a paramagnetic model

8.1.4 Direct Experiment Simulation

The third path from data to science is shown on the left of Fig. 8.1. Thisapproach is a direct simulation of the data measured at the detectors. It isbased on Monte Carlo codes that are used in the neutron community forsimulation of instrument performance. These codes have been tested and val-idated against the performance of real instruments. We will put these MonteCarlo simulations together with molecular dynamics simulations to performdirect simulations of experimental data. A number of molecular dynamicssimulations are available to the theory community. These simulations arecomplementary to the analytical models of Sect. 8.1.3, and are sometimesadvantageous. For example, no approximations are needed when implement-ing structural models of disordered solids, which are not handled well bythe methods of Sect. 8.1.3 (except when the Q information is ignored as inmethods 3 and 4).

Page 171: Experimental Inelastic Neutron Scattering - Caltech Center for

158 8. DANSE Architecture and Engineering

One possibility is to include the sample into the Monte Carlo computa-tions as a component of the instrument, transforming an individual incidentneutron into a neutron scattered into the detector array. Alternatively, simu-lation results for the primary flight path could be stored and used for severalsimulations. For lattice dynamics simulations, we are tentatively planning ontreating the scattering as individual events in the first Born approximation.This is equivalent to sampling the velocity-velocity correlation function ofthe atoms in the sample. These motions will be obtained from a moleculardynamics simulation, embedded as a core in a Python component. This samepath is followed for classical spin dynamics simulations.

8.2 An Architecture for Distributed Data Analysis

8.2.1 Overview

Selector

raw counts

Selector

times

NeXusReader

filename

NeXusWriter

filename

Selector

instrumentinfo

Energy

energy bininfo

Bckgrnd

timeinterval

Fig. 8.2. Schematic of the conversion of raw time of flight data into an energyhistogram.

Most common data analysis tasks can be cast as the results of componentsacting on data streams, very much like the electrical engineer’s concept of asignal processing system. As an example, consider Figure 8.2. The moduleNeXusReader is responsible for reading a file that contains raw data and in-strument information in some standard format and converting it into a datastream. This stream is fed to three filters, each of which selects a particular

Page 172: Experimental Inelastic Neutron Scattering - Caltech Center for

8.2 An Architecture for Distributed Data Analysis 159

subset of the information in the stream, such as instrument information, ar-rival times and raw detector counts. The outputs of the three filters are datastreams that are in turn fed to Bckgrnd, which corrects for the instrumentbackground. The conversion to a histogram of intensity as a function of en-ergy is carried out by Energy, which requires details about the instrument,the times of flight and the background-corrected counts from Bckgrnd. Inthis example, the resulting stream is fed to NeXusWriter for storing in a file,but one can easily imagine that other components, perhaps those of a visu-alization system, might be involved in the further manipulation of the datastream. Similarly, the input stream in this example was generated by readinga file. However, one can easily envision an interface to the instrument thatmakes the data available as it is collected by an experiment in progress.

The diagram in Figure 8.2 is sufficiently intuitive that certain conven-tions are easily inferred. For example, most people deduce correctly thatdata streams flow from left to right, hence the protrusions to the left ofa component represent its inputs and those to the right its outputs. Fur-ther, components may require information such as file names, or energy binlayout, that is best provided by the user rather than another component.This information is represented by the gray boxes above the yellow triangles.Most readers also infer that components nest, and complex modules suchas Bckgrnd and Energy are themselves implemented in terms of lower-levelcomponents, details of which are not shown for the sake of clarity.

The DANSE data analysis software is organized using this data flowparadigm as the basic abstraction. The architecture is a set of services thatenable the encapsulation of the computational engines, establish the trans-port of data between these engines, and provide uniform access to user input.The framework shields the computational engines from the user interface, al-lowing the construction of interfaces that are suitable for a variety of end-userenvironments. Advanced user interfaces allow the direct manipulation of theanalysis network and provide visual ways to interact with the componentsand display the results of the analysis.

The remainder of this section describes in detail some of the frameworkservices and their interactions.

8.2.2 Components

The bulk of the intellectual capital in data analysis software lies in the rou-tines developed by instrument scientists and expert users that enable thephysical interpretation of the raw detector signals, or facilitate the compari-son with theoretical models. Certain clusters of these routines carry out iden-tifiable higher-level tasks and have enough in common to constitute reusablemodules. A major goal of the proposed architecture is to enable scientists tomake contributions to a sophisticated software package with as little expo-sure to the complexity of the system as possible. Conversely, the rest of the

Page 173: Experimental Inelastic Neutron Scattering - Caltech Center for

160 8. DANSE Architecture and Engineering

software should be as shielded as possible from the requirements of a par-ticular computational engine. A component is the architectural element thatacts as the mediator between a low-level module and its environment. Wewill refer to these low-level routines as the component’s core, as illustratedin Figure 8.3.

Component

Core

Fig. 8.3. Schematic representation of a software component.

A component is responsible for the initialization of its core, which may in-volve delivering user-supplied information. We will refer to such informationas the component’s properties. When a component is instantiated, it pro-vides the framework with a table of pairs of strings with property names anddefault values. The framework makes this information available to the userinterface, which is responsible for soliciting the user’s input. The propertytable is read at component execution time. It is used to initialize the core byconverting each property string to its native representation. This mechanismbypasses much of the complexity of component initialization and allows forthe complete decoupling of the core from the user interface.

Components interact with each other by exchanging information in datastreams. Streams are a useful abstraction because they promote a weak, stan-dardized coupling between components. For each application domain, thereis typically only a handful of different data types that are exchanged betweencomponents. For the analysis of neutron scattering data, the majority of dataexchanges involve tables and generalized histograms, described in more detailin Section 8.2.3. Components negotiate the actual details of the data exchangewhen they are first connected to each other.

When a stream delivers data at the input port of a component, the com-ponent must make the data available to its core. Conversely, the componentmust place results in the data stream connected to its output ports. The de-tails of this process depend rather strongly on the choices of programminglanguages, operating systems and compilers. Fortunately, these platform de-pendencies are rather generic and can be handled as part of the servicesoffered by a component1.

Typical component cores manipulate large data sets and can be compu-tationally intensive. They are appropriately implemented in low-level lan-1 This implies delegating part of the task of resolving the platform dependencies

to the configuration management system.

Page 174: Experimental Inelastic Neutron Scattering - Caltech Center for

8.2 An Architecture for Distributed Data Analysis 161

guages, such as FORTRAN and C. To the extent possible, the DANSE softwareis language neutral so it can provide a forward migration path for legacycodes. The software provides explicit support for parallel programming.

The work required to transform a data analsis program into a componentis discussed in Sect. ?? below. Common tasks, such as accessing the contentsof data streams, are done with a standardized interface. For certain types ofcomponents, such as those that manipulate a single data stream, upgradingmay involve little beyond using the services provided by the framework. How-ever, component cores have somewhat more stringent quality requirementsthan the typical routines in monolithic codes that run on a single worksta-tion. Software defects, such as those that lead to core dumps or, even worse,memory leaks, are much more destructive and annoying to the user whenthey disrupt a large scale distributed computation that involves the alloca-tion of scarce resources in remote facilities. Clearly, contributed componentsthat are targeted for wide usage by typical users must go through extensivetesting and a quality approval process.

For similar reasons, component cores cannot simply abort a computationthat failed to converge or appears to be going astray by calling system rou-tines such as exit that cause the unconditional termination of execution.Further, practices such as printing to the user console become much morecomplicated for components that may not have a user console or may noteven have a controlling terminal. Components have access to a centralizedmechanism for structured logging of status and error messages. Legacy coresmay require some minor re-engineering to comply with this requirement.

8.2.3 Data Streams

Data streams are the conceptual encapsulation of the mechanism for dataexchange among components. Streams can be thought of as single-port com-ponents that merely copy data present in their input port to their outputport. They are an essential architectural element because they enable thedecoupling of components from one another and hide the details of the datatransport mechanism.

The conceptual decoupling of components from each other through the useof streams enables their physical decoupling. This makes it possible to dis-tribute the computation among multiple process spaces. The user can choosewhether components reside in the same process space, as separate threads, asseparate processes on the same machine or are deployed across the network.Connections that cross process boundaries can discover where the compo-nents they connect are physically deployed and then determine an appropri-ate mechanism for data transfer. The choice is completely transparent to thecomponents themselves and therefore the control and data transfer mech-anisms can be implemented independently by an expert. Further, one cantake advantage of emerging protocols and services for distributed computingwithout disturbing any of the existing components.

Page 175: Experimental Inelastic Neutron Scattering - Caltech Center for

162 8. DANSE Architecture and Engineering

Connections between components are established at run time when onecannot rely on compilers to ensure that an input port receives data compatiblewith its expectations. A frequently-used (but extreme) solution is to bypassthe problem by allowing streams to carry only one data type, such as three-dimensional arrays of doubles. At the other extreme is a solution commonlyemployed by industrial-strength component systems that allows componentsto exchange arbitrary data types. A specialized language allows componentsto describe the types of data streams they consume or generate, providing inessence a run time typing system. The first extreme is rather restrictive, whilethe latter is fairly complex to implement and maintain. Instead, we proposea compromise that takes the requirements of our specific application domaininto proper account and restricts the data stream types without sacrificinggenerality.

We have identified two abstract types, tables and histograms, that appearto be sufficiently general to satisfy the data exchange needs of our compo-nents for the analysis of neutron scattering data. Tables are inspired by thedatabase concept of the same name. Potential uses include the storage of rawevents in a detector. The data are conceptually organized in rows, each ofwhich has the same number of named columns. A description of the tablestores the name and data type of each column, along with the number ofrows, if known. This information constitutes the table meta-data. Histogramsare a generalization of multi-dimensional dense arrays of floating point num-bers and are the typical structure for exchanges between components thatmanipulate processed data. The histogram meta-data consists of the numberof dimensions plus an array for each dimension that describes the histogrambins. Other data types may be added in the future if enough componentsexchange information not expressible as histograms or tables.

There is a clear separation of large data sets from the lightweight informa-tion that describes them. Data storage and data transport are entirely opaqueto the data producers and consumers, and these data handling functions areconsidered implementation details that differ for each platform. Transportof the actual data is considered an expensive operation, since it scales withthe amount of data in the stream, whereas the meta-data can be exchangedfreely between components. We will construct a simple stream descriptionlanguage based on XML to allow components to explain to each other thecontent flowing in the data streams connected to their ports. The meta-datawill be part of the negotiation protocol for component connections and willbe used to issue proper diagnostics when irreparable incompatibilities aredetected.

8.2.4 Implementation

The software is written as components in Python, a modern very-high-levelcomputer language, and as C++ cores with Python wrappers. The C++cores are then accessible as Python functions, but they perform as compiled

Page 176: Experimental Inelastic Neutron Scattering - Caltech Center for

8.2 An Architecture for Distributed Data Analysis 163

code. The Python interpreter makes it easy to arrange components into cus-tom scripts without recompilation. Interpreted Python scripts provide userswith great flexibility in constructing custom analysis procedures from a well-stocked software toolkit. Scripts for common types of data analysis will benested into “one-click” analysis packages, but their customization should bereadily possible.

Data analysis as a service accessed through an Internet web site is illus-trated in Figure 8.4. Components can be maintained and run centrally onwell-tested platforms. A compute server, not the user, arranges for compu-tation on the appropriate hardware. A user could elect for little code andno raw data to reside on his or her local computer, while still directing thereuse and reconfiguring of the needed Python components, including thosethat run on specialized hardware such as Beowulf clusters. Our intent is toensure that any user can utilize the highest-performance hardware withoutbuying and maintaining it.

Fig. 8.4. Architecture for distributed computing.

Today the computing resources are located at Caltech, where we are rela-tively free to experiment with them. The essence of a working web portal andtwo user interfaces have been demonstrated. In one interface, the user logson to our web portal through a standard browser such as Internet Explorer,and receives a Java applet that runs under the browser. The applet providesa “Labview-like” graphical user interface (GUI) where the user “wires to-gether” a set of data analysis components. Changing the present GUI is notdifficult because of a clean separation between the user’s depiction of the dataanalysis procedure, and the server’s execution of the data analysis procedure.With this separation, a user could select among several GUIs, depending onneeds or preferences. We have already tested two of them.

After the user arranges an analysis procedure in the GUI, the Java ap-plet transmits instructions to the web server using XML-RPC protocols. Thesoftware on the server arranges an appropriate Python script and executes

Page 177: Experimental Inelastic Neutron Scattering - Caltech Center for

164 8. DANSE Architecture and Engineering

it. Execution may occur locally or on other computing resources, today ac-cessed by XML-RPC protocols. The response to the user is through his orher Internet browser.

Many of the data analysis components could be selected to run locally onthe user’s computer. Nevertheless, software released for running on a user’sown computer will include automatic and transparent Internet access to theDANSE compute server. Such a remote access to the DANSE system willovercome a traditional problem with software releases for a user’s local com-puter, where software developers must design for the least-capable hardware.The user could specify what parts of the analysis would be performed locallyor remotely. With such access to the central service, capabilities for largesimulations on the DANSE system, for example, would be available to theuser through a familiar software package.

In principle, the DANSE architecture can serve all instruments at allneutron sources. Moving this principle into practice is underway as of thiswriting in 2003.

8.2.5 Advantages of a User-Directed, Distributed Architecture

• The architecture offers access to the best combination of hardware andsoftware.

• The architecture allows the user to select which processes are executed lo-cally, and which ones are distributed automatically to the central DANSEhardware. The user can analyze data with any platform, although it maybe advantageous to have a local capability for some frequently-used com-putations.

• When experimental data and analysis codes reside on central servers, inter-action with the data across the Internet requires minimal data bandwidth.

• A clean separation of the user interface from the analysis code allows in-terchanging the user interface without affecting the core service.

• Centralization of the main codes simplifies their maintenance, and com-puting resources can be changed without affecting the user.

• One web portal will serve all neutron instruments. This consistency is pos-sible for other neutron facilities too.

8.2.6 Extensibility by Scientists

Python scripts can be prepared for routine analysis, and used easily. De-veloping code for the proposed architecture can be done at three levels ofincreasing complexity. New users may be satisfied by the first level. Arbi-trary data analysis is possible at the second level, but optimal performanceis offered by the third level.

1. A user could select a complete script from a menu of tested procedures.A set of standard data reduction and visualization could be performedas a “one-click” operation.

Page 178: Experimental Inelastic Neutron Scattering - Caltech Center for

8.3 Extending DANSE: Writing C++ Extensions to Python 165

2. For altering existing Python scripts, the entry barrier is very low. Thislow barrier is possible with a “Labview”-style interface that allows usersto “wire-up” modules of data and code through a graphical user interface.

3. For writing new Python code, the entry barrier is as low as possible withany computer language. Python programs are interpreted and easy todebug. Their performance is comparable to what is expected of propri-etary scientific data analysis packages such as IDL or Matlab, which mayrun some two orders of magnitude slower than compiled code. If this is adifference between 10 microseconds and 1 millisecond, compilation maybe unnecessary. The user can decide when it is appropriate to make thetransition from Python to compiled code.

4. For optimal computing performance, a transition path to a lower-levellanguage such as C++ is available. Code written in C++ needs Pythonbindings so the entry points to the compiled C++ code and data areknown to the Python interpreter. Writing these bindings can be doneby scientists, although this involves understanding some details of howPython functions are implemented. Automated tools exist today to dothis reliably, and they could do the bindings elegantly if they were devel-oped further in the proposed effort on central resources. Another impor-tant product of the central resource effort will be a standardized objectmodel to allow low-level codes written in FORTRAN, C, or C++ to be incor-porated as cores of Python components. Writing these C++ extensionsfor Python is the subject of the next section.

8.3 Extending DANSE: Writing C++ Extensions toPython

First, some sources of information written by vastly more competent au-thorities: the Python extension and embedding manual, and the Python-CAPI reference manual. These documents are available at the Python website:http://python.org, but better yet, just look in the ’ext’ and ’api’ subdirecto-ries of your Python distribution’s Doc directory for HTML versions.

This section was written to supplement those documents, first by giv-ing an example of dynamically allocating C++ objects and keeping trackof them, and second by introducing some of the API functions for workingwith aggregate types like tuples and lists, for which the easiest Python-Cconversion tools don’t work. Also, I’ve concocted some simple, try-this-at-home examples to illustrate the process. Finally, I’ve added a more real-lifeexample.

Note: In the following, C++ is used to mean both C and C++. ThePython-C API is written in C, but for the most part, but that can be calledseamlessly from C++. There’s only one item that must have C linkage, theinit function, described below.

Page 179: Experimental Inelastic Neutron Scattering - Caltech Center for

166 8. DANSE Architecture and Engineering

8.3.1 Overview

Why write C++ extensions to Python? To reuse existing code, and to gainbetter performance. A great deal of software has already been written in Cand C++ (not to mention FORTRAN), and, at least at the present, nothingbeats compiled languages for performance in the numerically intensive codesthat DANSE supports. Extending Python allows us to turn all that code intobuilding blocks for solutions. Libraries of extensions package those buildingblocks into kits that users can adapt to solve their problems.

Of course you can do all that without Python, so why use it at all?Python has an easier learning curve than C++, and it’s more flexible andimmediate, making it available to a wider set of users. Once a library ofextensions is available on a platform, users can call out to that library, mixingand matching components and testing combinations, without the overheadof compiling and linking. (This immediacy should not be underestimated.)And with all its standard library packages, Python can be manipulated to dosome pretty amazing things that would be more difficult to realize in C++,like parsing XML documents, setting up computations, etc.

Writing C++ extensions for Python can be learned in an afternoon, es-pecially if there are some examples to follow.2 The idea is this: you have aC++ class or function, and you’d like to make it callable from the Pythoninterpreter. You’ll need to (I) write some wrapper code in C++, and (II)compile it into a C++ library that the Python interpreter can dynamicallyload and use. You then typically (III.) write a Python module that mediatesbetween the Python user and this library. This makes life plush for thoseusers who don’t want to be bothered with the details of finding out what’sin the library and how to call it. More importantly, it gives us the chance tocheck inputs as soon as possible for errors. When a bad pointer is sent to theC++ level, the results are disastrous (a core dump on a good day), so oursoftware can be made more robust if we handle the pointers ourselves.

It takes more care to create a library that is complete: catches exceptions,checks that preconditions and postconditions have been met, and so on. Theseare more advanced topics, covered in other parts of the book (SOMEDAYNAME A FEW?? ). Low-level DANSE programmers will be expected to in-corporate these techniques into their code, but first things first.2 If it’s so easy, why hasn’t someone written a program to write the wrappers

automatically? They have! Packages like the Simple Wrapper Interface Generator(SWIG, http://www.swig.org) will do nearly all of the work for you. There arearguments for and against automatic code-generators like SWIG, and I’ve workedboth ways. At the moment, writing the bindings is such an easy task, and I do sorelatively little of it, that I prefer to do it myself. Others no doubt feel differently,and I have no interest in changing their minds. But even if you’re going to useSWIG, or a similar library, there’s merit in putting in some time writing yourown wrappers to learn how and why things get done. Then you can judge wellfor yourself which approach suits your situation.

Page 180: Experimental Inelastic Neutron Scattering - Caltech Center for

8.3 Extending DANSE: Writing C++ Extensions to Python 167

8.3.2 A Little More Detail

Here are those three easy steps again, in slightly more detail:

• Write the bindings.There are three essential components:1. Wrapper function(s). (One for each function you want callable from

Python). The wrapper typically calls a function or a class method, orit creates a heap object. Once you learn how to write one wrapper, youknow how to do it, because all wrappers do the same three things.

2. Method table. (One entry in the table for each function you want callablefrom Python). The method table tells the Python interpreter which C++functions it can call from the library.

3. init function. (One per module) This is the interpreter’s entry point intothe C++ library.

These three steps are accomplished with generous aid from the Python-Cextension API.

• Compile it.This is slightly platform dependent (Michael Aivazis’s system for processingsource code removes this platform dependence for UNIX flavors, includingcygwin; Windows is in the works). The goal is to compile into a sharedobject library (unix) or a dynamically linked library (the beloved Windowsdll).

• Call it from Python. One typically writes a Python module that acts as alayer between the user and the C++ library. By doing things like providingPython classes that mirror the C++ classes, one can make the experiencequite similar. Or dissimilar. The choice is yours.

8.3.3 A Lot More Detail: Wrappers

Every wrapper function does three things:

a) Converts a Python object with the arguments to the C++ function intoC++ objects,

b) calls the C++ function,c) converts the output to a Python object with the result and return it.

Let’s first run through these steps with numbers and strings, for whichthere’s an immediate connection between Python and C++ types; we canuse a function, PyArg_ParseTuple(), which is built in to the API. Laterexamples look at tasks like working with C++ class instances and usingaggregate Python types, such as dictionaries and lists.

Simple Example: PyArg ParseTuple, Py BuildValuea) Convert arguments from Python to C++

Page 181: Experimental Inelastic Neutron Scattering - Caltech Center for

168 8. DANSE Architecture and Engineering

To convert the Python arguments into C++ objects, first define variablesof the appropriate type, one for each C++ argument. Then pass the addressesof these variables into PyArg_ParseTuple(). This function takes the argstuple, pulls PyObject’s out of it, and converts them to C++ types accordingto a format string.

Here are some examples:

//One integer:int a;int ok = PyArg_ParseTuple(args, "i",&a);if(!ok) return o;

//Two integersint a, b;int ok = PyArg_ParseTuple(args, "i",&a, &b);if(!ok) return 0;

//One integer, a string, two doublesint anint;char * astring;double dub1, dub2;int ok = PyArg_ParseTuple(args, "isdd", &anint, &astring,

&dub1, &dub2);if(!ok) return 0;

A complete list of what can go into the format string is given in the exten-sion documentation (look in the ext subdirectory of the doc directory in yourPython distribution, or look online at http://python.org/doc/current/ext/ext.html).In the current (Oct. ’02) documentation, you want section 1.7, ”ExtractingParameters in Extension Functions”.

PyArg_ParseTuple() checks the types of the objects in the tuple argsagainst the types given in the format string. If there’s a discrepancy, it setsthe exception context and returns 0 to our wrapper. If our wrapper detectsthat, it returns 0 to the Python interpreter, which understands that to meanfailure, and raises an exception. So if you’re using PyArg_ParseTuple(),most of the error checking is done for you! It is not idiot-proof, but it issmart-friendly.

Once PyArg_ParseTuple has successfully returned, do any additional pro-cessing or checking of the input data that’s appropriate. For instance, Pythondoes not have an unsigned integer type. With a C++ function that takes anunsigned int, you’ll need to pass an int to PyArg_ParseTuple, check that theint is greater than -1, and then convert it to an unsigned int.

b) Call your code

It’s your function, call it.

c) Convert output to a Python object, and return it

Page 182: Experimental Inelastic Neutron Scattering - Caltech Center for

8.3 Extending DANSE: Writing C++ Extensions to Python 169

The API gives a function called Py_BuildValue. It returns a pointer to aPyObject; it takes a format string and variables. The format strings are thesame as those used in

PyObject *py_result = Py_BuildValue("i", result);or—

PyObject *py_result = Py_BuildValue("s", astring);etc. What’s returned by Py_BuildValue is what the wrapper will return.One note: don’t return 0; the interpreter will take this as sign of failure. Youcould, of course, return a Python integer with value zero:

Py_BuildValue("i",0). You can specify more than one item to return,in which case Py_BuildValue will place the items in a tuple.

Here’s a complete example of wrapping a function, “bogus”, that takesa double, a string, and an int (in that order) and returns an int. We expectthat the arguments will come from Python in the order string, int, double.

static PyObject *wrap_bogus(PyObject *, PyObject * args)//First, get the arguments from Pythonint anint = 0;double adub = 0;char * astring = 0;

int ok = PyArg_ParseTuple(args,"sid",&astring, &anint, &adub);if(!ok) return 0;//do any checking of arguments here

//Second, make the function callint result = bogus(adub, astring, anint);

//do any extra stuff you want with the return result here

//Third, build a Python object to returnreturn PyBuildValue("i",result);

Wrapping classes: PyCObject FromVoidPtr, PyCObject AsVoidPtr.

a) Creating C++ objects

Wrapping functions is well and good, but what about C++ classes?Python can work with a C++ object by dynamically allocating it and hold-ing onto a pointer. That pointer can be passed back to subsequent wrappersthat can then invoke class methods on the object. The pointer is handledin Python by a type PyCObject. To convert a pointer to a PyCObject, usePyCObject_FromVoidPtr(). This API function takes two arguments: the voidpointer, and a pointer to a function that takes a void pointer and no return.The purpose of the function is to delete the C++ object when nothing in thePython session is paying attention to it any more.

We get the arguments to the constructor from the Python API, create theobject using new, and return a pointer to that object to the interpreter. Use

Page 183: Experimental Inelastic Neutron Scattering - Caltech Center for

170 8. DANSE Architecture and Engineering

the API function PyCObject_FromVoidPtr() to create the Python object toreturn to Python. Here’s an example with a real (if dull) class called Numbers:

class Numberspublic:Numbers(int first, double second) : m_first(first), m_second(second);~Numbers(void);double NumMemberMult(void)return (double)m_first*m_second;private:int m_first;double m_second;;

Here’s a wrapper that creates a new instance of Numbers:

PyObject *wrap_new_Numbers(PyObject *, PyObject* args)//First, extract the arguments from a Python tupleint arg1;double arg2;int ok = PyArg_ParseTuple(args,"id",&arg1,&arg2);if(!ok) return 0;

//Second, dynamically allocate a new objectNumbers *newnum = new Numbers(arg1, arg2);

//Third, build a Python object to returnPyObject * py_newnum = PyCObject_FromVoidPtr( static_cast<void *>(newnum),&DelNumbers);

return py_newnum;

Look familiar? This wrapper has essentially the same form as wrap_bogus().That’s because ALL wrappers have essentially this form.

The pointer to the dynamically allocated object, newnum, goes out ofscope as soon as wrap_new_Numbers() returns. The only thing keeping thisfrom being the mega-classic memory leak is that the Python interpreter hasan object that will keep track of the address of the new object. The interpreterkeeps track of that object for us, and when we lose interest in it (when itsreference count goes to zero), the interpreter will call a C++ function todelete the C++ object. So, the second slot in PyCObject_AsVoidPtr() isa pointer to a function with return type void and one void argument. Thesignature of PyCObject_AsVoidPtr() is:PyObject * PyCObject_FromVoidPtr( void *, void (*DeleteFunction)(void*));

You must supply the function pointed to (in this example called DelNum-bers). It has the delete corresponding to the new above. Here’s it is:

Page 184: Experimental Inelastic Neutron Scattering - Caltech Center for

8.3 Extending DANSE: Writing C++ Extensions to Python 171

static void DelNumbers(void *ptr)

Numbers * oldnum = static_cast<Numbers *>(ptr);delete oldnum;return;

This strategy can be used for any dynamically allocated resource, such asfile handles or arrays.

Using the object

The user can’t actually do anything with the pointer in the Python layer,except send it back to the C++ layer to do something else: call a C++class method on it, or give it as an argument to another function. Here’s anexample of wrapping a class method.

#include <Python.h>...PyObject *wrap_Numbers_MemberMult(PyObject *, PyObject* args)// First, extract the PyCObject that has the// Python version of the address// from the args tuple

PyObject *pynum = 0;int ok = PyArg_ParseTuple(args, "O", &pynum);//"O" is for Objectif(!ok) return NULL;

//Convert the PyCObject to a void *void * temp = PyCObject_AsVoidPtr(pynum);//cast void pointer to Numbers pointerNumbers * thisnum = static_cast<Numbers *>(temp);//Can combine the two lines into one://Numbers *thisNum = static_cast<Numbers *>(// PyCObject_AsVoidPtr(pynum));

//Second, make the function calldouble result = thisnum->NumMemberMult();

//Third, build a Python object with the return valuereturn Py_BuildValue("d",result);

All you have to do is fish the PyCObject out of the tuple, extract the voidpointer to a C++ variable, cast it to the appropriate type, and use it; thenbundle up the result and send it back to the interpreter.

Page 185: Experimental Inelastic Neutron Scattering - Caltech Center for

172 8. DANSE Architecture and Engineering

Working with composite types. What if you want to pass a Pythonlist of numbers to a C++ function? There’s no format code to pass toPyArg_ParseTuple for lists. The solution is to extract the list from the argstuple as a PyObject (format code: “O”). Then use the Python-C API func-tions for working with lists to load the Python list, item-by-item, into a C++array. Suppose our target function has the signature

double sum_some_numbers(double *numbers, int array_length)Here’s some code that could wrap this function. Note that we have to take re-sponsibility for error checking. We can set the exception using PyErr_SetString().We can verify that Python objects are the type what we think they are byPytype Check().

#include <Python.h>#include <valarray> // This example uses the std::valarray class....PyObject *py_sum_some_numbers(PyObject *, PyObject* args)

PyObject *pyList;int ok = PyArg_ParseTuple(args, "O", &pyList);if(!ok) return 0;

//Did the user send a Python list?int isList = PyList_Check(pyList);if(!isList)

//If not, complain to the Python user and raise an exception:PyErr_SetString(PyExc_TypeError, "You fool! That’s not a list!");return 0;

//How many items are in the list?int numNums = PyList_Size(pyList);

//Maybe you want to do something here if the size of the list is 0.

// Now transfer the contents of the list to an array// valarray: this C++ standard library class is a great// way to avoid memory leaks, and much morestd::valarray<double> nums(0.0, PyList_Size);

for(int i=0; i<numNums; i++)

//Extract the next object in the list:PyObject *temp = PyList_GetItem(pyList, i);

// Was the list item a Python float? If not, quit.// Note that we don’t need to worry about cleaning// up the memory: nums will be automatically destroyed// when execution exits the scope of nums.

Page 186: Experimental Inelastic Neutron Scattering - Caltech Center for

8.3 Extending DANSE: Writing C++ Extensions to Python 173

if( !PyFloat_Check(temp))

//Just what was in that list?PyErr_SetString(PyExc_TypeError, "You fool! That’s not a float";return 0;

// Now convert the Python float to a double, and loadnums[i] = PyFloat_AsDouble(temp);

//Step 2: Call the functiondouble sum = sum_some_numbers(&nums[0], nums.size());

//Step 3: return result.return Py_BuildValue("d", sum);

Sometimes you’ll want to return a Python object, such as a list. In thiscase, you’ll have created a PyObject pointer at some point. You can returnthat pointer directly. If you need to return several Python objects, you canuse Py_BuildValue() with the “O” format code.

The Python-C api is very complete and well-documented. Similar func-tions exist for inserting objects into lists, and working with dictionaries, tu-ples, modules, and so on. Consult Chapter 7 of the api reference. Hopefully,these examples have given you the flavor for wrapping C++ functions.

8.3.4 A Lot More Detail: Method Table

The method table is sort of like a table of contents for the Python interpreter.When it loads the library, it reads the method table to find pointers to thefunctions in the library.

static PyMethodDef numbersMethods[] = "PyNumbers", wrap_new_Numbers, METH_VARARGS,

"Create new Numbers object","PyNumbers_MembMult", wrap_Numbers_MemberMult, METH_VARARGS,

"Multiply Numbers object’s members",NULL,NULL

;

The name of the table must match the second argument in the init func-tion. Each function in the library gets an entry in the table, and each entryhas four components.

1. The string (”PyNumbers” or ”PyNumbers MemberMult”) is what you’llcall from the interpreter.

Page 187: Experimental Inelastic Neutron Scattering - Caltech Center for

174 8. DANSE Architecture and Engineering

2. The name wrap_whatever is the name of the corresponding C++ func-tion.

3. METH_VARARGS indicates that one is using the “tuple named args” ap-proach.

4. The final string will appear as the docstring for this function in thePython layer.

The NULL,NULL marks the end of the table for the interpreter.

8.3.5 A Lot More Detail: Init Function

The final component in the bindings is the init function. This function has tobe named initname of library(). If the filename of the library is numbers.dll ornumbers.so, this function must be named initnumbers; if it’s numbers.dll,then this function is named init_numbers. For this example, let’s call theextension library numbers. The init function’s return type is void, and ittakes no arguments. It calls Py_InitModule(), which takes two arguments:a string literal with the name of the library, and the name of the Methodstable. It must match the name of the Method table. Also, the function musthave C linkage, not C++, meaning the function must be declared extern ”C”if you’re using a C++ compiler. Also, on Windows, the function must beexported by the dll, hence the __declspec(dllexport). To keep some plat-form independence, wrap this in a pre-processor conditional. This functionis executed when the library is loaded, so if there’s other initialization stepsyou need to take, this is the place.

extern "C"#ifdef WIN32 || _WIN32__declspec(dllexport)#endifvoid init_numbers(void)

(void) Py_InitModule("_numbers", numbersMethods);

8.3.6 More Detail: Compile

Compiling the Numbers example under Linux. Here’s a way to com-pile the Numbers example under Linux. You’ll need files with the Num-bers source code (Numbers.cpp and Numbers.h), and the wrapper, Num-bers bindings.cpp. I assume you’re using gcc; if not, you’ll need to modifythe compiler flags appropriately.

To compile, compile each source file:

gcc -I/usr/include/python2.2 -I. -c -fpic Numbers.cppgcc -I/usr/include/python2.2 -I. -c -fpic Numbers_bindings.cpp

Page 188: Experimental Inelastic Neutron Scattering - Caltech Center for

8.3 Extending DANSE: Writing C++ Extensions to Python 175

and link them into a shared library:

gcc Numbers.o Numbers_bindgins.o -lm -lc -fpic -shared -o _numbers.so

In the compile lines, you’ll of course need to make sure that you’ve pointedto the directory where your Python.h file lives. The ”-fpic” specifies positionindependent code, ”-shared” a shared library that can be dynamically linked.

Once you’ve compiled numbers.so, move it into a place on yoursystem’s PYTHON PATH and go to town.

Compiling the Numbers example under Windows. Well, of course wewant all our ARCS modules to run under Linux/Unix, but for all those timesWindows needs a helping hand, here’s how to do it:

For working in Windows, it may be best to use MS Visual C++. Here’swhat you’d do to create a project and so on in VC7.

1. From the Start page select New Project.2. From the Project Types, pick Visual C++ Projects, from the Templates,

choose Win32 project. Fill in the name for your library.3. On the next window, pick Application Settings, and set Application Type

to DLL.4. In the Solution Explorer,• get rid of stdafx.cpp• right-click on the name of the project, and choose Properties• Under the C/C++/General folder, add the additional include directory

in which your distribution’s Python.h file resides.• Under the Linker/General tab, set the output file to your project name.dll.

Note that everything up the “.dll” must be the same as what follows“init” in the init_your_project_name function in the bindings. Inthe Numbers example, we called that function init numbers (it’s thelast function in the file). So the dll has to be called numbers.dll. If thename of the file and the init function don’t agree, the interpreter willget lost.

5. In Solution Explorer, look in the file your project name.cpp– you’ll needto get rid of that crap about APIENTRY DllMain. Better yet, just getrid of the automatically generated code.

Now fill add the source files Numbers.cpp, Numbers bindings.cpp, etc.Build, and when the your project name.dll appears in the output directory,move it into your PYTHON PATH, and enjoy.

8.3.7 More Detail: Call it from Python

In keeping with the Numbers example used above, here’s a Python classcalled Numbers. It’s a ”shadow class” for the C++ Numbers class. Prettymuch everything you can do with the C++ class can also be done with thePython.

Page 189: Experimental Inelastic Neutron Scattering - Caltech Center for

176 8. DANSE Architecture and Engineering

import _numbers

class Numbers:def __init__(self, an_int, a_float):

#Check an_intif type(an_int) != type(1):

raise TypeError, "Fool! an_int must be an integer"#Check a_floatif type(a_float) != type(3.14159)

raise TypeError, "Fool! a_float must be a float"self.this = numbers.PyNumbers(an_int, a_float)

def MemberMult(self):return numbers.PyNumbers_MembMult(self.this)

If this were saved in a module named numbers.py (stored somewhere onyour PYTHON PATH), then an interpreter command line session might looklike

>>> import numbers>>> n = numbers.Numbers(2,3.14)New Numbers object created>>> n.MemberMult()6.280000000002>>> n = 1

The variable n is the only thing keeping track of the Numbers object.When we reassign n, the interpreter calls our bit of code from the C++library that deletes the object, preventing the resource leak.

So now the Python user has something like ”interpreted C++”. Prettycool, eh?

8.3.8 More realistic example

Let’s wrap a function from the NeXus API, NXopen, with all the bells andwhistles. This wrapper is part of a larger library that wraps the entire NeXusC API. The latter, of course, is a simplified interface to the HDF librariesthat the NeXus standard currently uses.

Since this is one of several dozen libraries, we split the bindings up intoseveral files. The wrappers live in pairs of files, one pair for each major func-tional group: file.h/file.cc for file level operations, group.h/group.cc for grouplevel, etc. Only two file level operations from the original NeXus C API arein the Python NeXus API: NXopen and NXflush. Therefore, file.h looks likethe following:

#ifndef NeXus_file_h#define NeXus_file_h

Page 190: Experimental Inelastic Neutron Scattering - Caltech Center for

8.3 Extending DANSE: Writing C++ Extensions to Python 177

// Python bindings for file level operations:// NXopenextern char pyNeXus_NXopen__name__[];extern char pyNeXus_NXopen__doc__[];extern "C" PyObject * pyNeXus_NXopen(PyObject *, PyObject *args);

// NXflushextern char pyNeXus_NXflush__name__[];extern char pyNeXus_NXflush__doc__[];extern "C" PyObject * pyNeXus_NXflush(PyObject *, PyObject *args);

#endif

This file will be included into the file that contains the methods table.Note that in addition to the actual wrapper functions, we declare two chararrays for the name and docstring. Defined in file.cc, these variables keep themethods table neat (the docstrings in particular may get lengthy).

How do we implement the wrapper for NXopen? Begin with the signatureof NXopen, located in napi.h in the NeXus source distribution:

NX_EXTERNAL NXstatus CALLING_STYLE NXopen(CONSTCHAR * filename,NXaccess access_method, NXhandle* pHandle);

The various types NXstatus, CONSTCHAR, NXaccess, and NXhandle aredefined in the NeXus C API header files; we need to track them down so wecan know what the Python user will have to give us in order to satisfy thefunction call.

Searching through napi.h, we learn that NXstatus is a typedef for int,CONSTCHAR is a typedef for char,3 NXaccess is an enumeration with memberslike NXACC_READ, and NXhandle is a typedef for void *. We can’t map theNXaccess enumeration directly into Python types, so we’ll expect a stringfrom the user; by comparing values of the string we’ll assign the proper valueto an NXaccess variable. As for the CONSTCHAR * filename, we can derivethat directly from a Python string.

What about the NXhandle *pHandle? This is interesting. Let’s open upthe NeXus C API source code and find out what exactly is done with thatvoid pointer. Reading through napi.c, we discover that NXopen dynamicallyallocates a structure of type NexusFunction, and that the NXhandle we passto NXopen becomes a handle to that object. In other words, pHandle is anoutput of NXopen, not an input. We don’t need to trouble the Python userwith giving us a NXhandle object; instead, we’ll give them one.

Expecting two inputs, both Python strings, we write the first few lines ofthe wrapper as follows:3 Prefering to not mislead the readers of our code, we might have chosen CON-

STCHAR as typedef const char.

Page 191: Experimental Inelastic Neutron Scattering - Caltech Center for

178 8. DANSE Architecture and Engineering

PyObject * pyNeXus_NXopen(PyObject *, PyObject *args)

char *filename = 0;char *acc_method = 0;

int ok = PyArg_ParseTuple(args, "ss", &filename, &acc_method);if(!ok) return 0;

and we’ve got what we needed from the Python user. Or do we? We owe it toourselves to check the inputs from the user. This could be done either here orin the Python layer. Checking that the inputs are Python strings has alreadybeen performed by PyArg_ParseTuple. There are two questions about thefilename: is it the name of an actual file, and is it the name of an appropriateHDF file? The first question is easily answered in a platform independent wayin Python. The second can only be answered by essentially doing what we doanyway in NXopen. We need to inspect the value of acc_method anyway toconvert it to the appropriate member of the NXaccess enumeration. We cando that easily using the C++ standard library class string:

//Check access_method:std::string methstring(acc_method);NXaccess mode;if (methstring == "r" ) mode = NXACC_READ;else if(methstring == "rw") mode = NXACC_RDWR;else if(methstring == "c" ) mode = NXACC_CREATE;else if(methstring == "c4") mode = NXACC_CREATE4;else if(methstring == "c5") mode = NXACC_CREATE5;else

std::string errstr("NeXus_bindings.cc pyNeXus_NXopen(): ");errstr += "unrecognized access_method string.";PyErr_SetString( PyExc_ValueError, errstr.c_str() );return 0;

Here we’ve used PyErr_SetString to set the (Python) exception con-text if we don’t recognize what the Python user wants, and then forced theinterpreter to raise the exception by returning 0.

At this point, we’re nearly ready to call NXopen—we only need to declarea variable of type NXhandle:

NXhandle handle;NXstatus status = NXopen(filename, mode, &handle);if(status != NX_OK)

std::string errstr("NeXus_bindings.cc pyNeXus_NXopen(): ");errstr += "NXopen failed.";

Page 192: Experimental Inelastic Neutron Scattering - Caltech Center for

8.4 Data Stream Protocols 179

PyErr_SetString(PyExc_IOError, errstr.c_str() );return 0;

If we get to this stage, we’re almost ready to return. Since we are notcontent with any NXstatus but NX_OK, all we need to do is to return theNXhandle initialized by NXopen. But there’s another issue here: NXopen al-locates a resource, so we must release that resource when we’re finished.As with the discussion of allocating C++ objects (§ 8.3.3), we can usePyCObject_FromVoidPtr and a helper function to release the resource whenthe Python user is finished:

return PyCObject_FromVoidPtr(handle, pyNeXus_NXclose);

The helper function (declared static to avoid ) wraps NXclose, which inturn disposes of the resources allocated in NXopen:

static void pyNeXus_NXclose(void *file)

NXhandle oldnxh = static_cast<NXhandle >(file);NXclose( &oldnxh);return;

Finally, we define the name and docstring for this function. The nameshould be something sensible, while the docstring is an opportunity to incor-porate a little documentation.

char pyNeXus_NXopen__name__[] = "nxopen";char pyNeXus_NXopen__doc__[] = "Open a nexus file\n""2 Arguments: filename, access_method\n""Input: \n"" filename (Python string)\n"" access_method (Python string)\n"" allowed values: r (read only)\n"" rw (read/write)\n"" c (create)\n"" c4 (create HDF 4)\n"" c5 (create HDF 5)\n""Output: (return)\n"" PyCObject holding pointer to NXhandle\n""Exceptions: ValueError, IOError\n";

8.4 Data Stream Protocols

How much should we say about this?

Page 193: Experimental Inelastic Neutron Scattering - Caltech Center for

180 8. DANSE Architecture and Engineering

N/A Further Reading

The contents of the following are described in the Bibliography.Leonid V. Azaroff: Elements of X-Ray Crystallography, (McGraw-Hill, NewYork 1968), reprinted by TechBooks, Fairfax, VA.Bernard D. Cullity: Elements of X-Ray Diffraction, (Addison-Wesley, Read-ing, MA 1978).

Page 194: Experimental Inelastic Neutron Scattering - Caltech Center for

1. B. Fultz and J.M. Howe, Transmission Electron Microscopy and Diffractometryof Materials (Second Edition, Springer–Verlag, Heidelberg, 2002).

2. T. Egami and S.J.L. Billinge, Underneath the Bragg Peaks: Structural analysisof complex materials (Pergamon Press Elsevier, Oxford England, 2003).

3. M. Aivazis, W.A. Goddard, D. Meiron, M. Ortiz, J. Pool, and J. Shepherd,“A Virtual Test Facility for Simulating the Dynamic Response of Materials,”Computing in Science and Engineering 2, 42 (2000).

4. TeraGrid http://www.teragrid.org/5. Center for Advanced Computing Research http://www.cacr.caltech.edu/6. Python Programming Language http://www.python.org/7. M. Lutz and D. Ascher, Learning Python (O’Reilly, Sebastopol, CA 1999).8. Extensible Markup Language (XML) http://www.w3.org/XML/9. E.T. Ray, Learning XML (O’Reilly, Sebastopol, CA 2001).10. The MathWorks - MATLAB http://www.mathworks.com/products/matlab/11. Research Systems, Inc. - IDL Software http://www.rsinc.com/idl/index.asp12. WaveMetrics IGOR Pro http://www.wavemetrics.com/Products/IGORPro/IgorPro.html13. Extending and Embedding the Python Interpreter

http://www.python.org/doc/current/ext/ext.html14. Python/C API Reference Manual http://www.python.org/doc/current/api/api.html15. VASP Group, Theoretical Physics Department, Vienna

http://cms.mpi.univie.ac.at/vasp/16. M.C. Payne, M.P. Teter, D.C. Allan, T.A. Arias, J.D. Joannopoulos, “Itera-

tive minimization techniques for ab initio total-energy calculations - molecular-dynamics and conjugate gradients”, Rev. Mod. Phys. 64 1045-1097 (1992);CASTEP http://www.tcm.phy.cam.ac.uk/castep/

17. X. Gonze, J.M. Beuken, R. Caracas, F. Detraux, M. Fuchs, G.M. Rignanese,L. Sindic, M. Verstraete, G. Zerah, F. Jollet, M. Torrent, A. Roy, M. Mikami,P. Ghosez, J.Y. Raty, D.C. Allan, “First-principles computation of materialproperties: the ABINIT software project”, Comp. Mater. Sci. 25 478-492 (2002);ABINIT HOME PAGE http://www.abinit.org/

18. WIEN 2k http://www.wien2k.at/19. Gaussian.Com http://www.gaussian.com/20. F.P. Brooks, Jr., The Mythical Man-Month – Essays on Software Engineering,

Anniversary Edition, (Addison-Wesley, Reading, Mass 1995).21. M.A.G. Aivazis and B. Fultz, “DANSE – Distributed

Data Analysis for Neutron Scattering Experiments”http://arcs.cacr.caltech.edu:8000/arcs/uploads/1/danse.pdf

22. H. Abelson and G.J. Sussman, Structure and Interpretation of Computer Pro-grams (McGraw–Hill/MIT Press, Blacklick, Ohio, Cambridge, Mass., 1996).

23. C.A. Jones and F.L. Drake, Jr., Python & XML, (O’Reilly, Sebastopol, CA2002).

24. E. Gamma, R. Helm, R. Johnson, and J. Vlissides, Design Patterns (Addison–Wesley, Reading, Mass., 1995).

25. J. Lakos, Large Scale C++ Software Design, (Addison-Wesley, Boston, 1996).26. ViPEr: a visual programming environment for Python

http://www.scripps.edu/ stoffler/proj/ViPEr/viper.html27. IPNS - Computing - Web Project(ISAW)

http://www.pns.anl.gov/computing/isaw/28. H.M. Rietveld, “Line profiles of neutron powder diffraction peaks for structure

refinement,” Acta Cryst. 22, 151 (1967). H.M. Rietveld, “A profile refinementmethod for nuclear and magnetic structures.” J. Appl. Cryst. 2, 65 (1969).

29. McStas - A neutron ray-trace simulation package http://neutron.risoe.dk/30. W.-T. Lee and X.-L. Wang, “IDEAS, a general-purpose software for sim-

ulating neutron scattering instruments,” Neutron News, 13 30-34 (2002).www.sns.gov/ideas

Page 195: Experimental Inelastic Neutron Scattering - Caltech Center for

182

31. These classic books begin with structure: J.W. Christian Theory of Transfor-mations in Metals and Alloys (Pergamon, Oxford 1975). C. Kittel, Introductionto Solid State Physics (J. Wiley & Sons, New York 1971).

32. A. Le Bail, H. Duroy, J. L. Fourquet, “Ab initio Structure Determination ofLiSbWO6 by X-ray Powder Diffraction. ” mater. res. Bull. 23, 447-452 (1988).

33. G.S. Pawley “Unit Cell Refinement from Powder Diffraction Scans,” J. Appl.Cryst. 14, 357-361 (1981).

34. V. Gerold and J. Kern, “The Determination of Atomic Interaction Energies inSolid-Solutions from Short-Range Order Coefficients – An Inverse Monte-CarloMethod,” Acta Metall 35, 393-399 (1987).

35. A.K. Soper, “Empirical potential Monte Carlo simulation of fluid structure.”Chemical Phys. 202 295-306 (1996).

36. S.J.L. Billinge and M.G. Kanatzidis, “Beyond Crystallography: the study of dis-order, nanocrystallinity and crystallographically challenged materials,” Chem.Commun., in press.

37. R.B. Von Dreele, P.W. Stephens, G.D. Smith and R.H. Blessing, “The first pro-tein crystal structure determined from high-resolution X-ray powder diffractiondata: a variant of T3R3 human insulin-zinc complex produced by grinding,”Acta Crystallogr. D 56 1549-1553 (2000).

38. D. Dragoi, E. Ustundag, B. Clausen and M.A.M. Bourke, “Investigation of ther-mal residual stresses in tungsten-fiber/bulk metallic glass matrix composites,”Scripta Mater. 45, 245-252 (2001).

39. B. Clausen, S.Y. Lee, E. Ustundag, C.C. Aydiner, R.D. Conner and M.A.M.Bourke, “Compressive yielding of tungsten fiber reinforced bulk metallic glasscomposites,” Scripta Mater. 49, 123-128 (2003).

40. B. Clausen, T. Lorentzen and T. Leffers, “Self-consistent modeling of the plasticdeformation of FCC polycrystals and its implications for diffraction measure-ments of internal stresses,” Acta Mater. 46, 3087-3098 (1998).

41. R.C. Rogan, E. Ustundag, B. Clausen and M.R. Daymond, “Texture and strainanalysis of the ferroelastic behavior of Pb(Zr,Ti)O3 by in situ neutron diffrac-tion,” J. Appl. Phys. 93, 4104-4111 (2003).

42. Y.D. Wang, H. Tian, A.D. Stoica, X.-L.Wang, P.K. Liaw, and J.W. Richardson,“Evidence on the Development of Large Grain-Orientation-Dependent ResidualStresses in a Cyclically-Deformed Alloy,” Nature Materials, 2, 103-106 (2003).

43. E. Ustundag, B. Clausen and M.A.M. Bourke, “Neutron diffraction study ofthe reduction of NiAl2O4,” Appl. Phys. Lett. 76, 694-696 (2000).

44. M.A.M. Bourke, D.C. Dunand and E. Ustundag, “SMARTS – a spectrometerfor strain measurement in engineering materials,” Appl. Phys. A 74, S1707-S1709 (2002).

45. I.C. Noyan and J.B. Cohen, Residual Stress: Measurement by Diffraction andInterpretation, Springer–Verlag, New York (1987).

46. D. Chidambarrao, Y.C. Song and I.C. Noyan, “Numerical simulation of the X-ray stress analysis technique in polycrystalline materials under elastic loading,”Metall. and Mater. Trans. A 28, 2515-2525 (1997).

47. X.-L. Wang, Y.D. Wang, and J.W. Richardson, “Experimental Error due toDisplacement of Sample in Time-of-flight Diffractometry,” J. Appl. Cryst. 35,533-537 (2002).

48. D.C. Montgomery, Design and Analysis of Experiments, 5th ed., John Wiley& Sons, New York (2001).

49. P.J. Withers, M.R. Daymond and M.W. Johnson, “The precision of diffractionpeak location,” J. Appl. Cryst. 34, 737-743 (2001).

50. ABAQUS User Manual, version 6.3, Hibbitt, Karlsson and Sorensen, Inc., 2002.51. P.R. Dawson, “Computational crystal plasticity,” Int. J. Solids and Structures

37, 115-130 (2000).52. A. Guinier, X-ray Diffraction in Crystals, imperfect Crystals, and Amorphous

Bodies (Dover, Mineola, NY 1994).

Page 196: Experimental Inelastic Neutron Scattering - Caltech Center for

183

53. P.-G. de Gennes Scaling Concepts in Polymer Physics (Cornell University Press,Ithaca, NY, 1979).

54. L. Liebler, “Theory of Microphase Separation in Block Co-Polymers,” Macro-molecules 13, 1602-1617 (1980).

55. E. W. Cochran, D.C. Morse, and F.S. Bates “Design of ABC triblock copoly-mers near the ODT with the random phase approximation,” Macromolecules36, 782-792 (2003).

56. D.I. Svergun and M.H.J Koch “Small-angle scattering studies of biologicalmacromolecules in solution,” Reports on Progress in Physics 66 1735-1782(2003).

57. M.E. Wall, S.C. gallagher, C.S. tung, and J. Trewhella, “A molecular model ofthe troponin C/troponin I interaction using constraints from X-ray crystallog-raphy, NMR neutron scattering, and cross-linking,” Biophysical Journal 78(1)366A (2000).

58. P. Chacon, F. Moran, J.F. Diaz, E. Pantos, and J.M. Andreu, “Low-resolutionstructures of proteins in solution retrieved from X-ray scattering with a geneticalgorithm,” Biophysical Journal 74(6) 2760-2775 (1998).

59. G.W. Lynn, M.V. Buchanan, P.D. Butler, L.J. Magid, and G.D. Wignall, “Newhigh-flux small-angle neutron scattering instrumentation and the center forstructural and molecular biology at Oak Ridge National Laboratory,” J. Appl.Cryst. 36 829-831 (2003).

60. S. Krueger, “Neutron reflection from interfaces with biological and biomimeticmaterials,” Current Opinion in Colloid & Interface Science 6, 111 (2001).

61. M.R. Fitzsimmons, S.D. Bader, J.A. Borchers, G.P. Felcher, J.K. Fur-dyna, A. Hoffmann, J.B. Kortright, Ivan K. Schuller, T.C. Schulthess,S.K. Sinha, M.F. Toney, D. Weller, and S. Wolf, “Neutron scatter-ing studies of nanomagnetism and artificially structured materials,”Journal of Magnetism and Magnetic Materials, in press. Preprint athttp://www.ncnr.nist.gov/programs/reflect/rp/magnetism/nanomag 21july.pdf.

62. S.K. Sinha, E.B. Sirota, S. Garoff, and H.B. Stanley, “X-ray and neutron scat-tering from rough surfaces,” Phys. Rev. B 38, 2297 (1988); R. Pynn, Neutronscattering by rough surfaces at grazing incidence. Phys. Rev. B 45, 602 (1992).

63. B.P. Toperverg, “Specular reflection and off-specular scattering of polarizedneutrons,” Physica B 297, 160 (2001). B. Toperverg, O. Nikonov, V. Lauter-Pasyuk, and H.J. Lauter, “Towards 3D polarization analysis in neutron re-flectometry,” Physica B 297, 169 (2001). A. Ruhm, B. P. Toperverg, and H.Dosch, “Supermatrix approach to polarized neutron reflectivity from arbitraryspin structures,” Phys. Rev. B 60, 16073 (1999). V. Lauter-Pasyuk, H.J. Lauter,B.P. Toperverg, L. Romashev and V. Ustinov, “Transverse and lateral struc-ture of the spin-flop phase in Fe/Cr antiferromagnetic superlattices,” Phys. Rev.Lett. 89, 167203 (2002).

64. For example, Bede REFS 4.0 http://www.bede.co.uk/overview.php?overviewID=1015939212.6355565. J.F. Ankner and C.F. Majkrzak, “Subsurface profile refinement for neutron

specular reflectivity,” Neutron Optical Devices and Appl. 1738, 260 (1992).66. N.F. Berk and C.F. Majkrzak, “Using parametric B splines to fit specular

reflectvities,” Phys. Rev. B 51, 11296 (1995).67. S.W. Lovesey, Theory of neutron scattering from condensed matter Vol. 1

(Clarendon Press, Oxford, 1984).68. G. Shirane, S.M. Shapiro and J.M. Tranquada, Neutron scattering with a triple

axis spectrometer (Cambridge Univ. Press, Cambridge, 2002).69. G.L. Squires, Introduction to the theory of thermal neutron scattering (Cam-

bridge Univ. Press, Cambridge, 1978), reprinted by Dover, Mineola, NY, 1996.70. K. Skold, D.L. Price, “Neutron scattering,” in Methods of Experimental Physics

Vol. 23, R. Celotta and J. Levine, Eds. (Academic Press, Orlando, 1986).

Page 197: Experimental Inelastic Neutron Scattering - Caltech Center for

184

71. A.F. Yue, I. Halevy, A. Papandrew, P.D. Bogdanoff, B. Fultz, W. Sturhahn,E.E. Alp, and T.S. Toellner, “Mass Effects on Optical Phonons in L12-OrderedPt573 Fe and Pd57

3 Fe,” Hyperfine Interact. 141, 249 (2002).72. P. D. Bogdanoff, T. Swan–Wood, and B. Fultz, “The phonon entropy of alloying

and ordering of Cu-Au,” Phys. Rev. B 68 (1): art. no. 014301 July 1, 2003.Peter D. Bogdanoff, “The Phonon Entropy of Metals and Alloys: The effects ofthermal and chemical disorder” Ph.D. Thesis California Institute of Technology,Nov. 20, 2001.

73. G.J. Kearley, “A Profile-Refinement Approach for Normal-Coordinate Analysesof Inelastic Neutron-Scattering Spectra,” J. Chem. Soc.-Faraday Trans. II 8241, (1986).

74. S. Kasuriya, S. Namuangruk, P. Treesukol, M. Tirtowidjojo, and J. Limtrakul,“Adsorption of Ethylene, Benzene, and Ethylbenzene over Faujasite ZeolitesInvestigated by the ONIOM Method,” J. Catalysis 219 320 (2003).

75. H.V. Brand, L.A. Curtiss, L.E. Iton, F. R. Trouw and T.O. Brun, “Theoreticaland Inelastic Neutron-Scattering Studies of Tetraethylammonium Cation as aMolecular Sieve Template,” J. Phys. Chem. 98 1293 (1994).

76. B.S. Hudson, J.S. Tse, M.Z. Zgierski, S.F. Parker, D.A. Braden, and C. Mid-dleton, “The Inelastic Incoherent Neutron Spectrum of Crystalline Oxamide:Experiment and Simulation of a Solid,” Chem. Phys. 261 249 (2000).

77. B. Fultz, T. Kelley, J.-D. Lee, O. Delaire, T. Swan–Wood and M. Aivazis, Exper-imental Inelastic Neutron Scattering http://arcs.caltech.edu:8000/arcs/1.

78. T.H. Dunning, R.J. Harrison, D. Feller, and S.S. Xantheas, “Promise andchallenge of high-performance computing, with examples from molecular mod-elling”, Phil. Trans. R. Soc. London A 360, 1079 (2002).

79. Scientific Computing and Imaging Institutehttp://software.sci.utah.edu/scirun.html

80. NeXus Data Format Home Page http://www.neutron.anl.gov/nexus/

Page 198: Experimental Inelastic Neutron Scattering - Caltech Center for

A. Appendix

A.1 Convolutions and Correlations

A.1.1 Convolution Theorem

It is easiest to explain convolutions is in terms of a broadening of a sharp peakcaused by making a measurement with a blurry instrument. The instrumentalbroadening function is f(k).1 We seek the true specimen diffraction profileg(k). What we actually measure with our diffractometer is the convolutionof f(k) and g(k), denoted h(K) (where K is the shift of the detector acrossthe diffraction intensity). Deconvolution will require the Fourier transformsof f(k), g(k), h(K):

f(k) =∑n

F (n) ei2πnk/l equipment, (A.1)

g(k) =∑n′

G(n′) ei2πn′k/l specimen, (A.2)

h(K) =∑n′′

H(n′′) ei2πn′′K/l measurement. (A.3)

Note that l has units of inverse distance, so n/l is a real space variable. Therange in k of the Fourier series is the interval −l/2 to +l/2 , which includesall features of a diffraction peak.2 The convolution of f and g (??) is:

h(K) =

∞∫−∞

f(K − k) g(k) dk . (A.4)

We must choose an interval so that that f and g vanish outside the range± l/2, so we can change the limits of integration from ± ∞ to ± l/2. Sub-stitute (A.1) and (A.2) into (A.4):

h(K) =

l/2∫−l/2

∑n

F (n) ei2πn(K−k)/l∑n′

G(n′) ei2πn′k/l dk . (A.5)

1 Measurements are typically in scattering angle, which is interpretable as a k-space variable.

2 We don’t care about f(k) and g(k) outside this interval, but with (A.1)–(A.3)these Fourier transforms repeat themselves with a period of l. We confine our-selves to one period, and require that f and g vanish at its ends.

Page 199: Experimental Inelastic Neutron Scattering - Caltech Center for

186 A. Appendix

We rearrange summations over the independent variables n and n′, and re-move from the integral all factors independent of k:

h(K) =∑n′

∑n

G(n′)F (n) ei2πnK/l

l/2∫−l/2

ei2π(n′−n)k/l dk . (A.6)

Now we employ the orthogonality condition3:l/2∫−l/2

ei2π(n′−n)k/ldk =l if n′ = n

0 if n′ = n

. (A.7)

With the orthogonality condition of (A.7), the double sum in (A.6) is reducedto a single sum:

h(K) = l∑n

G(n)F (n) ei2πnK/l . (A.8)

Compare (A.8) to the definition for h(K) in (A.3). We see that that theFourier coefficients H(n′′) are proportional to the product of G(n) and F (n):

l G(n)F (n) = H(n) . (A.9)

By comparing (A.4) and (A.9), we see that a convolution in k-space isequivalent to a multiplication in real space (with variable n/l). The converseis also true; a convolution in real space is equivalent to a multiplication ink-space. This important result is the convolution theorem.

A.1.2 Deconvolutions

Equation (A.9) shows how to perform the deconvolution of f(k) from h(K);perform a division in n-space. Specifically, when we have the full sets ofFourier coefficients F (n) and H(n), we perform a division in n-space foreach Fourier coefficient:

G(n) =1l

H(n)F (n)

. (A.10)

We obtain each F (n′) by multiplying both sides of (A.1) by exp(−i2πn′k/l)and integrating over k:

l/2∫−l/2

f(k) e−i2πn′k/ldk =∑n

F (n)

l/2∫−l/2

ei2π(n−n′)k/ldk . (A.11)

3 Verified by writing the exponential as cos(2π(n′ − n)k/l) + i sin(2π(n′ − n)k/l).The sine integration vanishes by symmetry. The cosine integration gives l[2π(n′−n)]−1[sin(π(n′ − n))− sin(π(n′ − n))], which = 0 when n′ − n = 0. In the casewhen n′ − n = 0, the integrand in (A.7) equals 1, so the integration gives l.

Page 200: Experimental Inelastic Neutron Scattering - Caltech Center for

A.2 Fourier Transform of Screened Coulomb Potential 187

The orthogonality relationship of (A.7) causes the right-hand-side of (A.11)to equal zero unless n = n′. Equation (A.11) therefore becomes:

1l

l/2∫−l/2

f(k) e−i2πn′k/ldk = F (n′) . (A.12)

The Fourier coefficients H(n) are obtained the same way. The simple divisionof Fourier coefficients in (A.10) then provides the set of Fourier coefficients forthe true specimen profile, G(n). If we then use (A.2) to take the Fouriertransform of the G(n) from (A.10), we obtain g(k), the true specimendiffraction profile.

A.2 Fourier Transform of Screened Coulomb Potential

In this subsection we calculate the Fourier transform of a “screened Coulomb”potential, a result that is useful in calculations of form factors of atoms forexample. This screened Coulomb potential, V(r), is:

V (r) = −Ze2

re−r/r0 . (A.13)

The exponential factor accounts for the screening of the nuclear charge by theatomic electrons, and r0 is an effective Bohr radius for the atom. Interestingly,the exponential decay also facilitates the mathematics of working with apotential that is otherwise strong at very large distances.

We now use the first Born approximation, (2.42), to calculate the atomicscattering factor, f (∆k), as the Fourier transform of V (r) :

fel(∆k) = − m

2π2

∫all space

e−i∆k·r V(r) d3r . (A.14)

Substituting the potential (A.13) into (A.14):

fel(∆k) =mZe2

2π2

∫all space

e−i∆k·r e−r/r0

rd3r . (A.15)

The integral, I (∆k, r0), in (A.15) occurs in other contexts, so we pauseto solve it.

I (∆k, r0) ≡∫

all space

e−i∆k·r e−r/r0

rd3r , (A.16)

which is the 3-dimensional Fourier transform of the screened Coulomb po-tential (A.13). It is natural to use spherical coordinates:

Page 201: Experimental Inelastic Neutron Scattering - Caltech Center for

188 A. Appendix

I (∆k, r0) =

∞∫r=0

π∫θ=0

2π∫φ=0

e−i∆k·r e−r/r0

rr2 sinθ dθ dφdr . (A.17)

The trick for working with the exponential in (A.17), e−i∆k·r, is to alignthe vector ∆k along the z-axis so that ∆k · r = ∆kz. Also, since z = r cosθ:

dz = −r sinθ dθ . (A.18)

The limits of integration are changed as:

θ = 0 =⇒ z = r , (A.19)θ = π =⇒ z = −r . (A.20)

With the substitution of (A.18)–(A.20) into (A.17):

I (∆k, r0) =

∞∫r=0

−r∫z=r

2π∫φ=0

e−i∆kze−r/r0dφ(−dz)dr , (A.21)

I (∆k, r0) = 2π

∞∫r=0

r∫z=−r

e−i∆kze−r/r0dz dr . (A.22)

Writing the exponential as e−i∆kz = cos(∆kz)− i sin(∆kz), the z-integrationof the sine function vanishes by symmetry in the interval −r to +r, and thecosine integral is:

r∫z=−r

cos(∆kz) dz =+2∆k

sin(∆kr) , (A.23)

which does not depend on the direction ∆k. Using (A.23) for the z-integration in (A.22), we obtain:

I (∆k, r0) =4π∆k

∞∫r=0

sin(∆kr) e−r/r0dr . (A.24)

Equation (A.24) is the Fourier transform of a decaying exponential.This integral can be solved by twice integrating by parts.4 The result isa Lorentzian function:

∞∫r=0

sin (∆kr) e−r/r0dr =∆k

∆k2 + 1r20

. (A.25)

4 Defining U ≡ e−r/r0 and dV ≡ sin(∆kr) dr, we integrate by parts:∫UdV = UV −

∫V dU . The integral on the right hand side is evaluated as:

(∆kr0)−1 ∫∞

r=0cos(∆kr) e−r/r0dr, which we integrate by parts again to obtain:

− (∆kr0)−2 ∫∞

r=0sin(∆kr) e−r/r0dr. This result can be added to the

∫UdV on

the left hand side to obtain (A.25).

Page 202: Experimental Inelastic Neutron Scattering - Caltech Center for

A.2 Fourier Transform of Screened Coulomb Potential 189

We substitute the result (A.25) into (A.24), completing the evaluation of(A.16):

I (∆k, r0) =∫

all space

e−i∆k·r e−r/r0

rd3r =

4π∆k2 + 1

r20

. (A.26)

For later convenience, we now obtain a related result. The use of an ex-ponential screening factor to perform a Fourier transform of the Coulombpotential is a useful mathematical trick. By letting r0 →∞, we suppress thescreening of the Coulomb potential, so e−r/r0 = 1 in (A.13). The Fouriertransform of this bare Coulomb potential, with its mathematical form of 1/r,is obtained easily from (A.26):∫

all space

e−i∆k·r 1r

d3r =4π∆k2

. (A.27)

Page 203: Experimental Inelastic Neutron Scattering - Caltech Center for

190 A. Appendix

A.3 Fundamental and Derived Constants

Fundamental Constants

= 1.0546× 10−27 erg·sec= 6.5821× 10−16 eV·seckB = 1.3807× 10−23 J/(atom·K) = 8.6174× 10−5 eV/(atom·K)R = 0.00198 kcal/(mole·K) (gas constant)c = 2.998× 1010 cm/sec (speed of light in vacuum)me = 0.91094× 10−27 g = 0.5110 MeV·c−2 (electron mass)mn = 1.6749× 10−24 g = 939.55 MeV·c−2 (neutron mass)NA = 6.02214× 1023 atoms/mole (Avogadro constant)e = 4.80× 10−10 esu = 1.6022× 10−19 coulombµ0 = 1.26× 10−6 henry/mε0 = 8.85× 10−12 farad/m

a0 = 2/(mee2) = 5.292× 10−9 cm (Bohr radius)

e2/(mec2) = 2.81794× 10−13 cm (classical electron radius)

e2/(2a0) = R (Rydberg) = 13.606 eV (K-shell energy of hydrogen)e/(2mec) = 0.9274× 10−20 erg/oersted (Bohr magneton)

2/(2me) = 3.813× 10−16 eV s cm−2

Definitions

1 becquerel (B) = 1 disintegration/second1 Curie = 3.7× 1010 disintegrations/second

radiation dose:1 roentgen (R) = 0.000258 coulomb/kilogramGray (Gy) = 1 J/kG

Sievert (Sv) is a unit of “radiation dose equivalent” (meaning that doses ofradiation with equal numbers of Sieverts have similar biological effects, evenwhen the types of radiation are different). It includes a dimensionless qualityfactor, Q (Q∼1 for x-rays, 10 for neutrons, and 20 for α-particles), and energydistribution factor, N. The dose in Sv for an energy deposition of D in Grays[J/kG] is:

Sv = Q×N×D [J/kG]Rad equivalent man (rem) is a unit of radiation dose equivalent approximatelyequal to 0.01 Sv for hard x-rays.

Page 204: Experimental Inelastic Neutron Scattering - Caltech Center for

A.3 Fundamental and Derived Constants 191

1 joule = 1 J = 1 W·s = 1 N·m = 1 kg·m2·s−2

1 joule = 107 erg1 newton = 1 N = 1 kg·m·s−2

1 dyne = 1 g·cm·s−2

1 erg = 1 dyne·cm = 1 g·cm2·s−2

1 Pascal = 1 Pa = 1 N·m−2

1 coulomb = 1 C = 1 A·s1 ampere = 1 A = 1 C/s1 volt = 1 V = 1 W·A−1 = 1 m2·kg·A−1·s−3

1 ohm = 1 Ω = 1 V·A−1 = 1 m2·kg·A−2·s−3

1 farad = 1 F = 1 C·V−1 = 1 m−2·kg−1·A2·s41 henry = 1 H = 1 Wb·A−1 = 1 m2·kg·A−2·s−2

1 tesla = 1 T = 10, 000 gauss = 1 Wb·m−2 = 1 V·s·m−2 = 1 kg·s−2·A−1

Conversion Factors

1 A = 0.1 nm = 10−4 µm = 10−10 m1 b (barn) = 10−24 cm2

1 eV = 1.6045× 10−12 erg1 eV/atom = 23.0605 kcal/mole = 96.4853 kJ/mole1 cal = 4.1840 J1 bar= 105 Pa1 torr = 1 T = 133 Pa1 kG = 5.6096× 1029 MeV·c−2

Useful Facts

energy of 1 A photon = 12.3984 keVhν for 1012 Hz = 4.13567 meV1 meV = 8.0655 cm−1

temperature associated with 1 eV = 11, 600 Klattice parameter of Si (in vacuum at 22.5C) = 5.431021 A

Neutron Wavelengths, Energies, Velocities

En = 81.81λ−2 (energy-wavelength relation for neutrons [meV, A])λn = 3955.4/vn (wavelength-velocity relation for neutrons [A, m/s])En = 5.2276×10−6 v2

n (energy-velocity relation for neutrons [meV, m/s])

Page 205: Experimental Inelastic Neutron Scattering - Caltech Center for

192 A. Appendix

Some X-Ray Wavelengths [A]Element Kα Kα1 Kα2 Kβ1Cr 2.29092 2.28962 2.29351 2.08480Co 1.79021 1.78896 1.79278 1.62075Cu 1.54178 1.54052 1.54433 1.39217Mo 0.71069 0.70926 0.71354 0.632253Ag 0.56083 0.55936 0.56377 0.49701

Relativistic Electron Wavelengths

For an electron of energy E [keV] and wavelength λ [A]:

λ = h[2meeE

(1 +

eE

2mec2

)]−1/2

=0.3877

E1/2 (1 + 0.9788× 10−3E)1/2

kinetic energy≡ T = 12mev

2 = 12E

1+γγ2

Page 206: Experimental Inelastic Neutron Scattering - Caltech Center for

Index

absorption, 133Absorption, 136abstraction, 8anharmonic, 91annealing (simulated), 116annihilation, 35, 68Appendicies – tables and charts, 185architecture, 158ARCS, 127atom– as point, 37, 53atomic displacement disorder, 44atomic form factor– screened Coulomb potential, 187autocorrelation function, 38autocorrelation functions, 60Avogadro constant, 190

background, 70, 131, 135bar, 191barn, 191basis functions– closure, 66becquerel, 190Beowulf cluster, 163binwidth, 132Biot-Savart law, 78Bohr magneton, 190Born approximation, 28– first, 28– higher order, 30– second, 30Born–von Karman model, 157Bose–Einstein statistics, 51Bose-Einstein distribution, 35Bose-Einstein factor, 92Brillouin zone, 89browser, 164

C, 165C++, 8, 165calorie, 191Caltech, 163cerium– phonons, 144chemical disorder, 44classical electron radius, 79, 190

classical scattering, 76coherent elastic scattering, 20coherent inelastic scattering, 20, 30coherent scattering, 18– delicate, spectacular and confusing,

24– length, 22– phases, 25commutation, 72compatibility relations, 101complete the square, 75component, 159, 160– core, 160– ports, 160– properties, 160components– connections, 162condensed matter, 87constants, 190constructive interference, 18conversion factors, 191convolution, 140– theorem, 186coordinates– neutron and crystal, 64correction– absorption, 136– multiphonon– – coherent, 146– multiple scattering, 137Cp, 95creation, 35, 68creation operator– spin wave, 108cross-section, 35crystal– periodicity, 70Curie, 190Curie temperature, 108Curie–Weiss law, 110CV , 95

damping, 59data arrays, 130data flow paradigm, 159data histograms, 130data processing, 127

Page 207: Experimental Inelastic Neutron Scattering - Caltech Center for

194 Index

data reduction, 127, 155, 159data streams, 160, 161data structures, 130Debye model, 50Debye–Waller factor, 47, 74, 138– calculation of, 50– concept, 49– conventions, 51degeneracy– time-reversal, 103dephasing time, 60derivation, 8detailed balance, 67detector– efficiency, 133– pixel, 134– timing, 131– tubes, 128differential scattering cross-section, 23diffuse scattering– thermal, 50Dirac δ-function, 37disordered excitations, 58, 63disordered systems, 157dispersions– compatibility relations, 101dispersive excitations, 56, 63displacement disorder– dynamic, 44– static, 44Dulong-Petit limit, 94dynamical matrix– symmetry operations on, 98dynamics, 87

eigenvectors– of dynamical matrix, 90elastic scattering, 20, 67electron mass, 190electron wavelengths, table of, 192electrons– strongly correlated, 114elementary excitation, 55encapsulation, 8energy, 18energy conservation, 34equations of motion, 89equilibration, 119equilibrium– in simulations, 116errors, 129excitations, balance68– disordered, 58, 63– dispersive, 56, 63– local, 56, 62experimental units, 127extensibility, 164

Fermi’s golden rule, 64ferromagnetic excitations, 109

flux (in scattering), 22force constants, 87force-constant matrix, 88form factor– neutron, 29FORTRAN, 165Fourier transform– bare Coulomb, 189– decaying exponential, 188– deconvolution, 145– Lorentzian, 188– scattered wave, 29free energy, 92Friedel’s law, 40

Gaussian– normalized, 73Gaussian thermal spread, 73, 75Gray, 190Green’s function, 27ground state, 116group theory, 97– k-space, 97– Great Orthogonality Theorem, 101– implementation in DANSE, 106– lattice dynamics, 97– projection operators, 100– quantum mechanics, 97, 100Gruneisen parameter, 93

harmonic, 91harmonic approximation, 88harmonic oscillator– partition function, 95heat, 78heat capacity, 94– high temperature, 96heavy fermions, 113– T ∗, 113Heisenberg model, 108Heisenberg picture, 71high Tc superconductors, 114– energy scales, 114– hole doping, 114high-temperature limit, 139histograms, 160Hubbard Hamiltonian, 114hybrid– Monte Carlo, 119

impulse approximation, 74, 149incident plane wave, 26incoherence, 18incoherent approximation, 78incoherent elastic scattering, 20incoherent inelastic scattering, 20incoherent scattering, 19inelastic scattering, 20interitance, 8

Page 208: Experimental Inelastic Neutron Scattering - Caltech Center for

Index 195

inversion symmetry, 57Ising model, 108isotropic scattering, 23

kinematical scattering theory, 36kinematics, 141Kondo– effect, 113– lattice model, 112– temperature, 113

lattice dynamics, 52, 88LDA, 116Lenz’s law, 107Lipmann-Schwinger equation, 85local excitations, 56, 62

magnetic field– applied, 81magnetic form factor, 78magnetic impurities, 112magnetic multilayers, 113magnetic scattering, 78, 81– above TC, 111– mathematical tricks, 79– orbital contribution, 78, 107– polarization averaging, 82– spin combined with orbital contribu-

tion, 80– spin contribution, 78, 107– time-reversal symmetry, 103magnetic scattering amplitude, 78magnetism, 106– classical, 106magnetization– temperature dependence, 112magnon, 108Maradudin, A.R. and Vosko, S.H., 96Maradudin, et al., 87Markovian process, 116materials, 87mean field approximation, 108meta-data, 162Metropolis algorithm, 116modeling of data, 156molecular dynamics, 158momentum conservation, 34momentum transformation, 135Monte Carlo, 158– hybrid, 119multiphonon– expansion, 137Multiphonon.py, 147multiphonon excitation, 69, 137multiphonon expansion, 76, 147multiple scattering, 137multiplier representation, 99

neutron– mass, 190

– wavelength, 190neutron scattering– Born approximation, 25– Green’s functions, 27neutron wave (probability interpreta-

tion), 25neutron weighting, 146, 157Ni-Fe, 81nickel– phonons, 141normalize (by flux), 131nuclear scattering– general, 64nuisance, 135

object-oriented programming, 8operators– exponential, 71orthogonality condition, 186overrelaxation, 118

paramagnetism, 157Patterson function– atomic displacement disorder, 45– average crystal, 44– definition of, 37– deviation crystal, 44– graphical construction, 40– homogeneous disorder, 42– perfect crystal, 41– random displacements, 45– thermal spread, 49periodic boundaries, 89Pharos, 127phase, 18– velocity, 19phase problem, 40phase relationships, 18phonon, 33, 47– branches, 36– quantization, 33– scattering, 20– thermodynamics, 91phonon DOS, 90phonon entropy, 95phonon scattering, 33phonon softening, 94Planck’s constant, 190plug– shameless, 137polarizations, 90Potts model, 108precession, 119process space, 161programming– elegance and discipline, 8– object-oriented, 8projection operators, 100Python, 7, 162, 165

Page 209: Experimental Inelastic Neutron Scattering - Caltech Center for

196 Index

– Monty, 7– www.python.org, 7

quantum mechanics– subtlety, 70quasiharmonic, 91

rebin, 155rebinning, 130, 134, 159recoil energy, 139relativistic correction, 192RKKY interaction, 113roentgen, 190Rydberg, 190

SANS, 81scattering– differential cross-section, 23– high energy, 74– total cross-section, 23scattering law, 25scattering potential– time-varying, 31Schrodinger equation– Green’s function, 27scripts, 163Seitz space group, 96self-force constants, 88Sievert, 190signal processing analogy, 158simulation of experiment, 157simulations– dynamics, 115small displacements, 87snapshot in space, 62snapshot in time, 60space group, 96space-time correlations, 52spin, 103spin dynamics, 115spin fluctuations– magnetic scattering, 111spin wave, 108spin wave scattering, 20spin waves– itinerant, 111spins– itinerant, 109– localized, 107spinwaves, 157S(Q, E), 155Squires, 79Squires, G., 72Stoner condition, 110strongly correlated electrons, 114structure, 87superconductors– t− J model, 114

– bismuth, 115– cuprates, 115– energy gap, 115– high Tc, 114– spin flip model, 115symbols, big table of, 1–4symbols, table of, 98symmetry– broken, 116symmorphic, 96

tables, 160thermal averages, 72thermal diffuse scattering, 47thermal energy, 139thermal expansion, 94thermal vibrations– diffuse scattering, 44thermodynamic average, 67thermodynamics– detailed balance, 68– phonon, 91time dependence– quantum mechanics, 71time-reversal, 103torr, 191total scattering cross-section, 23transition metals– itinerant of local spins?, 112– magnetism, 110triple-axis spectrometer, 138

unit cell, 87

Van Hove function, 52– definition of, 53– graphical construction, 57, 59, 61virtual functions, 8

Warren, J.L., 96wave amplitudes, 19wave crests, 19wavelengths– electron, table of, 192– x-ray, table of, 192wavelet (defined), 18web portal, 163weighting, neutron, 157

x-ray– scattering from one electron, 23– wavelengths, table of, 192XML-RPC, 164XY model, 108

zero-point vibrations– diffuse scattering from, 51