#LyX 2.0 created this file. For more info see http://www.lyx.org/
\lyxformat 413
\begin_document
\begin_header
\textclass memoir
\use_default_options false
\maintain_unincluded_children false
\language english
\language_package default
\inputencoding auto
\fontencoding global
\font_roman palatino
\font_sans lmss
\font_typewriter luximono
\font_default_family rmdefault
\use_non_tex_fonts false
\font_sc false
\font_osf false
\font_sf_scale 100
\font_tt_scale 100

\graphics default
\default_output_format default
\output_sync 1
\bibtex_command default
\index_command default
\paperfontsize default
\spacing single
\use_hyperref false
\papersize default
\use_geometry false
\use_amsmath 1
\use_esint 1
\use_mhchem 1
\use_mathdots 1
\cite_engine natbib_numerical
\use_bibtopic true
\use_indices false
\paperorientation portrait
\suppress_date false
\use_refstyle 1
\index Index
\shortcut idx
\color #008000
\end_index
\secnumdepth 3
\tocdepth 3
\paragraph_separation indent
\paragraph_indentation default
\quotes_language english
\papercolumns 1
\papersides 1
\paperpagestyle default
\tracking_changes false
\output_changes false
\html_math_output 0
\html_css_as_file 0
\html_be_strict false
\end_header

\begin_body

\begin_layout Chapter
Dipole-field simulation
\begin_inset CommandInset label
LatexCommand label
name "chap:dipole"

\end_inset


\end_layout

\begin_layout Standard
The criticism most often levelled at 
\begin_inset ERT
status collapsed

\begin_layout Plain Layout


\backslash
muSR
\backslash
 
\end_layout

\end_inset

 is that the experimenter usually does not know the muon site precisely.
 The electrostatic potential inside crystals is difficult to evaluate and,
 even if it were known, the muon inevitably alters this charge distribution
 wherever it comes to rest, making the problem harder still.
 One possible solution in ordered magnetic materials is to reverse-engineer
 the problem by working out the magnetic fields inside the crystal, and
 looking to see where these match those observed experimentally.
 The parameters extracted empirically are the muon precession frequencies,
 which are directly proportional to the local field at the muon sites.
 If this local field is calculated at all sites in the crystal, the places
 where the values are close to those actually observed give the locations
 where muons might stop.
\end_layout

\begin_layout Standard
In this chapter, dipole field simulation is taken beyond this traditional
 application of the technique.
 The observed frequency is not the only known parameter in this problem:
 reasonable assumptions can be made about the kinds of sites where a muon
 might stop, the sizes of the magnetic moments, or reasonable magnetic structure
s.
 Given bounds on a subset of these, the limits on the others can be extracted
 using Bayes' theorem.
\end_layout

\begin_layout Standard
First, dipole fields for single dipoles and then arrays are explored in
 
\begin_inset CommandInset ref
LatexCommand formatted
reference "sec:dipole-fields"

\end_inset

; we will then examine Ewald summation as a method for rapidly calculating
 potentials and fields in infinite crystals in 
\begin_inset CommandInset ref
LatexCommand formatted
reference "sub:ewald-summation"

\end_inset

, followed by the alternative of using a Lorentz sphere of dipoles in 
\begin_inset CommandInset ref
LatexCommand formatted
reference "sec:lorentz-spheres"

\end_inset

; then, non-dipolar contributions to the field at the muon site are examined
 in 
\begin_inset CommandInset ref
LatexCommand formatted
reference "sec:other-fields"

\end_inset

.
 These tools can then be used to perform dipole-field simulations, which
 are explained in their traditional form in 
\begin_inset CommandInset ref
LatexCommand formatted
reference "sec:dipole-analysis"

\end_inset

, and with our novel Bayesian approach in 
\begin_inset CommandInset ref
LatexCommand formatted
reference "sec:dipole-bayes"

\end_inset

.
 A brief overview of 
\begin_inset ERT
status collapsed

\begin_layout Plain Layout


\backslash
mmcalc 
\end_layout

\end_inset

, my software for evaluating dipole fields, is given in 
\begin_inset CommandInset ref
LatexCommand formatted
reference "sec:mmcalc"

\end_inset

, followed finally by suggestions for future work in 
\begin_inset CommandInset ref
LatexCommand formatted
reference "sec:dipole-future"

\end_inset

.
 Supplementary to this chapter, details of the mathematics behind Ewald
 summation are given in 
\begin_inset CommandInset ref
LatexCommand formatted
reference "chap:ewald-summation"

\end_inset

, and the magnetic propagation vector formalism is introduced in 
\begin_inset CommandInset ref
LatexCommand formatted
reference "chap:magnetic-propagation-vector"

\end_inset

, providing a very general way to describe periodic magnetic structures.
\end_layout

\begin_layout Section
Dipole fields
\begin_inset CommandInset label
LatexCommand label
name "sec:dipole-fields"

\end_inset


\end_layout

\begin_layout Subsection
The field from a single dipole
\end_layout

\begin_layout Standard
\begin_inset Float figure
wide false
sideways false
status open

\begin_layout Plain Layout
\align center
\begin_inset Graphics
	filename figures/dipole/single-dipole/single-dipole-field.eps
	width 8cm

\end_inset


\end_layout

\begin_layout Plain Layout
\begin_inset Caption

\begin_layout Plain Layout
The field of a single ideal dipole.
 Field lines run from north (the upper, red pole) to south (the lower, blue
 one).
\begin_inset CommandInset label
LatexCommand label
name "fig:dipole-field"

\end_inset


\end_layout

\end_inset


\end_layout

\end_inset

Gauss's law famously states that it is not possible for single magnetic
 monopoles to exist independently:
\begin_inset Formula 
\begin{equation}
\nabla\cdot\bm{B}=0.
\end{equation}

\end_inset

Though there are no free magnetic charges, magnetic dipoles proliferate
 throughout nature.
 They can be envisaged as tiny loops of current or as pairs of magnetic
 charges with infinitesimal separation.
 The field around a magnetic dipole runs from its north pole to its south,
 in a configuration similar to the familiar pattern observed when iron filings
 are sprinkled in the vicinity of a bar magnet.
 The field of an ideal dipole is shown in 
\begin_inset CommandInset ref
LatexCommand formatted
reference "fig:dipole-field"

\end_inset

.
 
\end_layout

\begin_layout Standard
The dipole field can be expressed in vector notation,
\begin_inset Formula 
\begin{equation}
\bm{B}(\bm{r})=\frac{\mu_{0}}{4\uppi r^{3}}\left[3(\bm{\mu}\cdot\hat{\bm{r}})\hat{\bm{r}}-\bm{\mu}\right],\label{eq:single-dipole-field-vector}
\end{equation}

\end_inset

where 
\begin_inset Formula $\mu_{0}$
\end_inset

 is the permeability of free space; 
\begin_inset Formula $\bm{r}$
\end_inset

 is the position at which we wish to evaluate the dipole field, with respect
 to a magnetic moment, a vector 
\begin_inset Formula $\bm{\mu}$
\end_inset

, at the origin; and 
\begin_inset Formula $\hat{\bm{r}}$
\end_inset

 is the unit vector along the direction of 
\begin_inset Formula $\bm{r}$
\end_inset

.
 Alternatively, the field can be written in terms of the 
\emph on
dipolar tensor
\emph default
,
\begin_inset Formula 
\begin{eqnarray}
B^{\alpha}(\bm{r}) & = & D^{\alpha\beta}\mu^{\beta}\nonumber \\
 & = & \frac{\mu_{0}}{4\uppi r^{3}}\left(\frac{3r^{\alpha}r^{\beta}}{r^{2}}-\delta^{\alpha\beta}\right)\mu^{\beta}\label{eq:dipolar-tensor}
\end{eqnarray}

\end_inset

where 
\begin_inset Formula $\delta^{\alpha\beta}$
\end_inset

 is the Kronecker delta, and the Einstein summation convention is applied.
\end_layout

\begin_layout Standard
The field strength falls off rapidly with distance, with Coulomb's familiar
 inverse square law being replaced by an inverse cube relationship.
 The field is also twice as strong along the axis of the dipole as it is
 perpendicular to that axis.
 The strength of the dipole field 
\begin_inset Formula $B$
\end_inset

 is thus a function of the dipole moment 
\begin_inset Formula $\mu$
\end_inset

, distance from it 
\begin_inset Formula $r$
\end_inset

, and the angle made with its axis, 
\begin_inset Formula $\theta$
\end_inset

:
\begin_inset Formula 
\begin{equation}
B(\mu,r,\theta)=\frac{\mu_{0}}{4\pi}\frac{\mu}{r^{3}}\sqrt{1+3\cos^{2}\theta}\,.\label{eq:single-dipole-field}
\end{equation}

\end_inset

A graph of this strength as a function of distance in units appropriate
 for 
\begin_inset ERT
status collapsed

\begin_layout Plain Layout


\backslash
muSR
\backslash
 
\end_layout

\end_inset

 is shown in 
\begin_inset CommandInset ref
LatexCommand formatted
reference "fig:single-dipole-field-graph"

\end_inset

.
\end_layout

\begin_layout Standard
\begin_inset Float figure
wide false
sideways false
status open

\begin_layout Plain Layout
\align center
\begin_inset Graphics
	filename figures/dipole/single-dipole/single-dipole-field-graph.eps

\end_inset


\end_layout

\begin_layout Plain Layout
\begin_inset Caption

\begin_layout Plain Layout
The field from a point dipole of unit moment as a function of distance.
 The blue, solid line represents the field perpendicular to the dipole axis,
 whilst the red, dashed line shows the field along the axis, which is larger
 by a factor of two.
 The graph is in units which are approximately appropriate for 
\begin_inset ERT
status collapsed

\begin_layout Plain Layout


\backslash
muSR 
\end_layout

\end_inset

, where a muon will embed itself a few nanometres from magnetic moments
 of order a few Bohr magnetons.
 The left-hand 
\begin_inset Formula $y$
\end_inset

-axis is thus the field expected per Bohr magneton, 
\begin_inset Formula $\mu_{\mathrm{B}}$
\end_inset

.
 The right-hand 
\begin_inset Formula $y$
\end_inset

-axis shows the precession frequency which would be observed in a muon spin-rota
tion experiment, obtained by multiplying the field by the muon gyromagnetic
 ratio, 
\begin_inset Formula $\gamma_{\murm}/2\uppi=\SI{135.5}{\MHz\per\tesla}$
\end_inset

.
\begin_inset CommandInset label
LatexCommand label
name "fig:single-dipole-field-graph"

\end_inset


\end_layout

\end_inset


\end_layout

\end_inset


\end_layout

\begin_layout Subsection
The field from arrays of dipoles
\end_layout

\begin_layout Standard
The dipolar field experienced by a muon embedded in a crystal, 
\begin_inset Formula $\bm{B}_{\mathrm{dipole}}$
\end_inset

, is a function of the muon site 
\begin_inset Formula $\bm{r}_{\murm}$
\end_inset

 and comprises the vector sum of fields from all dipoles inside the crystal.
 Thus, we perform the sum 
\begin_inset Formula 
\begin{equation}
\bm{B}_{\mathrm{dipole}}(\bm{r}_{\murm})=\sum_{i}\frac{\mu_{0}}{4\uppi r^{3}}\left[3(\bm{\mu}_{i}\cdot\hat{\bm{r}})\hat{\bm{r}}-\bm{\mu}_{i}\right],\label{eq:dipole-sum-vector}
\end{equation}

\end_inset

where 
\begin_inset Formula $\mu_{0}$
\end_inset

 is the permeability of free space, and 
\begin_inset Formula $\bm{r}=\bm{r}_{i}-\bm{r}_{\murm}$
\end_inset

 is the relative position of the muon and the 
\begin_inset Formula $i$
\end_inset


\begin_inset script superscript

\begin_layout Plain Layout
th
\end_layout

\end_inset

 ion with magnetic moment 
\begin_inset Formula $\bm{\mu}_{i}$
\end_inset

