[w, s] = horace(obj, qh, qk, ql,Name,Value)


[w, s] = horace(obj, qh, qk, ql,Name,Value) produces spin wave dispersion and intensity for Horace.


This example creates a d3d object, a square in \((h,k,0)\) plane and in energy between 0 and 10 meV. Then calculates the inelastice neutron scattering intensity of the square lattice antiferromagnet stored in cryst and plots a cut between 4 and 5 meV using the Horace plot command.

cryst = sw_model('squareAF',1)
d3dobj = d3d(,[1 0 0 0],[0,0.02,2],[0 1 0 0],[0,0.02,2],[0 0 0 1],[0,0.1,10])
d3dobj = disp2sqw_eval(d3dobj,@cryst.horace,{'component','Sperp'},0.1)
plot(cut(d3dobj,[],[],[4 5]))

Input Arguments

spinw object.
qh, qk, ql
Reciprocal lattice vectors in reciprocal lattice units.

Name-Value Pair Arguments

Selects the previously calculated intensity component to be convoluted. The possible options are:
  • 'Sperp' convolutes the magnetic neutron scattering intensity (\(\langle S_\perp \cdot S_\perp\rangle\) expectation value). Default value.
  • 'Sab' convolutes the selected components of the spin-spin correlation function. For details see sw_egrid.
If true the spin wave intensity is normalized to mbarn/meV/(unit cell) units. Default is false.
Energy bin size, for intensity normalization. Use 1 for no division by dE in the intensity.
Input parameters (can be used also within Tobyfit). Additional parameters ('mat','selector') might be necessary, for details see spinw.matparser. All extra parameters of spinw.horace will be forwarded to the spinw.matparser function before calculating the spin wave spectrum (or any user written parser function). For user written functions defined with the following header:

the value of the param option will be forwarded. For user functions with variable number of arguments, all input options of spinw.horace will be forwarded. In this case it is recommended to use sw_readparam function to handle the variable number arguments within func().

Parser function of the param input. Default value is @spinw.matparser which can be used directly by Tobyfit. For user defined functions the minimum header has to be:

where obj is an spinw type object, param is the parameter values forwarded from spinw.horace directly.

User function that will be called after the parameters set on the spinw object. It can be used to optimize magnetic structure for the new parameters, etc. The input should be a function handle of a function with a header:
Defines whether to provide text output. The default value is determined by the fid preference stored in swpref. The possible values are:
  • 0 No text output is generated.
  • 1 Text output in the MATLAB Command Window.
  • fid File ID provided by the fopen command, the output is written into the opened file stream.
whether to use the spinw.spinwavefast method or not. This method is similar to spinw.spinwave but calculates only the unpolarised neutron cross-section and ignores all negative energy branches as well as using other shortcuts. In general it should produce the same spectra as spinw.spinwave, with some rounding errors, but can be 2-3 times faster and uses less memory.

Output Arguments

Cell that contains the spin wave energies. Every cell elements contains a vector of spin wave energies for the corresponding input \(Q\) vector.
Cell that contains the calculated element of the spin-spin correlation function. Every cell element contains a vector of intensities in the same order as the spin wave energies in w.

See Also

spinw | spinw.spinwave | spinw.matparser | sw_readparam