Syntax
spectra = sw_xray(spectra,Name,Value)
Description
spectra = sw_xray(spectra,Name,Value) calculates x-ray scattering
intensity for non-resonant inelastic x-ray scattering on phonons.
Input Arguments
spectra- Input structure that contains the displacement-displacement correlation function.
Name-Value Pair Arguments
'formfact'- If true, the magnetic form factor is included in the spin-spin
correlation function calculation. The form factor coefficients are
stored in
obj.unit_cell.ff(1,:,atomIndex). Default value isfalse. 'formfactfun'- Function that calculates the magnetic form factor for given \(Q\) value.
value. Default value is
@sw_mff, that uses a tabulated coefficients for the form factor calculation. For anisotropic form factors a user defined function can be written that has the following header:F = formfactfun(atomLabel,Q)where the parameters are:
Frow vector containing the form factor for every input \(Q\) valueatomLabelstring, label of the selected magnetic atomQmatrix with dimensions of \([3\times n_Q]\), where each column contains a \(Q\) vector in \(Å^{-1}\) units.
'fid'- Defines whether to provide text output. The default value is determined
by the
fidpreference stored in swpref. The possible values are:0No text output is generated.1Text output in the MATLAB Command Window.fidFile ID provided by thefopencommand, the output is written into the opened file stream.
Output Arguments
spectra- Structure that is same as the input with the following additional
fields:
paramInput parameters.Sperp\(S_\perp(i_{mode},\mathbf{Q})\) x-ray scattering cross section, stored in a matrix with dimensions of \([n_{mode n_{hkl}]\).