.
 Two examples of dipole fields summed over a number of dipoles in two dimensions
 are shown in 
\begin_inset CommandInset ref
LatexCommand formatted
reference "fig:spingrids"

\end_inset

.
\end_layout

\begin_layout Standard
\begin_inset Float figure
wide false
sideways false
status open

\begin_layout Plain Layout
\align center
\begin_inset Graphics
	filename figures/dipole/dipole-grid/spingrids.eps

\end_inset


\end_layout

\begin_layout Plain Layout
\begin_inset Caption

\begin_layout Plain Layout
Dipole fields emanating from a grid of magnetic dipoles in the plane of
 the page.
 The large arrows are dipole moments.
 Small arrows show the dipole field, pointing along its direction and coloured
 on a logarithmic scale according to its magnitude; lighter colour indicates
 weaker field.
 Fields are shown from (a)
\begin_inset space ~
\end_inset

a single dipole; (b)
\begin_inset space ~
\end_inset

a square grid of dipoles aligned ferromagnetically; (c)
\begin_inset space ~
\end_inset

a square grid of dipoles aligned antiferromagnetically.
 In both of the latter cases, points of cancellation are evident.
\begin_inset CommandInset label
LatexCommand label
name "fig:spingrids"

\end_inset


\end_layout

\end_inset


\end_layout

\end_inset


\end_layout

\begin_layout Standard
The field distributions resulting from arrays of dipoles show two general
 features.
 Firstly, when near to any given dipole, its field tends to dominate; in
 
\begin_inset CommandInset ref
LatexCommand formatted
reference "fig:spingrids"

\end_inset

, the field arrows are almost identical near any given spin in the grids
 of (b) or (c) as they are close to the isolated spin in (a).
 Secondly, there are usually points of cancellation at positions of high
 symmetry, where the total field from the dipoles sums to zero.
 The impact on a muon is thus contingent on its site with respect to the
 magnetic ions in a crystal: a muon sufficiently close to an ion will be
 largely indifferent to the surrounding magnetic structure.
 However, since magnetic ions are often positively charged and thus repel
 muons, the interaction of many dipoles is usually relevant in dipole-field
 calculations for 
\begin_inset ERT
status collapsed

\begin_layout Plain Layout


\backslash
muSR 
\end_layout

\end_inset

.
\end_layout

\begin_layout Standard
Strictly, dipole sums should be evaluated over all magnetic moments in the
 crystal, but the intractability of this sum for ~
\begin_inset ERT
status collapsed

\begin_layout Plain Layout


\backslash
num{e23}
\end_layout

\end_inset

 moments inside an entire crystal necessitates truncating it somehow.
 Two possible methods to make this sum tractable are Ewald summation, explained
 in the next section, and use of Lorentz spheres (see 
\begin_inset CommandInset ref
LatexCommand formatted
reference "sec:lorentz-spheres"

\end_inset

).
 Truncating the sum also gives rise to additional fields due to finite-size
 effects (see 
\begin_inset CommandInset ref
LatexCommand formatted
reference "sub:lorentz-demagnetising"

\end_inset

).
\end_layout

\begin_layout Standard
In general, distributed spin-density requires treating this sum as an integral
 over the space inside the crystal
\begin_inset CommandInset citation
LatexCommand citep
key "Probert1997-muSR-dipole-Ewald"

\end_inset

.
 However, in many cases it should be acceptable to approximate the moments
 as point dipoles attached to a given atomic site.
 This approximation inevitably holds for the dipoles further from the muon,
 and remains plausible for nearby dipoles in magnetic insulators where the
 magnetic ions are small.
 A further assumption usually made is that the crystal is in a magnetic
 ground state, and the moments are fully, statically ordered throughout
 the crystalline bulk.
 In order to compare the fields extracted from these simulations, it is
 therefore necessary to extrapolate from experimental data the muon precession
 frequency at zero temperature.
\end_layout

\begin_layout Section
Dipole sums
\end_layout

\begin_layout Subsection
Ewald summation
\begin_inset CommandInset label
LatexCommand label
name "sub:ewald-summation"

\end_inset


\end_layout

\begin_layout Standard

\emph on
Ewald summation
\emph default

\begin_inset CommandInset citation
LatexCommand citep
key "Ewald1923-Ewald-summation"

\end_inset

 is a method of rapidly evaluating potentials, fields, 
\emph on
etc
\emph default
.
 within an infinite lattice.
 It offers significant reductions in the computing time required to perform
 such calculations by deftly dividing labour between a sum in real space,
 with charges or dipoles artificially screened to overcome long-range interactio
ns, and a sum in reciprocal space which accounts for those long-range interactio
ns neglected in the real-space sum.
 In the case of calculating the electrostatic potential in crystals, Ewald
 summation allows evaluation of a sum which, in real space, is potentially
 infinite in length.
 The reduced range of dipole-field interactions (
\begin_inset Formula $\sim1/r^{3}$
\end_inset

 as opposed to 
\begin_inset Formula $\sim1/r$
\end_inset

) necessarily makes gains more modest.
 An overview of the mathematics of Ewald summation is given in 
\begin_inset CommandInset ref
LatexCommand formatted
reference "chap:ewald-summation"

\end_inset

.
 Ewald summation has been previously used in dipole-field simulations for
 
\begin_inset ERT
status collapsed

\begin_layout Plain Layout


\backslash
muSR 
\end_layout

\end_inset

, in e.g.
\begin_inset space ~
\end_inset

Ref.
\begin_inset space ~
\end_inset


\begin_inset CommandInset citation
LatexCommand citealp
key "Probert1997-muSR-dipole-Ewald"

\end_inset

.
\end_layout

\begin_layout Subsection
Lorentz spheres
\begin_inset CommandInset label
LatexCommand label
name "sec:lorentz-spheres"

\end_inset


\end_layout

\begin_layout Standard
An alternative method of summing dipolar fields
\begin_inset CommandInset citation
LatexCommand citep
key "McKeehan1933-dipole-sums"

\end_inset

 is to discard those moments outside a relatively small Lorentz sphere centred
 at 
\begin_inset Formula $\bm{r}_{\murm}$
\end_inset

, and subsequently apply an appropriate correction, the Lorentz field 
\begin_inset Formula $\bm{B}_{\mathrm{L}}$
\end_inset

, to account for fields from the disregarded dipoles (see 
\begin_inset CommandInset ref
LatexCommand formatted
reference "sub:lorentz-demagnetising"

\end_inset

).
 The approximation is valid for dipole fields in contrast to electrostatic
 potentials due to their more rapid attenuation with distance.
\end_layout

\begin_layout Standard
The size of sphere required to obtain an accurate answer can be obtained
 by performing trial calculations at various cut-off radii until the value
 converges; such a convergence test is illustrated in 
\begin_inset CommandInset ref
LatexCommand formatted
reference "fig:convergence-test"

\end_inset

.
 This typically requires 
\begin_inset Formula $\lesssim10,000$
\end_inset

 moments to converge to within less than 
\begin_inset Formula $<1\%$
\end_inset

 of the true value (significantly higher precision than that to which frequencie
s are commonly determined in 
\begin_inset ERT
status collapsed

\begin_layout Plain Layout


\backslash
muSR 
\end_layout

\end_inset

).
 This kind of calculation can be completed in minutes or hours if evaluating
 fields at even a few million points.
\end_layout

\begin_layout Standard
\begin_inset Float figure
wide false
sideways false
status open

\begin_layout Plain Layout
\align center
\begin_inset Graphics
	filename figures/dipole/converge/convergence-test.eps

\end_inset


\begin_inset Caption

\begin_layout Plain Layout
The convergence of values of magnetic field towards the true value in a
 hypothetical primitive cubic antiferromagnet with increasing Lorentz sphere
 radius 
\begin_inset Formula $R$
\end_inset

