Sqw = Sab_Sqw(Sqw, M, T) Sab_Sqw: convert a 2D S(q,w) into an S(alpha,beta) suitable for e.g. ENDF/MCNP. The S(alpha,beta) is a representation of the dynamic structure factor using unitless momentum and energy variables defined as: alpha= h2q2/2MkT = (Ei+Ef-2*mu*sqrt(Ei*Ef))/AkT beta = -hw/kT = (Ef-Ei)/kT A = M/m mu = cos(theta) = (Ki.^2 + Kf.^2 - q.^2) ./ (2*Ki.*Kf) input: s: Sqw data set e.g. 2D data set with beta as 1st axis (rows), alpha as 2nd axis (columns). M: molar weight of the atom/molecule in [g/mol]. when omitted or empty, it is searched as '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. output: Sqw: S(alpha,beta) 2D data set (iData) conventions: w = omega = Ei-Ef = energy lost by the neutron [meV] omega > 0, neutron looses energy, can not be higher than Ei (Stokes) omega < 0, neutron gains energy, anti-Stokes references: M. Mattes and J. Keinert, IAEA INDC(NDS)-0470, 2005. R. E. MacFarlane, LA-12639-MS (ENDF-356), 1994. Example: Sqw = iData( fullfile(ifitpath,'Data','SQW_coh_lGe.nc') ); Sab = Sqw_Sab(Sqw,72.6,300); Sqw2= Sab_Sqw(Sab); subplot(log([Sqw Sab Sqw2)) (c) E.Farhi, ILL. License: EUPL.