Home > Objects > iFunc_subclasses > @iFunc_Sqw4D > powder.m

iFit/powder

PURPOSE ^

data = powder(model, p, q, w) : evaluate a 4D S(hkl,w) model/data set into a 2D S(|q|,w) data set for e.g. powders

SYNOPSIS ^

function r=powder(a)

DESCRIPTION ^

 data = powder(model, p, q, w) : evaluate a 4D S(hkl,w) model/data set into a 2D S(|q|,w) data set for e.g. powders

   iFunc/powder:
     The conversion between rlu (in the model) and Angs-1 in the S(q,w) powder 
     data set is done using the B=[a* b* c*] matrix. It is searched as 
       'reciprocal_cell' in the input model.

   The methodology is to cast a number of random points on increasing |Q| spheres.
   These points are converted to the [rlu] space by applying the inverse B matrix
   with B=[a* b* c*]. Then the 4D S(q,w) model is evaluated at these points, and the  
   result is the energy histogram of the bare mode frequencies along all |Q|.

   Once created, the powder Model can be evaluated on a (q,w) range as any 2D model.
   value = model(p, q, w)
   value = iData(model, p, q, w)

 input:
  model: a 4D S(q,w) model (iFunc)

 output: 
  data:  a S(|q|,w) 2D Model

 example:
  s=sqw_phonons([ ifitpath 'Data/POSCAR_Al'],'metal','EMT');
  pow=powder(s); % then plot [q=0:2 w=0:50]
  plot(log(iData(pow,[],linspace(0,4,30),linspace(0,50,51))))

 Version: Nov. 26, 2018
 See also iData, iFunc/fits, iFunc/plot, gauss, sqw_phonons, sqw_cubic_monoatomic, sqw_vaks
   <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 Mon 26-Nov-2018 15:08:42 by m2html © 2005. iFit (c) E.Farhi/ILL EUPL 1.1