, in terms of the cubic lattice parameter 
\begin_inset Formula $a$
\end_inset

 (the upper 
\begin_inset Formula $x$
\end_inset

-axis shows the number of dipoles 
\begin_inset Formula $N_{\mathrm{dipoles}}$
\end_inset

 contained in a sphere of radius 
\begin_inset Formula $R$
\end_inset

).
 The `correct' value of the magnetic field is ascertained by performing
 a dipole-field calculation with a very large Lorentz sphere with a radius
 
\begin_inset Formula $R=43a$
\end_inset

, and convergence towards that value has been evaluated at 
\begin_inset ERT
status collapsed

\begin_layout Plain Layout


\backslash
num{100000}
\end_layout

\end_inset

 randomly-chosen points within the unit cell.
 A colour map in (a) shows how rate of convergence varies with proximity
 to a spin, 
\begin_inset Formula $r_{\murm\text{--}\uparrow}$
\end_inset

.
 Blue points are closest to spins, with green intermediate and red farthest.
 Colour density indicates the number of points, but the scale is non-linear
 to enhance visibility of the regions of slow convergence.
 (b) Aggregate values: the central blue line indicates the average error
 on the evaluated field values, whilst the grey shaded region indicates
 plus or minus the root mean square error.
 Note that the 
\begin_inset Formula $y$
\end_inset

-axis scale only extends to 
\begin_inset Formula $\pm2\%$
\end_inset

: field values rapidly converge to an error of 
\begin_inset Formula $<\SI{1}{\percent}$
\end_inset

 for spheres with radii 
\begin_inset Formula $R\gtrsim5a$
\end_inset

.
\begin_inset CommandInset label
LatexCommand label
name "fig:convergence-test"

\end_inset


\end_layout

\end_inset


\end_layout

\end_inset


\end_layout

\begin_layout Subsection
Ewald or Lorentz?
\end_layout

\begin_layout Standard
Calculating dipole fields using Ewald's method is significantly more mathematica
lly complex than using Lorentz spheres, and ultimately it was the latter,
 simpler method which was implemented in the software developed for this
 thesis.
 Though using Lorentz spheres is in theory more computationally expensive,
 the speed penalty paid for this choice is relatively insignificant in tradition
al dipole-field analyses, as opposed to the Bayesian dipole-field analysis
 techniques described in 
\begin_inset CommandInset ref
LatexCommand formatted
reference "sec:dipole-bayes"

\end_inset

.
 In a typical conventional dipole calculation, fields might be evaluated
 at positions on a  grid comprising a few thousand points which is then
 examined by eye for suitable field values.
 Calculating such a grid typically only takes a matter of minutes, and thus
 is not a rate-limiting step in a 
\begin_inset ERT
status collapsed

\begin_layout Plain Layout


\backslash
muSR
\backslash

\end_layout

\end_inset

 data analysis workflow.
 The Bayesian technique, by contrast, usually entails calculating fields
 at tens of millions of randomly-generated points in order to obtain a smooth
 curve, then repeating this for a variety of different magnetic structures.
 This can take days on contemporary desktop computers, and it would certainly
 be worth revisiting Ewald summation in an attempt to optimise these calculation
s.
\end_layout

\begin_layout Standard
Future work examining how to constrain muon positions in Bayesian dipole-field
 simulations should certainly attempt to do so using electrostatic potentials
 since they would be expected to provide an estimate of minimum-energy positions
 for muons to come to rest.
 As is shown in 
\begin_inset CommandInset ref
LatexCommand formatted
reference "chap:ewald-summation"

\end_inset

, Ewald summation is almost essential to achieving reliable convergence
 of electrostatic potential calculations within crystal lattices, and could
 well therefore have a rôle in muon site determination.
\end_layout

\begin_layout Section
Other magnetic fields at the muon site
\begin_inset CommandInset label
LatexCommand label
name "sec:other-fields"

\end_inset


\end_layout

\begin_layout Standard
A muon passively precessing in its local environment experiences a total
 magnetic field comprising the vector sum of several different components
\begin_inset CommandInset citation
LatexCommand citep
key "Dalmas1997-musr"

\end_inset

:
\end_layout

\begin_layout Standard
\begin_inset Formula 
\begin{equation}
\bm{B}=\bm{B}_{\mathrm{0}}+\bm{B}_{\mathrm{dipole}}+\bm{B}_{\mathrm{L}}+\bm{B}_{\mathrm{demag}}+\bm{B}_{\mathrm{hyperfine}}+\bm{B}_{\mathrm{trans}}+\bm{B}_{\mathrm{diamag}}.
\end{equation}

\end_inset


\end_layout

\begin_layout Itemize
\begin_inset Formula $\bm{B}_{\mathrm{0}}$
\end_inset

 is any external field applied during the experiment.
\end_layout

\begin_layout Itemize
\begin_inset Formula $\bm{B}_{\mathrm{dipole}}$
\end_inset

 is the dipole field resulting from a summation of all dipolar fields inside
 the crystal, as described previously.
\end_layout

\begin_layout Itemize
\begin_inset Formula $\bm{B}_{\mathrm{L}}$
\end_inset

 is the 
\emph on
Lorentz field
\emph default
, and arises from those dipoles outside the Lorentz sphere.
\end_layout

\begin_layout Itemize
\begin_inset Formula $\bm{B}_{\mathrm{demag}}$
\end_inset

 is the 
\emph on
demagnetising field
\emph default
 resulting from the finite size of the sample.
 It is a contribution from those dipoles at the sample surface, and consequently
 depends on sample shape.
\end_layout

\begin_layout Itemize
\begin_inset Formula $\bm{B}_{\mathrm{hyperfine}}$
\end_inset

 is the 
\emph on
contact hyperfine field
\emph default
 arising from any spin density overlapping with the muon site.
\end_layout

\begin_layout Itemize

\family roman
\series medium
\shape up
\size normal
\emph off
\bar no
\strikeout off
\uuline off
\uwave off
\noun off
\color none
\begin_inset Formula $\bm{B}_{\mathrm{trans}}$
\end_inset

 is the 
\family default
\series default
\shape default
\size default
\emph on
\bar default
\strikeout default
\uuline default
\uwave default
\noun default
\color inherit
transferred hyperfine field
\family roman
\series medium
\shape up
\size normal
\emph off
\bar no
\strikeout off
\uuline off
\uwave off
\noun off
\color none
, due in metals to the Ruderman--Kittel--Kasuya--Yosida (RKKY) interaction
\begin_inset CommandInset citation
LatexCommand citep
key "blundell-magnetism-in-condensed-matter-book"

\end_inset

.
\end_layout

\begin_layout Itemize
\begin_inset Formula $\bm{B}_{\mathrm{diamag}}$
\end_inset

 is the 
\emph on
diamagnetic field
\emph default
, and results from supercurrents screening applied magnetic field.
 It is thus specific to superconductors, and will not be explored here.
\end_layout

\begin_layout Subsection
Lorentz and demagnetising fields
\begin_inset CommandInset label
LatexCommand label
name "sub:lorentz-demagnetising"

\end_inset


\end_layout

\begin_layout Standard
In crystals without a net magnetisation, dipole-field simulations are significan
tly simplified because parts of the crystal far from the muon do not exert
 a net field on the muon site.
 The Lorentz and demagnetising fields are zero in such systems.
 However, in many ferro-, ferri- or canted antiferromagnetic systems, magnetisat
ion 
\begin_inset Formula $\bm{M}\neq\bm{0}$
\end_inset

 and it is necessary to include these corrections in order to obtain a correct
 estimate of the field at the muon site.
\end_layout

\begin_layout Standard
\begin_inset Float figure
wide false
sideways false
status open

\begin_layout Plain Layout
\align center
\begin_inset Graphics
	filename figures/dipole/lor-dem/lor-dem.eps
	scale 75

\end_inset


\begin_inset Caption

\begin_layout Plain Layout
Schematic representation of the Lorentz and demagnetising fields.
 The small black arrows represent individual atomic dipoles.
 (a) The Lorentz sphere of dipoles used to calculate the approximate dipole
 field inside a sample.
 (b) The dipoles outside the Lorentz sphere, extending to infinity, exert
 a Lorentz field 
\begin_inset Formula $\bm{B}_{\mathrm{L}}$
\end_inset

 inside that sphere.
 (c) In real, non-infinite samples, surface effects result in a demagnetising
 field, 
\begin_inset Formula $\bm{B}_{\mathrm{demag}}$
\end_inset

, due to the effect of unpaired magnetic poles at the sample surface.
 Here, in an infinite planar sample, north is represented by + and south
 by 
\begin_inset Formula $-$
\end_inset

, and the demagnetising field runs from plus to minus, opposite to the sample
 magnetisation.
 The + and 
\begin_inset Formula $-$
\end_inset

 signs represent positive and negative divergences of 
\begin_inset Formula $\bm{H}$
\end_inset

 created by the boundary of the sample magnetisation: since 
\begin_inset Formula $\nabla\cdot\bm{B}=0$
\end_inset

, 
\begin_inset Formula $\nabla\cdot\bm{H}=-\nabla\cdot\bm{M}$
\end_inset

.
\begin_inset CommandInset label
LatexCommand label
name "fig:lorentz-demagnetising"

\end_inset


\end_layout

\end_inset


\end_layout

\end_inset


\end_layout

\begin_layout Standard
The Lorentz sphere, Lorentz field and demagnetising field are shown in the
 schematic diagrams in 
\begin_inset CommandInset ref
LatexCommand formatted
reference "fig:lorentz-demagnetising"

\end_inset

.
 First, in 
\begin_inset CommandInset ref
LatexCommand formatted
reference "fig:lorentz-demagnetising"

\end_inset


\begin_inset space ~
\end_inset

(a), a Lorentz sphere of dipoles is shown, representing the initial dipole
 sum as described in 
\begin_inset CommandInset ref
LatexCommand formatted
reference "sec:lorentz-spheres"

\end_inset

.
 The moments outside a spherical void in an infinite crystal will result
 in an additional Lorentz field 
\begin_inset Formula $\bm{B}_{\mathrm{L}}$
\end_inset

 proportional to and parallel with the net magnetisation 
\begin_inset Formula $\bm{M}$
\end_inset

, 
\begin_inset Formula 
\begin{equation}
\bm{B}_{\mathrm{L}}=\frac{\mu_{0}\bm{M}}{3}\,,\label{eq:lorentz-field}
\end{equation}

\end_inset

where 
\begin_inset Formula $\mu_{0}$
\end_inset

 is the permeability of free space.
 This effect is illustrated in 
\begin_inset CommandInset ref
LatexCommand formatted
reference "fig:lorentz-demagnetising"

\end_inset


\begin_inset space ~
\end_inset

(b).
\end_layout

\begin_layout Standard
The demagnetising field 
\begin_inset Formula $\bm{B}_{\mathrm{demag}}$
\end_inset

 is a finite-size effect caused by moments at the sample surface.
 A magnetic field runs between unpaired magnetic poles at the surfaces,
 and will usually act to reduce the sample magnetisation; this tendency
 to oppose the magnetisation gives rise to its name.
 The demagnetising field in a planar sample is a particularly simple case,
 and is shown in 
\begin_inset CommandInset ref
LatexCommand formatted
reference "fig:lorentz-demagnetising"

\end_inset


\begin_inset space ~
\end_inset

(c).
 Here, each face is entirely composed of magnetic poles of the same sign,
 and field will run from `plus' to `minus', creating a field precisely opposite
 the magnetisation.
 In general, however, this field varies with sample shape and position inside
 the sample, and is very difficult to calculate for an arbitrarily-shaped
 object (see e.g.
 Ref.
\begin_inset space ~
\end_inset


\begin_inset CommandInset citation
LatexCommand citealp
key "blundell-magnetism-in-condensed-matter-book"

\end_inset

).
 However, it can be explicitly calculated for various special cases.
 For example, the demagnetising field in ellipsoids is given by
\begin_inset Formula 
\begin{equation}
\bm{B}_{\mathrm{demag}}=-\mu_{0}\mathsf{N}\bm{M}\,,\label{eq:demagnetising-field}
\end{equation}

\end_inset

where 
\begin_inset Formula $\mathsf{N}$
\end_inset

 is the demagnetising tensor.
 If the magnetic field lies along one of the ellipse's principal axes, 
\begin_inset Formula $\mathsf{N}$
\end_inset

 can be diagonalised, giving
\begin_inset Formula 
\begin{equation}
\mathsf{N}_{\mathrm{ellipsoid}}=\left(\begin{array}{ccc}
N_{x} & 0 & 0\\
0 & N_{y} & 0\\
0 & 0 & N_{z}
\end{array}\right).
\end{equation}

\end_inset

In the doubly special case of a sphere, 
\begin_inset Formula $N_{x}=N_{y}=N_{z}=\frac{1}{3}$
\end_inset

, allowing the demagnetising field to be expressed in terms of a scalar
 demagnetising factor 
\begin_inset Formula $N$
\end_inset

,
\begin_inset Formula 
\[
\bm{B}_{\mathrm{demag}}=-\mu_{0}N\bm{M}\,,
\]

\end_inset

where 
\begin_inset Formula $N=\frac{1}{3}$
\end_inset

 for uniformly-magnetised spheres.
 A very long cylindrical rod orientated in the 
\begin_inset Formula $z$
\end_inset

-direction exhibits 
\begin_inset Formula $N_{x}=N_{y}=\frac{1}{2}$
\end_inset

, 
\begin_inset Formula $N_{z}=0$
\end_inset

, because if the magnetisation points along the direction of the rod, the
 monopoles created will be at infinity, and thus exert no influence.
 Similarly, for an infinite, flat plate perpendicular to 
\begin_inset Formula $z$
\end_inset

 [as shown in 
\begin_inset CommandInset ref
LatexCommand formatted
reference "fig:lorentz-demagnetising"

\end_inset


\begin_inset space ~
\end_inset

(c)], 
\begin_inset Formula $N_{x}=N_{y}=0$
\end_inset

, 
\begin_inset Formula $N_{z}=1$
\end_inset

.
\end_layout

\begin_layout Standard
As well as systems where 
\begin_inset Formula $\bm{M}=\bm{0}$
\end_inset

, the Lorentz and demagnetising fields can be neglected in perfectly spherical
 samples because the two are equal in magnitude but opposite in sign.
 In most cases, the two fields will cancel to some extent, and an order
 of magnitude upper bound can be extracted by computing 
\family roman
\series medium
\shape up
\size normal
\emph off
\bar no
\strikeout off
\uuline off
\uwave off
\noun off
\color none

\begin_inset Formula $\mu_{0}\bm{M}$
\end_inset

.
\end_layout

\begin_layout Subsection
Hyperfine fields
\begin_inset CommandInset label
LatexCommand label
name "sub:hyperfine-fields"

\end_inset


\end_layout

\begin_layout Standard
Hyperfine fields result from the overlap between a muon wavefunction and
 any spin-density at the muon site.
 The hyperfine field at the muon position 
\family roman
\series medium
\shape up
\size normal
\emph off
\bar no
\strikeout off
\uuline off
\uwave off
\noun off
\color none

\begin_inset Formula $B_{\mathrm{hyperfine}}(\bm{r}_{\murm})$
\end_inset


\family default
\series default
\shape default
\size default
\emph default
\bar default
\strikeout default
\uuline default
\uwave default
\noun default
\color inherit
 is given by
\begin_inset CommandInset citation
LatexCommand citep
key "Schenck1985-muSR-book,Meier1975-hyperfine-metals"

\end_inset

 
\begin_inset Formula 
\begin{equation}
B_{\mathrm{hyperfine}}(\bm{r}_{\murm})=\frac{2\mu_{0}}{3\mu_{\mathrm{B}}}\left[n^{\uparrow}(\bm{r}_{\murm})-n^{\downarrow}(\bm{r}_{\murm})\right],
\end{equation}

\end_inset

where 
\begin_inset Formula $\mu_{0}$
\end_inset

 is the permeability of free space, 
\begin_inset Formula $\mu_{\mathrm{B}}$
\end_inset

 is the Bohr magneton, and 
\family roman
\series medium
\shape up
\size normal
\emph off
\bar no
\strikeout off
\uuline off
\uwave off
\noun off
\color none

