iData_Sqw2D: moments=moments(sqw, M, T, classical): compute Sqw moments/sum rules (harmonic frequencies) m = moments(sqw, M, T, classical) Compute the structure factor (moment 0), recoil energy (moment 1) and the collective, harmonic and mean energy transfer dispersions. Input arguments can be given in order, or with name-value pairs, or as a structure with named fields. 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] 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. syntax: m = moments(sqw) m = moments(sqw, M, T, classical) m = moments(sqw, 'M', M, 'T', T, 'classical', classical) input: sqw: 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 an iData array Example: m = moments(iData_Sqw2D('SQW_coh_lGe.nc'), 72.6, 1235); subplot(m); (c) E.Farhi, ILL. License: EUPL.