moments=Sqw_moments(sqw, M, T, classical): compute Sqw moments (harmonic frequencies) Compute the structure factor (moment 0), recoil energy (moment 1) and the collective, harmonic and mean energy transfer dispersions. The result is given as an iData array with data sets: S(q) = \int S(q,w) dw = <S(q,w)> structure factor [moment 0] Er = \int w*S(q,w) dw = <wS(q,w)> = h2q2/2M recoil energy [moment 1] Wc = sqrt(2kT*Er/S(q)) collective/isothermal dispersion Wl harmonic/longitudinal excitation Wq = 2q*sqrt(kT/S(q)/M) mean energy transfer M2 = <w2S(q,w)> [moment 2] M3 = <w3S(q,w)> [moment 3] M4 = <w4S(q,w)> [moment 4] input: data: Sqw data set e.g. 2D data set with w as 1st axis (rows, meV), q as 2nd axis (Angs-1). M: molar weight of the material atom/molecule in [g/mol]. when omitted or empty, it is searched 'weight' or 'mass' is the object. T: when given, Temperature to use. When not given or empty, the Temperature is searched in the object. The temperature is in [K]. 1 meV=11.605 K. classical: 0 for non symmetric S(q,w) [with Bose, from exp.], 1 for symmetric (from MD) when omitted or empty, this is guessed from the data set when possible output: moments=[ sq M1 wc wl wq M2 M3 M4 ] as iData array Reference: Helmut Schober, Journal of Neutron Research 17 (2014) pp. 109 Lovesey, Theory of Neutron Scattering from Condensed Matter, Vol 1, p180 eq. 5.38 (w0) J-P.Hansen and I.R.McDonald, Theory of simple liquids Academic Press New York 2006. Example: moments = sqw_moments(iData(fullfile(ifitpath,'Data','SQW_coh_lGe.nc'))) (c) E.Farhi, ILL. License: EUPL.