\begin_inset Formula $n^{\uparrow,\downarrow}(\bm{r}_{\murm})$
\end_inset

 are the densities of spin up and down electrons at the muon site, respectively.
 Hyperfine fields have the potential to be very large: a muon overlapping
 with a single, spin-up electron occupying a volume equal to the Bohr radius
 cubed would experience a hyperfine field
\begin_inset Formula 
\begin{equation}
B_{\mathrm{hyperfine}}=\frac{2\mu_{0}}{3\mu_{\mathrm{B}}}\frac{1}{a_{0}^{3}}=\SI{52.4}{\tesla},
\end{equation}

\end_inset

giving rise to a muon precession frequency 
\begin_inset Formula $\nu=\gamma_{\murm}B_{\mathrm{hyperfine}}=\SI{7100}{\MHz}$
\end_inset

! The density of spin-polarised electrons overlapping with a muon will usually
 be somewhat lower than this.
\end_layout

\begin_layout Standard

\family roman
\series medium
\shape up
\size normal
\emph off
\bar no
\strikeout off
\uuline off
\uwave off
\noun off
\color none
In spite of this relatively simple definition, the hyperfine field is difficult
 to ascertain.
 Knowledge of the local spin-density at the muon site firstly presupposes
 knowledge of the muon site, which is itself usually unknown.
 Even then, conventional calculations or experiment will usually ignore
 the perturbation from the muon in the system; 
\family default
\series default
\shape default
\size default
\emph default
\bar default
\strikeout default
\uuline default
\uwave default
\noun default
\color inherit
for example, measuring the spin-density throughout the unit cell from neutron
 diffraction only gives information on the system in the absence of a muon.
\end_layout

\begin_layout Standard
Some information about the hyperfine field can be gleaned from muon experiments
 by measuring the 
\emph on
Knight shift
\emph default

\begin_inset CommandInset citation
LatexCommand citep
key "Schenck1985-muSR-book"

\end_inset

, which is the shift in muon precession frequency from that expected in
 an applied field 
\begin_inset Formula $B_{0}$
\end_inset

 in a sample in the paramagnetic state.
 The magnetisation induced in the sample by the applied field manifests
 as an imbalance in the density of spin-up and -down electrons at the muon
 site, resulting in a hyperfine field which modifies the applied field.
 However, translating this into the hyperfine field experienced in the ordered
 state is non-trivial.
 Firstly, the Knight shift is affected by other components of the local
 field, such as the field from the atomic dipoles associated with the degree
 of magnetisation induced.
 Secondly, the ordering of the spins induced by applied field may differ
 in configuration or direction from that in a state of spontaneous magnetic
 order.
 For example, the magnetisation in spontaneous order will be along the material'
s easy axis, whereas the magnetisation in field will be parallel to that
 field.
 Further, in materials which experience order other than ferromagnetic,
 the spins will not all align coparallel with one-another as they do in
 field in the paramagnetic state, adding further complexity to evaluating
 the likely spin-density at the muon site.
\end_layout

\begin_layout Standard
Hyperfine fields present the largest potential pitfall in analysis of local
 fields at muon sites, because of this difficulty in evaluation and their
 potential to be large.
 However, in magnetic insulators, and especially those where the magnetic
 species are small in spatial extent, positively-charged and thus repulsive
 to muons, and have a small and/or reduced magnetic moment, the quantity
 of spin-density expected at the muon site would be small.
\end_layout

\begin_layout Section
Dipole-field analysis
\begin_inset CommandInset label
LatexCommand label
name "sec:dipole-analysis"

\end_inset


\end_layout

\begin_layout Standard
Dipole-field analysis has traditionally been used to isolate possible muon
 sites by stipulating that the muon must stop at a position with a dipole
 field compatible with the precession frequencies observed in experiment.
 First, dipole fields are calculated at all positions on a grid inside the
 unit cell.
 Choosing a grid with a prime number of elements in each direction limits
 the potential for sampling artefacts.
 Then, fields which differ by more than some tolerance from those actually
 observed in the 
\begin_inset ERT
status collapsed

\begin_layout Plain Layout


\backslash
muSR
\backslash
 
\end_layout

\end_inset

 spectra are discarded, and positions are sought where the correct field
 is observed, and the muon may plausibly stop due, for example, to proximity
 to some negative ion.
\end_layout

\begin_layout Standard
Further information can be inferred by attempting to model the charge distributi
on inside the unit cell, with sophistication ranging from examination of
 sites with the correct field for proximity to negative ions
\begin_inset CommandInset citation
LatexCommand citep
key "Lancaster2003-PrO2"

\end_inset

; to analogy with similar structures
\begin_inset CommandInset citation
LatexCommand citep
key "Blundell2010-EuO"

\end_inset

; to phenomenological attempts to map the electric potential inside the
 crystal
\begin_inset CommandInset citation
LatexCommand citep
key "Noakes1986-dipole-field-distributions,Lancaster2003-MCO3"

\end_inset

; to attempts to evaluate the electronic structure of the crystal with computati
onal methods such as density functional theory.
\end_layout

\begin_layout Standard
The electronic structure of a crystal obeys the symmetry of the lattice
 and consequently, if a muon stops in a given position, it should stop in
 all crystallographically-equivalent positions.
 This provides another opportunity to interrogate dipole-field simulations
 because many transitions to long-range magnetic order will create a magnetic
 unit cell larger than the crystallographic one---in the language of 
\begin_inset CommandInset ref
LatexCommand formatted
reference "chap:magnetic-propagation-vector"

\end_inset

, they will have a nonzero magnetic propagation vector.
 Thus, it is possible for crystallographically-equivalent sites to be magnetical
ly-inequivalent and, were muons to stop in such a site, multiple frequencies
 would be observed.
 Thus, when performing dipole-field simulations, it is important to check
 that the proposed muon site does not give rise to any additional frequencies
 not present in the 
\begin_inset Formula $A(t)$
\end_inset

 spectra
\begin_inset CommandInset citation
LatexCommand citep
key "Blundell2010-EuO"

\end_inset

; or, conversely, the presence of multiple frequencies in some materials
 can be explained by this effect
\begin_inset CommandInset citation
LatexCommand citep
key "Lancaster2008-AgNiO2,Sugiyama2009-LiCrO2"

\end_inset

.
\end_layout

\begin_layout Standard
The largest limitation of dipole-field analysis in this form is that, for
 it to be effective, the magnetic structure of the material must be known.
 If it is not, the muon position will be wrong, and quantifying the uncertainty
 is difficult.
 Because the magnetic structure is assumed, this process for determining
 the muon site is also circular, and the muon site does not in itself give
 any information about sample properties.
 Its use is as a (binary) consistency check: the absence of appropriate
 fields in plausible sites would be relatively solid evidence that the assumed
 magnetic structure was in error.
\end_layout

\begin_layout Standard
It is, in fact, quite common for the magnetic structure to be unknown.
 This can either be because the muon results precede studies to determine
 the magnetic structure (e.g.
\begin_inset space ~
\end_inset

using neutron scattering), or because such studies would be difficult due
 to ferromagnetism, small moments, large concentrations of hydrogen 
\emph on
etc
\emph default
.
 Changing magnetic structures can often result in a dramatic alteration
 of muon precession frequency at a given site: in the most extreme case,
 the muon could sit at a point of cancellation in an alternative structure,
 having previously occupied a site of nonzero field.
 On top of this, moment sizes are often not known precisely, and muon precession
 frequency scales with these.
 It is to quantify the uncertainty resulting from unknown muon sites and
 ill-constrained magnetic structures that we approach dipole-field analysis
 with Bayesian inference.
\end_layout

\begin_layout Section
Bayesian dipole-field analysis
\begin_inset CommandInset label
LatexCommand label
name "sec:dipole-bayes"

\end_inset


\end_layout

\begin_layout Standard
Bayesian inference is a method which allows calculation of what can be reasonabl
y deduced given what is actually known.
 This section will explore its application to combining dipole-field simulation
 with 
\begin_inset ERT
status collapsed

\begin_layout Plain Layout


\backslash
muSR
\backslash
 
\end_layout

\end_inset

 results.
 First, we examine probability distributions of dipole fields, taking specifical
ly the example of antiferromagnet MnO; then Bayes' theorem is introduced;
 and finally the two are combined into Bayesian dipole-field analysis.
\end_layout

\begin_layout Subsection
Dipole-field distributions
\end_layout

\begin_layout Standard
\begin_inset Float figure
wide false
sideways false
status open

\begin_layout Plain Layout
\align center
\begin_inset Graphics
	filename figures/dipole/dipole-field-distributions/dipole-distributions.eps

\end_inset


\begin_inset Caption

\begin_layout Plain Layout
Dipole-field distributions inside a number of model systems, after Ref.
\begin_inset space ~
\end_inset


\begin_inset CommandInset citation
LatexCommand citealp
key "Blundell2009-dipolefielddistributions"

\end_inset

.
 Moments on a simple cubic lattice are aligned (a) ferromagnetically along
 the crystal axis 
\begin_inset Formula $[001]$
\end_inset

; (b) antiferromagnetically with propagation vector 
\begin_inset Formula $\bm{k}_{0}=(\pi,\pi,\pi)$
\end_inset

 with moments pointing along 
\begin_inset Formula $[001]$
\end_inset

; (c) antiferromagnetically with 
\family roman
\series medium
\shape up
\size normal
\emph off
\bar no
\strikeout off
\uuline off
\uwave off
\noun off
\color none

\begin_inset Formula $\bm{k}_{0}$
\end_inset

, moments
\family default
\series default
\shape default
\size default
\emph default
\bar default
\strikeout default
\uuline default
\uwave default
\noun default
\color inherit
 along 
\begin_inset Formula $[011]$
\end_inset

; and (d) antiferromagnetically with 
\family roman
\series medium
\shape up
\size normal
\emph off
\bar no
\strikeout off
\uuline off
\uwave off
\noun off
\color none

\begin_inset Formula $\bm{k}_{0}$
\end_inset

, moments along 
\begin_inset Formula $[111]$
\end_inset

.
\begin_inset CommandInset label
LatexCommand label
name "fig:dipole-field-distributions"

\end_inset


\end_layout

\end_inset


\end_layout

\end_inset

Given that the muon site is 
\emph on
a priori
\emph default
 unknown, we might assume that it can stop in one of many possible locations
 inside a crystal.
 One possibility is to relax all assumptions about possible muon sites,
 and to assume that the muon stops everywhere
\begin_inset CommandInset citation
LatexCommand citep
key "Blundell2009-dipolefielddistributions"

\end_inset

.
 This might actually be appropriate in some physical systems; for example,
 in complex single-molecule magnets where there are many hundreds of atoms
 per unit cell, muons may stop in a large number of magnetically-inequivalent
 muon sites.
 Graphs in 
\begin_inset CommandInset ref
LatexCommand formatted
reference "fig:dipole-field-distributions"

\end_inset

 show the probability density function
\begin_inset space ~
\end_inset

(pdf) of dipole fields in a variety of different magnetic structures on
 a simple cubic lattice.
 The 
\begin_inset Formula $x$
\end_inset

-axes are in terms of the scaled frequency 
\begin_inset Formula $\tilde{\nu}=\left(\gamma_{\murm}a^{3}/2\uppi\mu\right)B$
\end_inset

, to facilitate comparison with general experimental data.
 Common features include the distributions' asymmetry; a 
\begin_inset Formula $\tilde{\nu}^{-2}$
\end_inset

 tail, corresponding to those muons stopping very near to a magnetic ion;
 and sharp Van Hove singularities
\begin_inset CommandInset citation
LatexCommand citep
key "VanHove1953-singularities"

\end_inset

, with positions corresponding to field values at points of high symmetry.
 These features are analogous to those in the magnetic field distributions
 found in the superconducting vortex lattice, described briefly in 
\begin_inset CommandInset ref
LatexCommand formatted
reference "sub:transverse-field"

\end_inset

.
\end_layout

