Home > Scripts > Models > Factory > sqw_spinw.m

iFit/sqw_spinw

PURPOSE ^

model = sqw_spinw(sw, options) : 3D dispersion(HKL) spin-wave

SYNOPSIS ^

function signal=sqw_spinw(varargin)

DESCRIPTION ^

 model = sqw_spinw(sw, options) : 3D dispersion(HKL) spin-wave

   iFunc/sqw_spinw: a 4D S(q,w) with a 3D HKL dispersion obtained from the
   spinw package from S. Toth. A SpinW object must first be created, and is then
   converted into an iFunc model for HKL evaluation. The intensity is computed
   for a neutron scattering experiment.

 Model creation:
   To create the Model, the following syntax should be used:
       s = sqw_spinw(sq, options);
   or
       s = sqw_spinw('CIF_filename', options);
   with:
       sq:        a spinw object from <a href="https://www.psi.ch/spinw/spinw">SpinW</a>.
          when omitted, use a square lattice Heisenberg Antiferromagnet with S = 1 and J = 1
       options:   a set of options to be used for the Model evaluation (structure)
         options.component: the component to use as intensity, as documented in 
              <a href="matlab:doc sw_egrid">sw_egrid</a>
              Default is 'Sperp'. Suggested is also 'Sxx+Syy+Szz'.

 Model evaluation (once created)
 Once the model is created, you may evaluate it using the standard evaluation call:
   value = s(p, h,k,l,w)
 or
   f=iData(s,s.p,qh,qk,ql,w); % to get an iData object back
 with:
         p: sqw_spinw model parameters (double)
             p(1)=Gamma       energy broadening [meV]
             p(2)=Temperature of the material [K]
             p(3)=Amplitude
             p(4...)= coupling parameters of the Hamiltonian
          or p='guess'
         qh: axis along QH in rlu (row,double)
         qk: axis along QK in rlu (column,double)
         ql: axis along QL in rlu (page,double)
         w:  axis along energy in meV (double)
    signal: when values are given, a guess of the parameters is performed (double)
 output: signal: model value

 Example:
   sq = sw_model('squareAF',2,0);  % create the SW object
   s=sqw_spinw(sq);                % create the Model
   qh=linspace(0.01,1.5,30);qk=qh; ql=qh'; w=linspace(0.01,10,50);
   f=iData(s,s.p,qh,qk,ql,w); plot(log(f(:,:,1,:))); % evaluate and plot

 Reference: https://en.wikipedia.org/wiki/Phonon
 SpinW <https://github.com/tsdev/spinw>
       <https://www.psi.ch/spinw/spinw>
       S. Toth and B. Lake, J. Phys.: Condens. Matter 27, 166002 (2015).

 Version: Aug. 22, 2017
 See also iData, iFunc/fits, iFunc/plot, gauss, sqw_phonons, sqw_cubic_monoatomic, sqw_vaks, sqw_sine3d
   <a href="matlab:doc(iFunc,'Models')">iFunc:Models</a>
 (c) E.Farhi, ILL. License: EUPL.

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:
Generated on Tue 22-Aug-2017 11:03:30 by m2html © 2005. iFit (c) E.Farhi/ILL EUPL 1.1