\begin_layout Standard
In materials with a unit cell containing fewer atoms, the assumption of
 uniform muon distribution is problematic.
 Instead, muons are likely to stop at a small number of sites of high electron
 density, and often gravitate towards interstitial positions to minimise
 their electrostatic energy.
 It is then rational to evaluate the dipole-field distribution over a constraine
d set of sites using known or likely muon positions.
 An obvious constraint is to add a cut-off radius around positive ions within
 which muons will not stop.
 The effect of this to first order is often to truncate the 
\begin_inset Formula $\tilde{\nu}^{-2}$
\end_inset

 tail, because many magnetic centres are cationic.
 As the cut-off is increased in materials containing other positive species,
 there will be more complex effects on the pdf contingent on the location
 of other positive ions relative to the dipole-field distribution.
 It is also sensible to apply a cut-off proximity to negative ions, as there
 will come a point when electrons cannot successfully screen the muon from
 the effects of the positive nuclear charge.
\end_layout

\begin_layout Standard
A simple constraint in oxides is that muons usually stop around 
\begin_inset ERT
status collapsed

\begin_layout Plain Layout


\backslash
SI{0.1}{
\backslash
nm}
\end_layout

\end_inset

 from an O
\begin_inset script superscript

\begin_layout Plain Layout
2
\begin_inset Formula $-$
\end_inset


\end_layout

\end_inset

 ion
\begin_inset CommandInset citation
LatexCommand citep
key "Brewer1991-muon-1A-from-O,Li1991-muon-in-YBCO"

\end_inset

.
 Thus, we might examine sites where 
\begin_inset Formula $r_{\text{\muon--O}}=\SI{0.10(01)}{\nm}$
\end_inset

 (this approach is used in Ba
\begin_inset script subscript

\begin_layout Plain Layout
2
\end_layout

\end_inset


\emph on
M
\emph default
OsO
\begin_inset script subscript

\begin_layout Plain Layout
6
\end_layout

\end_inset

 in 
\begin_inset CommandInset ref
LatexCommand formatted
reference "chap:Ba2MOsO6"

\end_inset

).
 Alternatively, the muon site may be able to be determined directly from
 data taken above the transition to long-range magnetic order, e.g.
 by the examination of 
\begin_inset ERT
status collapsed

\begin_layout Plain Layout


\backslash
Fmu
\backslash
 
\end_layout

\end_inset

 dipole--dipole oscillations in muon spectra (an example of this in the
 [
\emph on
M
\emph default
(HF
\begin_inset Formula $_{\text{2}}$
\end_inset

)(pyz)
\begin_inset Formula $_{\text{2}}$
\end_inset

]
\emph on
X
\emph default
 series of molecular magnets is discussed in 
\begin_inset CommandInset ref
LatexCommand formatted
reference "chap:cuhf2pyz2x"

\end_inset

).
 Another possibility is that, in simple structures the muon's position can
 be assumed to be at mid-points between ions identified by inspection; for
 example, in materials with the rock salt structure, muons tend to stop
 at the body-centre of the simple cubic lattice, placing them equidistant
 between attractive negative and repulsive positive ions
\begin_inset CommandInset citation
LatexCommand citep
key "Blundell2010-EuO,Aggarwal1989-UP-UTe"

\end_inset

.
\end_layout

\begin_layout Standard
It is important to emphasise that these distributions are not to be identified
 with a distribution of fields at the muon site.
 (Dipole-field simulations can be used in conjunction with calculations
 of likely muon thermal ellipsoids to identify on-site field distributions
\begin_inset CommandInset citation
LatexCommand citep
key "Noakes1986-dipole-field-distributions"

\end_inset

, but this is not investigated here.) The extent of the muon wavefunction
 is likely to be comparable with that of a proton in a similar material
 and therefore will tend to be relatively small, especially at low temperatures.
 It is therefore usually relatively unproblematic to approximate muon sites
 as definite and point-like: possibly small in comparison to variations
 in the dipole field; almost certainly small compared to hypothetical 
\begin_inset ERT
status collapsed

\begin_layout Plain Layout


\backslash
SI{0.02}{
\backslash
nm}
\end_layout

\end_inset

-thick spherical shells around negative ions.
\end_layout

\begin_layout Subsection
An example: MnO
\end_layout

\begin_layout Standard
\begin_inset Float figure
wide false
sideways false
status open

\begin_layout Plain Layout
\align center
\begin_inset Graphics
	filename figures/dipole/mno/mno-structure.eps

\end_inset


\end_layout

\begin_layout Plain Layout
\begin_inset Caption

\begin_layout Plain Layout
Schematic structure of MnO in the magnetically ordered phase.
 The structure shown is a face-centred cubic simplification of the actual
 structure (see text).
 Arrows indicate the direction of the Mn spins (along 
\begin_inset Formula $[1\,1\,\bar{2}]$
\end_inset

 in this crystal system), while dotted lines indicate the 
\begin_inset Formula $[1\,1\,1]$
\end_inset

 planes of ferromagnetism.
\begin_inset CommandInset label
LatexCommand label
name "fig:mno-structure"

\end_inset


\end_layout

\end_inset


\end_layout

\end_inset


\begin_inset Float table
wide false
sideways false
status open

\begin_layout Plain Layout
\align center
\begin_inset Tabular
<lyxtabular version="3" rows="8" columns="1">
<features booktabs="true" tabularvalignment="middle">
<column alignment="center" valignment="top" width="0pt">
<row>
<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
MnO
\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="center" valignment="top" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
\begin_inset Formula $\mathrm{Fm\bar{3}m}$
\end_inset


\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="center" valignment="top" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
\begin_inset Formula $a=b=c=\SI{0.4426}{\nm}$
\end_inset


\begin_inset CommandInset citation
LatexCommand citep
key "Shull1949-MnO"

\end_inset


\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="center" valignment="top" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
\begin_inset Formula $\alpha=\beta=\gamma=\SI{90}{\degree}$
\end_inset


\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="center" valignment="top" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
Mn
\begin_inset script superscript

\begin_layout Plain Layout
2+
\end_layout

\end_inset

 @ 
\begin_inset Formula $(0,0,0)$
\end_inset

, 
\begin_inset Formula $\mu=5.65\mu_{\mathrm{B}}$
\end_inset


\begin_inset CommandInset citation
LatexCommand citep
key "Goodwin2006-MnO"

\end_inset


\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="center" valignment="top" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
O
\begin_inset script superscript

\begin_layout Plain Layout
2
\begin_inset Formula $-$
\end_inset


\end_layout

\end_inset

 @ 
\begin_inset Formula $(0.5,0,0)$
\end_inset


\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="center" valignment="top" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
\begin_inset Formula $\bm{m}_{1}=\frac{\mu}{\sqrt{6}}(1,1,-2)$
\end_inset

, 
\begin_inset Formula $\bm{m}_{2}=\frac{\mu}{\sqrt{6}}(-1,-1,2)$
\end_inset


\begin_inset CommandInset citation
LatexCommand citep
key "Goodwin2006-MnO"

\end_inset


\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="center" valignment="top" bottomline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
\begin_inset Formula $\bm{k}=(\uppi,\uppi,\uppi)$
\end_inset


\end_layout

\end_inset
</cell>
</row>
</lyxtabular>

\end_inset


\end_layout

\begin_layout Plain Layout
\begin_inset Caption

\begin_layout Plain Layout
Manganese(II) oxide structural parameters for a simplified version of the
 structure based on a face-centred cubic lattice.
 The basis vector 
\begin_inset Formula $\bm{m}_{1}$
\end_inset

 applies to the Mn at 
\begin_inset Formula $(0,0,0)$
\end_inset

, whilst 
\begin_inset Formula $\bm{m}_{2}$
\end_inset

 concerns the symmetry-equivalent Mn sites at 
\begin_inset Formula $(0,0.5,0.5)$
\end_inset

, 
\begin_inset Formula $(0.5,0,0.5)$
\end_inset

 and 
\begin_inset Formula $(0.5,0.5,0)$
\end_inset

; the propagation vector 
\begin_inset Formula $\bm{k}$
\end_inset

 applies to all Mn atoms.
\begin_inset CommandInset label
LatexCommand label
name "tab:mno-structure-simple"

\end_inset


\end_layout

\end_inset


\end_layout

\end_inset


\end_layout

\begin_layout Standard
Manganese(II) oxide is considered an archetypal antiferromagnet.
 In 1949, neutron scattering from MnO was used to detect the first incontroverti
ble experimental evidence for antiferromagnetism
\begin_inset CommandInset citation
LatexCommand citep
key "Shull1949-MnO"

\end_inset

.
 It comprises 
\begin_inset Formula $S=\frac{5}{2}$
\end_inset

 Mn
\begin_inset script superscript

\begin_layout Plain Layout
2+
\end_layout

\end_inset

 ions and 
\begin_inset Formula $S=0$
\end_inset

 O
\begin_inset script superscript

\begin_layout Plain Layout
2
\begin_inset Formula $-$
\end_inset


\end_layout

\end_inset

 ions arranged in a rock salt structure.
 Below 
\begin_inset Formula $T_{\mathrm{N}}=\SI{118}{\kelvin}$
\end_inset

, the material enters a state of long-range magnetic order; the size of
 the unit cell doubles as the Mn moments antialign, with ferromagnetic sheets
 of Mn along 
\begin_inset Formula $[1\,1\,1]$
\end_inset

 planes.
 A simplified picture of the MnO magnetic unit cell is shown in 
\begin_inset CommandInset ref
LatexCommand formatted
reference "fig:mno-structure"

\end_inset

, and the parameters associated with this approximate structure can be seen
 in 
\begin_inset CommandInset ref
LatexCommand formatted
reference "tab:mno-structure-simple"

\end_inset

.
\end_layout

\begin_layout Standard
With hindsight, MnO is not as perfect an archetype as might be supposed.
 Rather than being a Heisenberg antiferromagnet on a cubic lattice, the
 transition to long-range magnetic order is associated with a degree of
 structural distortion---a stretching along the 
\begin_inset Formula $[1\,1\,1]$
\end_inset

 direction in the original stucture---which reduces the symmetry to rhombohedral
\begin_inset CommandInset citation
LatexCommand citep
key "Shaked1988-MnO"

\end_inset

.
 Neutron scattering allows the moment direction to be constrained; the Mn
 spin vectors lie within the ferromagnetic planes
\begin_inset CommandInset citation
LatexCommand citep
key "Shaked1988-MnO"

\end_inset

.
 Modelling recent high-resolution total scattering neutron data with reverse
 Monte Carlo simulations suggests further small deviations from an idealised
 structure, reducing the symmetry to monoclinic, and suggesting that the
 moment direction lies along the 
\begin_inset Formula $[1\,1\,\bar{2}]$
\end_inset

 direction specifically (again referred to the simplified face-centred cubic
 structure)
\begin_inset CommandInset citation
LatexCommand citep
key "Goodwin2006-MnO"

\end_inset

.
 Even above the transition, MnO behaves somewhat anomalously; there is good
 evidence
\begin_inset CommandInset citation
LatexCommand citep
key "Lidstrom2000-MnO"

\end_inset

 that it exhibits significant spin correlations up to 
\begin_inset Formula $\sim4.5T_{\mathrm{N}}$
\end_inset

, providing further indications that this is not such a simple system as
 is often assumed.
\end_layout

\begin_layout Standard
\begin_inset Float figure
wide false
sideways false
status open

\begin_layout Plain Layout
\align center
\begin_inset Graphics
	filename figures/dipole/mno/mno-dipole-field-graph-simple-vs-c2.eps

\end_inset


\end_layout

\begin_layout Plain Layout
\begin_inset Caption

\begin_layout Plain Layout
The dipole-field distributions inside the unit cell of MnO with two different
 crystallographic structures.
 The face-centred cubic structure, space group Fm
\begin_inset Formula $\bar{3}$
\end_inset

m, is denoted by the dashed blue line, whilst the monoclinic structure,
 space group C2, is denoted by the solid black line.
 The green shaded region shows the dipole field actually observed, 
\begin_inset Formula $\nu=\SI{220}{\MHz}$
\end_inset

.
\begin_inset CommandInset label
LatexCommand label
name "fig:mno-dipole-fm3m-vs-c2"

\end_inset


\end_layout

\end_inset


\end_layout

\begin_layout Plain Layout

\end_layout

\end_inset


\begin_inset Float figure
wide false
sideways false
status open

\begin_layout Plain Layout
\align center
\begin_inset Graphics
	filename figures/dipole/mno/mno-dipole-field-graph.eps

\end_inset


\end_layout

\begin_layout Plain Layout
\begin_inset Caption

\begin_layout Plain Layout
Dipole-field distributions in the unit cell of the full, low-symmetry crystal
 structure of MnO with a variety of different restrictions on muon position.
 The dotted black line, 
\begin_inset Formula $\bm{r}_{\murm}$
\end_inset

 unconstrained, assumes that the muon can stop anywhere, and is identical
 to the appropriate line in 
\begin_inset CommandInset ref
LatexCommand formatted
reference "fig:mno-dipole-fm3m-vs-c2"

\end_inset

.
 The solid red line, 
\begin_inset Formula $\num{0.09}\leq r_{\murm\text{--O}}\leq\SI{0.11}{\nm}$
\end_inset

, represents those points where the muon is approximately 
\begin_inset ERT
status open

\begin_layout Plain Layout


\backslash
SI{0.1}{
\backslash
nm}
\end_layout

\end_inset

 from an oxygen ion.
 Adding the further constraint that the muon must stop far from a manganese,
 
\begin_inset Formula $r_{\murm\text{--Mn}}>\SI{0.17}{\nm}$
\end_inset

, gives rise to the third, purple dashed line.
 Finally, interstitial sites are identified by choosing those positions
 where the muon is far from all atoms, 
\begin_inset Formula $r_{\murm\text{--any}}>\SI{0.17}{\nm}$
\end_inset

, giving the dashed blue line.
\begin_inset CommandInset label
LatexCommand label
name "fig:mno-dipole-constraints"

\end_inset


\end_layout

\end_inset


\end_layout

\begin_layout Plain Layout

\end_layout

\end_inset


\end_layout

\begin_layout Standard
However, dipole-field simulations on this material do go some way to providing
 a self-consistent picture.
 Zero-field 
\begin_inset ERT
status collapsed

\begin_layout Plain Layout


\backslash
muSR
\backslash
 
\end_layout

\end_inset

 experiments
\begin_inset CommandInset citation
LatexCommand citep
key "Uemura1984-MnO"

\end_inset

 find a single muon precession frequency of 
\begin_inset Formula $\nu=\SI{154}{\MHz}$
\end_inset

, suggesting 
\begin_inset Formula $B=\SI{1.14}{\tesla}$
\end_inset

.
 From the Knight shift in the paramagnetic phase
\begin_inset CommandInset citation
LatexCommand citep
key "Uemura1981-Knight-MnO"

\end_inset

, the hyperfine field is estimated to be 
\begin_inset Formula $B_{\mathrm{hyperfine}}=\SI{-0.48}{\tesla}$
\end_inset

.
 Since other components of the local field would be expected to be zero,
 we estimate that the dipole field being sought is 
\begin_inset Formula $B_{\mathrm{dipole}}=\SI{1.62}{\tesla}$
\end_inset

, equivalent to a muon precession frequency of 
\begin_inset Formula $\nu=\SI{220}{\MHz}$
\end_inset

.
\end_layout

\begin_layout Standard
The first result is that dipole-field distributions are relatively insensitive
 to the slight changes in the crystal structure.
 This is illustrated in 
\begin_inset CommandInset ref
LatexCommand formatted
reference "fig:mno-dipole-fm3m-vs-c2"

\end_inset

, where the dipole fields arising from the face-centred cubic, simplified
 structure are compared with the more precise monoclinic structure found
 in Ref.
\begin_inset space ~
\end_inset


\begin_inset CommandInset citation
LatexCommand citealp
key "Goodwin2006-MnO"

\end_inset

.
 The reduction in symmetry smooths over some of the Van Hove singularities,
 and moves others: given their intimate relationship with positions of high
 symmetry
\begin_inset CommandInset citation
LatexCommand citep
key "Blundell2009-dipolefielddistributions"

\end_inset

, this is perhaps unsurprising.
 The high-field tail, corresponding to muons which stop near a Mn
\begin_inset script superscript

\begin_layout Plain Layout
2+
\end_layout

\end_inset

 ion, is shared by both.
 The shaded region on the graph corresponds to 
\begin_inset Formula $\nu=\SI{220}{\MHz}$
\end_inset

: even without any constraints on muon position, this appears to be close
 to the most likely frequency to be observed.
\end_layout

\begin_layout Standard
The next stage of the analysis is to constrain the muon site to plausible
 positions.
 The results of this process are shown in 
\begin_inset CommandInset ref
LatexCommand formatted
reference "fig:mno-dipole-constraints"

\end_inset

.
 Adding the constraint that the muon should sit 
\begin_inset Formula $\num{0.09}\leq r_{\murm\text{--O}}\leq\SI{0.11}{\nm}$
\end_inset

 from an oxygen restricts possible positions to around 
\begin_inset ERT
status collapsed

\begin_layout Plain Layout


\backslash
SI{11}{
\backslash
percent}
\end_layout

\end_inset

 of the MnO unit cell volume.
 The main effect of this restriction is to reduce the number of muon sites
 particularly near to a manganese spin site, which significantly squashes
 the pdf's high-field tail.
 Adding the constraint that the muon must also sit far from a manganese
 site (
\begin_inset Formula $r_{\murm\text{--Mn}}>\SI{0.17}{\nm}$
\end_inset

) restricts it to 
\begin_inset ERT
status collapsed

\begin_layout Plain Layout


\backslash
SI{2.5}{
\backslash
percent}
\end_layout

\end_inset

 of the unit cell.
 This eradicates the high-field tail entirely, and rather radically changes
 the shape of the distribution.
 Indeed, the most likely muon precession frequencies from this set of constraint
s lie in two peaks either side of that actually observed! A final simple
 method of identifying likely muon sites is to look for interstitial sites
 by constraining the muon to lie far from 
\emph on
all
\emph default
 atoms in the structure: setting 
\begin_inset Formula $r_{\murm\text{--any}}>\SI{0.17}{\nm}$
\end_inset

 leaves 
\begin_inset ERT
status collapsed

\begin_layout Plain Layout


\backslash
SI{5}{
\backslash
percent}
\end_layout

\end_inset

 of the structure available for occupation by muons, and creates a slightly
 different distribution, again peaked around the observed precession frequency.
\end_layout

\begin_layout Standard
Though this picture of the MnO magnetic and crystal structure therefore
 forms a consistent narrative when coupled with the muon measurements of
 total local field and hyperfine field, this story is not tightly constrained.
 The distribution of precession frequencies stretches from 
\begin_inset ERT
status collapsed

\begin_layout Plain Layout


\backslash
num{50}
\end_layout

\end_inset

 to 
\begin_inset ERT
status collapsed

\begin_layout Plain Layout


\backslash
SI{350}{
\backslash
MHz}
\end_layout

\end_inset

 even when the possible muon positions are restricted to the interstitial
 
\begin_inset ERT
status collapsed

\begin_layout Plain Layout


\backslash
SI{5}{
\backslash
percent}
\end_layout

\end_inset

 of the unit cell.
 This means it is possible to neglect the hyperfine contribution entirely
 and still conclude that the muon stops at this plausible interstitial site,
 as appears to have been erroneously performed in Ref.
\begin_inset space ~
\end_inset


\begin_inset CommandInset citation
LatexCommand citealp
key "Nishiyama1997-NiO-CoO-muSR"

\end_inset

.
 The large distribution of fields at the likely sites will almost certainly
 persist for other potential moment orientations, which makes this a poor
 constraint on magnetic structure too.
 The consistency of the dipole-field simulation with neutron scattering
 data thus provides some corroboration for both, but this analysis also
 indicates some of the potential shortcomings of the technique: the large
 possible effect of hyperfine fields, and the potential for dipole fields
 to provide only a weak constraint on the system under study.
\end_layout

\begin_layout Subsection
Bayes' theorem
\end_layout

\begin_layout Standard
Bayes' theorem
\begin_inset CommandInset citation
LatexCommand citep
key "Bayes1763,Sivia2006-Bayes"

\end_inset

 is a mathematical relationship allowing inversion of conditional probabilities.
 A 
\emph on
conditional probability
\emph default
 is one such as 
\begin_inset Formula $P(\mathsf{A}|\mathsf{B}$
\end_inset

), the probability of an event 
\begin_inset Formula $\mathsf{A}$
\end_inset

 occurring given that event 
\begin_inset Formula $\mathsf{B}$
\end_inset

 has occurred.
 The 
\emph on
joint probability
\emph default
 
\begin_inset Formula $P(\mathsf{A}\cap\mathsf{B})$
\end_inset

 is the probability of 
\begin_inset Formula $\mathsf{A}$
\end_inset

 and 
\begin_inset Formula $\mathsf{B}$
\end_inset

 both happening, and is given by the probability of 
\family roman
\series medium
\shape up
\size normal
\emph off
\bar no
\strikeout off
\uuline off
\uwave off
\noun off
\color none

\begin_inset Formula $\mathsf{B}$
\end_inset

 occuring, multiplied by the probability of 
\begin_inset Formula $\mathsf{A}$
\end_inset

 occurring given that 
\begin_inset Formula $\mathsf{B}$
\end_inset

 did,
\begin_inset Formula 
\begin{equation}
P(\mathsf{A}\cap\mathsf{B})=P(\mathsf{B})P(\mathsf{A}|\mathsf{B}).\label{eq:P(AandB)}
\end{equation}

\end_inset

The reverse,
\begin_inset Formula 
\begin{equation}
P(\mathsf{A}\cap\mathsf{B})=P(\mathsf{A})P(\mathsf{B}|\mathsf{A}),\label{eq:P(BandA)}
\end{equation}

\end_inset

also holds.
 Now, in the case of some set of mutually-exclusive events 
\begin_inset Formula $\{\mathsf{A}_{i}\}$
\end_inset

 such that
\begin_inset Formula 
\begin{equation}
\sum_{i}P(\mathsf{A}_{i})=1,
\end{equation}

\end_inset

we can write the probability of some other event 
\begin_inset Formula $\mathsf{B}$
\end_inset

 as
\begin_inset Formula 
\begin{equation}
P(\mathsf{B})=\sum_{i}P(\mathsf{B}|\mathsf{A}_{i})P(\mathsf{A}_{i}).
\end{equation}

\end_inset

Thus, given a hypothesis 
\begin_inset Formula $\mathsf{H}$
\end_inset

, it is usually possible to compute the likelihood of a given experimental
 observation 
\begin_inset Formula $\mathsf{O}$
\end_inset

 given the truth of that hypothesis, i.e.
 
\begin_inset Formula $P(\mathsf{O}|\mathsf{H})$
\end_inset

.
 However, given that in science our hypotheses must bend to reality rather
 than the other way around, we actually wish to evaluate the probability
 of a hypothesis being true 
\family default
\series default
\shape default
\size default
\emph on
\bar default
\strikeout default
\uuline default
\uwave default
\noun default
\color inherit
given
\emph default
 the known empirical evidence, i.e.
 
\family roman
\series medium
\shape up
\size normal
\emph off
\bar no
\strikeout off
\uuline off
\uwave off
\noun off
\color none

\begin_inset Formula $P(\mathsf{H}|\mathsf{O})$
\end_inset

.
 It is in this context that we wish to reverse conditional probabilities,
 and thus we turn to Bayes' theorem.
\end_layout

\begin_layout Standard
Bayes' theorem expresses the probability of an event 
\begin_inset Formula $\mathsf{A}$
\end_inset

 given the occurence of an event 
\begin_inset Formula $\mathsf{B}$
\end_inset

 as
\begin_inset Formula 
\begin{equation}
P(\mathsf{A}|\mathsf{B})=\frac{P(\mathsf{B}|\mathsf{A})P(\mathsf{A})}{P(\mathsf{B})}.\label{eq:bayes-theorem}
\end{equation}

\end_inset

It is obtained simply by setting 
\begin_inset CommandInset ref
LatexCommand formatted
reference "eq:P(AandB)"

\end_inset

 equal to 
\begin_inset CommandInset ref
LatexCommand formatted
reference "eq:P(BandA)"

\end_inset

.
 Here, 
\family roman
\series medium
\shape up
\size normal
\emph off
\bar no
\strikeout off
\uuline off
\uwave off
\noun off
\color none

\begin_inset Formula $P(\mathsf{A})$
\end_inset

 is the 
\family default
\series default
\shape default
\size default
\emph on
\bar default
\strikeout default
\uuline default
\uwave default
\noun default
\color inherit
prior probability
\emph default
 or the 
\emph on
prior
\emph default
, and represents the probability of 
\begin_inset Formula $\mathsf{A}$
\end_inset

 occurring without knowledge of the occurrence or otherwise of 
\begin_inset Formula $\mathsf{B}$
\end_inset

.
 The derived quantity 
\begin_inset Formula $P(\mathsf{A}|\mathsf{B})$
\end_inset

 is then the 
\emph on
posterior probability
\emph default
.
 
\begin_inset Formula $P(\mathsf{B})$
\end_inset

 can be considered a normalising constant, taking into account the likelihood
 of 
\begin_inset Formula $\mathsf{B}$
\end_inset

 occurring at all.
\end_layout

\begin_layout Standard
The theorem's applications are diverse and its results often counter-intuitive:
 it has been turned to assessing the usefulness of medical screening; to
 provide a rigorous method of combining evidence in criminal trials
\begin_inset CommandInset citation
LatexCommand citep
key "Dawid1996-Bayes-forensics"

\end_inset

; as an alternative to potentially misleading significance tests
\begin_inset CommandInset citation
LatexCommand citep
key "Ambaum2010-Bayes-significance-climate"

\end_inset

; and may even provide a quantitative formulation of the scientific method
 itself.
\end_layout

\begin_layout Standard
To take the example of medical screening, imagine we have a test for a medical
 condition with false positive and false negative rates which are both 
\begin_inset ERT
status collapsed

\begin_layout Plain Layout


\backslash
SI{1}{
\backslash
percent}
\end_layout

\end_inset

.
 The probability that is sought is then of 
\begin_inset Formula $\mathsf{A}$
\end_inset

 (having the disease) given 
\begin_inset Formula $\mathsf{B}$
\end_inset

 (a positive result on the test).
 Let us consider two scenarios: a common disease suffered by 
\begin_inset Formula $P(\mathsf{A})=\SI{5}{\percent}$
\end_inset

 of the population, and a rare condition afflicting only 
\begin_inset Formula $P(\mathsf{A})=\SI{0.1}{\percent}$
\end_inset

.
 The probability of receiving a positive result on the test is then the
 probability of being correctly identified as having the condition, or incorrect
ly identified as not having it, 
\begin_inset Formula 
\begin{equation}
P(\mathsf{B})=P(\mathsf{B}|\mathsf{A})P(\mathsf{A})+P(\mathsf{B}|\mathrm{not\;}\mathsf{A})P(\mathrm{not\;}\mathsf{A}).\label{eq:false-positives}
\end{equation}

\end_inset

Thus, for the common disease 
\begin_inset Formula $P(\mathsf{B})=0.99\times0.05+0.01\times0.95=0.059$
\end_inset

, whilst for the rare disease 
\family roman
\series medium
\shape up
\size normal
\emph off
\bar no
\strikeout off
\uuline off
\uwave off
\noun off
\color none

\begin_inset Formula $P(\mathsf{B})=0.99\times0.001+0.01\times0.999=0.01098$
\end_inset

.
 Finally, Bayes' theorem gives 
\begin_inset Formula $P(\mathsf{A}|\mathsf{B})=\SI{84}{\percent}$
\end_inset

 for the common disease, but only 
\begin_inset Formula $P(\mathsf{A}|\mathsf{B})=\SI{9}{\percent}$
\end_inset

 for the rare one: given a positive test result for a given condition, a
 patient is significantly more likely to have a common condition than a
 rare one.
 This might seem counter-intuitive because in both cases the test is extremely
 and equally accurate.
 However, when the error rate becomes comparable with the prevalence of
 what is being tested for, probability dictates that mistaken test results
 will begin to outnumber actual sufferers.
 This does not totally invalidate medical testing for uncommon diseases,
 however, as a 
\begin_inset ERT
status collapsed

\begin_layout Plain Layout


\backslash
SI{9}{
\backslash
percent}
\end_layout

\end_inset

 likelihood of actually having the disease is a significant increase in
 certainty over that possessed before the test was carried out.
\end_layout

\begin_layout Standard
When Bayes' theorem is employed in the task of testing scientific hypotheses,
 it implies that extraordinary claims require extraordinary evidence.
 The less likely your hypothesis is 
\emph on
a priori
\emph default
, the stronger the corroboration required to prove it to a given level of
 certainty.
 The challenge is to provide a reasonable estimate of these 
\emph on
a priori
\emph default
 probabilities (i.e.
\begin_inset space ~
\end_inset

the priors) in this case.
 For a sufficiently fundamental hypothesis, this could entail a complex
 metaphysical problem.
\end_layout

\begin_layout Standard
It is also possible to reformulate Bayes' theorem for continuous probability
 distributions.
 Suppose we wish to extract the probability density function 
\begin_inset Formula $f_{X}$
\end_inset

 of a random variable 
\begin_inset Formula $X$
\end_inset

 given an observed value of an experimental parameter 
\begin_inset Formula $Y$
\end_inset

, itself a continuous random variable with pdf 
\begin_inset Formula $f_{Y}$
\end_inset

, 
\begin_inset Formula 
\begin{equation}
f_{X}(x\mid Y=y)=\frac{f_{X}(x)\cdot f_{Y}(y\mid X=x)}{f_{Y}(y)},\label{eq:Bayes-pdf}
\end{equation}

\end_inset

where dividing by 
\begin_inset Formula $f_{Y}(y)$
\end_inset

 ensures that the resulting pdf integrates to unity.
\end_layout

\begin_layout Subsection
Application to dipole-field simulation
\end_layout

\begin_layout Standard
In a sample under study with 
\begin_inset ERT
status collapsed

\begin_layout Plain Layout


\backslash
muSR 
\end_layout

\end_inset

, we can combine those facts already known about the system with the 
\begin_inset ERT
status collapsed

\begin_layout Plain Layout


\backslash
muSR
\backslash
 
\end_layout

\end_inset

 results using Bayes' theorem to infer further information.
 The crucial element in this kind of analysis is to be rigorous in assuming
 prior probabilities.
\end_layout

\begin_layout Standard
The most unambiguous information extracted by a muon experiment is the set
 of one or more precession frequencies extrapolated to zero temperature,
 
\begin_inset Formula $\{\nu_{i}(T=0)\}$
\end_inset

, which correspond to magnetic fields which are present at some position
 inside the sample.
 Positions are generated at random inside the unit cell to minimise any
 sampling artefacts, and those which do not satisfy muon site constraints
 are discarded.
 Dipole fields at these positions are evaluated and stored, and finally
 gathered into a histogram, representing a pdf of potential frequencies.
 If the magnetic structure is already known, this acts as a consistency
 check.
 However, if aspects of the magnetic structure are unknown, Bayes' theorem
 can be employed to narrow the possibilities.
 The pdf can be recalculated for variant structures and the likelihood of
 obtaining the observed frequencies can be calculated.
 The structure in which it is most likely that the observed frequencies
 be seen is then the most likely structure.
 The prior probabilities chosen should reflect bounds on quantities known
 from other experimental techniques, or the wider body of scientific knowledge.
 For example, the magnetisation direction may be known from other measurements,
 and so only moments orientated along this axis need be investigated; or
 if measuring moment size in an 
\begin_inset Formula $S=\frac{1}{2}$
\end_inset

 system, it would be extremely surprising to find 
\begin_inset Formula $\mu=10\mu_{\mathrm{B}}$
\end_inset

, and a prior pdf 
\begin_inset Formula $f(\mu)$
\end_inset

 should reflect this.
\end_layout

\begin_layout Standard
Obtaining bounds on quantities of interest, or extracting an approximate
 shape of a pdf, may only require dipole fields to be evaluated at a few
 thousand points in the unit cell.
 Evaluating a smooth, well-resolved pdf complete with Van Hove singularities
 and so forth can require tens or hundreds of millions of points to be evaluated
 (and, given the inherent unknowns in the problem, such calculations may
 well be spuriously precise).
 Though this method has been adopted in this thesis, it is possible that
 smoothing lower-resolution pdfs, perhaps by convolution with a function
 representing other unknowns, would provide a truer representation of the
 uncertainties in these problems.
\end_layout

\begin_layout Standard
The technique is most easily illustrated with examples, and as such a sample
 Bayesian calculation of the known magnetic moment in manganese oxide follows.
 Other examples include moment size and orientation in Ba
\begin_inset script subscript

\begin_layout Plain Layout
2
\end_layout

\end_inset


\emph on
M
\emph default
OsO
\begin_inset script subscript

\begin_layout Plain Layout
6
\end_layout

\end_inset

, which are estimated using this technique in 
\begin_inset CommandInset ref
LatexCommand formatted
reference "chap:Ba2MOsO6"

\end_inset

, and moment size in the [
\emph on
M
\emph default
(HF
\begin_inset Formula $_{\text{2}}$
\end_inset

)(pyz)
\begin_inset Formula $_{\text{2}}$
\end_inset

]
\emph on
X
\emph default
 series of molecular magnets, which is derived in 
\begin_inset CommandInset ref
LatexCommand formatted
reference "chap:cuhf2pyz2x"

\end_inset

.
\end_layout

\begin_layout Subsection
Bayesian analysis of MnO
\end_layout

\begin_layout Standard
We can apply the Bayesian dipole-field analysis technique to estimate the
 moment size in manganese oxide.
 The experimentally-observed quantity is the muon precession frequency 
\begin_inset Formula $\nu=\SI{220}{\MHz}$
\end_inset

.
 We then make the plausible assumption that the muon is likely to stop in
 an interstitial position, as defined by 
\begin_inset Formula $r_{\murm\text{--any}}>\SI{0.17}{\nm}$
\end_inset

.
 Given that we are now taking the moment size as unknown, the pdf of dipole
 fields is re-evaluated in units of 
\begin_inset Formula $\si{\MHz}/\mu_{\mathrm{B}}$
\end_inset

, giving rise to a new pdf 
\begin_inset Formula $f(\nu/\mu)$
\end_inset

.
 (Since dipole fields scale with the size of the moment, this is simply
 the pdf of dipole fields shown in 
\begin_inset CommandInset ref
LatexCommand formatted
reference "fig:mno-dipole-constraints"

\end_inset

 appropriately scaled.)
\end_layout

\begin_layout Standard
\begin_inset Float figure
wide false
sideways false
status open

\begin_layout Plain Layout
\align center
\begin_inset Graphics
	filename figures/dipole/mno/mno-bayes.eps

\end_inset


\end_layout

\begin_layout Plain Layout
\begin_inset Caption

\begin_layout Plain Layout
A Bayesian derivation of the magnetic moment 
\begin_inset Formula $\mu$
\end_inset

 on the manganese ions in MnO.
 (a) The pdf of observed muon precession frequency 
\begin_inset Formula $\nu$
\end_inset

 per unit moment 
\begin_inset Formula $\mu$
\end_inset

.
 (b) The resulting probability distribution of 
\begin_inset Formula $\mu$
\end_inset

, with the value of 
\begin_inset Formula $\mu=5.65\mu_{\mathrm{B}}$
\end_inset

 marked.
\begin_inset CommandInset label
LatexCommand label
name "fig:mno-bayes"

\end_inset


\end_layout

\end_inset


\end_layout

\begin_layout Plain Layout

\end_layout

\end_inset


\end_layout

\begin_layout Standard
Since 
\begin_inset Formula $\nu$
\end_inset

 is obtained from experiment, what we would like to know is 
\begin_inset Formula $g(\mu\vert\nu)$
\end_inset

, the pdf of manganese moment 
\begin_inset Formula $\mu$
\end_inset

 
\shape italic
given
\shape default
 the observed 
\begin_inset Formula $\nu$
\end_inset

.
 This can be obtained from our calculated 
\begin_inset Formula $f(\nu/\mu)$
\end_inset

 using Bayes' theorem
\begin_inset CommandInset citation
LatexCommand cite
key "Sivia2006-Bayes"

\end_inset

, which yields 
\begin_inset Formula 
\begin{equation}
g(\mu\vert\nu)=\frac{\frac{1}{\mu}f(\nu/\mu)}{\int_{0}^{\mu_{\mathrm{max}}}\frac{1}{\mu^{\prime}}f(\nu/\mu^{\prime})\,\mathrm{d}\mu^{\prime}}\,,
\end{equation}

\end_inset

where we have assumed a prior probability for the manganese moment that
 is uniform between zero and 
\begin_inset Formula $\mu_{\mathrm{max}}$
\end_inset

.
 We take 
\begin_inset Formula $\mu_{\mathrm{max}}=10\mu_{\mathrm{B}}$
\end_inset

, although the results are insensitive to the precise value of 
\begin_inset Formula $\mu_{\mathrm{max}}$
\end_inset

 as long as it is reasonably large.
 In fact, we evaluate
\end_layout

\begin_layout Standard
\begin_inset Formula 
\begin{equation}
g(\mu\vert\nu)\propto\int_{\nu-\Delta\nu}^{\nu+\Delta\nu}f(\nu/\mu)\,\mathrm{d}\nu\,,\label{eq:g(mu)-mno}
\end{equation}

\end_inset

where, in the absence of any quantitative uncertainty estimation in Ref.
\begin_inset space ~
\end_inset


\begin_inset CommandInset citation
LatexCommand citealp
key "Uemura1984-MnO"

\end_inset

, 
\begin_inset Formula $\Delta\nu$
\end_inset

 is a 
\begin_inset ERT
status collapsed

\begin_layout Plain Layout


\backslash
SI{5}{
\backslash
percent}
\end_layout

\end_inset

 error on the extracted frequency.
 The relevant pdfs are shown in 
\begin_inset CommandInset ref
LatexCommand formatted
reference "fig:mno-bayes"

\end_inset

; first, the muon precession frequency per unit magnetic moment, and secondly
 the magnetic moment calculated given the experimentally-derived frequency
 
\begin_inset Formula $\nu=\SI{220}{\MHz}$
\end_inset

.
 The peak of this probability distribution clearly lies near the 
\begin_inset Formula $\mu=5.65\mu_{\mathrm{B}}$
\end_inset

 marked: given that the pdf of muon precession frequency shown in 
\begin_inset CommandInset ref
LatexCommand formatted
reference "fig:mno-dipole-constraints"

\end_inset

 peaks at the experimentally-derived frequency given an assumed 
\begin_inset Formula $\mu=5.65\mu_{\mathrm{B}}$
\end_inset

, this result is unsurprising.
\end_layout

\begin_layout Section
\begin_inset ERT
status collapsed

\begin_layout Plain Layout


\backslash
mmcalc
\end_layout

\end_inset


\begin_inset CommandInset label
LatexCommand label
name "sec:mmcalc"

\end_inset


\end_layout

\begin_layout Standard
I have developed 
\begin_inset ERT
status collapsed

\begin_layout Plain Layout


\backslash
mmcalc 
\end_layout

\end_inset

, a piece of software for dipole-field analysis.
 It is written using Python
\begin_inset CommandInset citation
LatexCommand citep
key "Python"

\end_inset

, a high-level, cross-platform scripting language, which allows it to be
 run without compilation on Linux/Unix, Windows and Mac systems.
 
\begin_inset ERT
status collapsed

\begin_layout Plain Layout


\backslash
mmcalc
\backslash
 
\end_layout

\end_inset

 combines a text-based user interface with a 3D display window, making visual
 verification of crystal and magnetic structures, as well as generated dipole
 fields, simple for users.
 The program supports all space groups on the Bilbao crystallographic server
\begin_inset CommandInset citation
LatexCommand citep
key "Bilbao-crystallographic-server"

\end_inset

, and can import crystal structures in the widely-used CIF (Crystallographic
 Information File) format
\begin_inset CommandInset citation
LatexCommand citep
key "Brown2002-CIF"

\end_inset

.
 Magnetic structures are input using the powerful magnetic propagation vector
 formalism described in 
\begin_inset CommandInset ref
LatexCommand formatted
reference "chap:magnetic-propagation-vector"

\end_inset

 which allows any periodic magnetic structure, from a simple antiferromagnet
 to a complex, incommensurate spin-density wave, to be described compactly.
 
\begin_inset ERT
status collapsed

\begin_layout Plain Layout


\backslash
mmcalc
\backslash
 
\end_layout

\end_inset

 can then be used to perform convergence testing, as outlined in 
\begin_inset CommandInset ref
LatexCommand formatted
reference "sec:lorentz-spheres"

\end_inset

, before calculating dipole fields using the Lorentz spheres of dipoles
 at specified points, on a grid, or at randomly-generated points, with the
 ability to filter by muon site constraints relative to atoms in the crystal
 structure.
 Frequency histograms can then be exported, and Bayesian analysis performed.
 It is also possible to export crystal structure and dipole-field images
 in POV-Ray
\begin_inset CommandInset citation
LatexCommand citep
key "POV-Ray"

\end_inset

 format, for rendering publication-quality 3D graphics.
 Atom sizes, colours and transparencies can be varied, bonds added, and
 extraneous parts of the structure can be deleted for clarity.
\end_layout

\begin_layout Standard
\begin_inset Float figure
wide false
sideways false
status open

\begin_layout Plain Layout
\align center
(a) 
\begin_inset space \hspace{}
\length 14cm
\end_inset


\end_layout

\begin_layout Plain Layout
\align center
(b) 
\begin_inset Graphics
	filename figures/dipole/mmcalc/mmcalc-crystal-ubuntu.png
	lyxscale 50
	width 14cm
	groupId mmcalc-screenshots

\end_inset


\end_layout

\begin_layout Plain Layout
\align center
(c) 
\begin_inset Graphics
	filename figures/dipole/mmcalc/mmcalc-dipole-windows.png
	lyxscale 50
	width 14cm
	groupId mmcalc-screenshots

\end_inset


\end_layout

\begin_layout Plain Layout
\align center
\begin_inset space ~
\end_inset


\begin_inset space ~
\end_inset


\begin_inset space ~
\end_inset


\begin_inset space ~
\end_inset


\begin_inset Graphics
	filename figures/dipole/mmcalc/mmcalc-visualisation-mac.png
	lyxscale 50
	width 14cm
	groupId mmcalc-screenshots

\end_inset


\end_layout

\begin_layout Plain Layout
\begin_inset Caption

\begin_layout Plain Layout
Screenshots showing 
\begin_inset ERT
status collapsed

\begin_layout Plain Layout


\backslash
mmcalc 
\end_layout

\end_inset

's three main menus.
 (a)
\begin_inset space ~
\end_inset

The crystal and magnetic structure menu, shown along with the 3D Visual
 Python window, which displays the structure entered: in this case, ferromagneti
c Ba
\begin_inset script subscript

\begin_layout Plain Layout
2
\end_layout

\end_inset

NaOsO
\begin_inset script subscript

\begin_layout Plain Layout
6
\end_layout

\end_inset

.
 (b)
\begin_inset space ~
\end_inset

The dipole-field calculation menu.
 The 3D window here shows the volume where a muon may sit if constrained
 to lie approximately 
\begin_inset ERT
status collapsed

\begin_layout Plain Layout


\backslash
SI{0.1}{
\backslash
nm}
\end_layout

\end_inset

 from an oxygen ion in Ba
\begin_inset script subscript

\begin_layout Plain Layout
2
\end_layout

\end_inset

NaOsO
\begin_inset script subscript

\begin_layout Plain Layout
6
\end_layout

\end_inset

.
 (c)
\begin_inset space ~
\end_inset

The visualisation menu allows detailed customisation of the appearance of
 crystal structures to create high-quality figures.
 The 3D window in this case shows the images of the Ba
\begin_inset script subscript

\begin_layout Plain Layout
2
\end_layout

\end_inset

NaOsO
\begin_inset script subscript

\begin_layout Plain Layout
6
\end_layout

\end_inset

 structure seen in 
\begin_inset CommandInset ref
LatexCommand formatted
reference "fig:Ba2NaOsO6-structure"

\end_inset

.
 Images show the program running on Ubuntu Linux
\begin_inset space ~
\end_inset

10, Windows
\begin_inset space ~
\end_inset

7 and Mac OS
\begin_inset space ~
\end_inset

X, respectively.
\end_layout

\end_inset


\end_layout

\end_inset


\end_layout

\begin_layout Standard
\begin_inset ERT
status collapsed

\begin_layout Plain Layout


\backslash
mmcalc
\backslash
 
\end_layout

\end_inset

 has been used for all dipole-field calculations performed in this thesis,
 and has also been used to produce all crystal structure diagrams included
 herein.
 Source code, installation notes and documentation are available online
\begin_inset CommandInset citation
LatexCommand citep
key "mmcalc"

\end_inset

.
\end_layout

\begin_layout Section
Future work
\begin_inset CommandInset label
LatexCommand label
name "sec:dipole-future"

\end_inset


\end_layout

\begin_layout Standard
Bayesian dipole-field techniques post-dated much of the development of 
\begin_inset ERT
status collapsed

\begin_layout Plain Layout


\backslash
mmcalc 
\end_layout

\end_inset

, and certain applications could enjoy large computational speed increases
 if the program were redesigned with these Bayesian calculations in mind.
 For example, in 
\begin_inset CommandInset ref
LatexCommand formatted
reference "chap:Ba2MOsO6"

\end_inset

, the Ba
\begin_inset script subscript

\begin_layout Plain Layout
2
\end_layout

\end_inset


\emph on
M
\emph default
OsO
\begin_inset script subscript

\begin_layout Plain Layout
6
\end_layout

\end_inset

 system is explored in which a net ferromagnetic moment could arise from
 either true ferromagnetism or a canted antiferromagnetic structure.
 To investigate this, initially parallel moments were rotated whilst keeping
 the net ferromagnetic moment constant (for full details, see 
\begin_inset CommandInset ref
LatexCommand formatted
reference "sub:Ba2NaOsO6-Bayes"

\end_inset

).
 This procedure was computationally expensive, because each incremental
 change in the structure required repeating the vector sum across a large
 Lorentz sphere of dipoles.
 However, a dipole-field program which initially calculated the dipolar
 tensor and stored its values could calculate the effects of changing the
 magnitude and/or direction of moments without repeating the computationally-exp
ensive summation stage.
 This tensor would need to be calculated for each sublattice of moments
 intended to change in value independently.
 It may be useful to use the tensor evaluated in spherical polar coordinates,
 allowing the moments to be specified in terms of size and direction.
\end_layout

\begin_layout Standard
Another possibility would be investigating the consequences of different
 muon site constraints.
 All work in this thesis assumes simple spherical shells of potential muon
 sites at appropriate distances from negative ions, with solid spheres of
 exclusion around positive ones.
 Making the boundaries fuzzier, or somehow weighting the likelihood by electrost
atic potential, might yield improved results.
 It would be important when pursuing this to calibrate against results in
 systems with known magnetic structures, in order that the resulting technique
 had empirical validity and not just alluring complexity.
\end_layout

\end_body
\end_document
