Home > Applications > SpinW > m_files > sw_parstr.m

iFit/sw_parstr

PURPOSE ^

parses input string

SYNOPSIS ^

function parsed = sw_parstr(strIn, spectra)

DESCRIPTION ^

 parses input string

 parsed = SW_PARSTR(strIn)

 It parses input string containing linear expression of different cross
 sections in strIn.

 Input:

 'Sperp'   convolutes the magnetic neutron scattering intensity
           (<Sperp * Sperp> expectation value). Default.
 'Sab'     convolutes the selected components of the spin-spin correlation
           function. Letter a and b can be 'x', 'y' or 'z'. For example:
           'Sxx' will convolute the xx component of the correlation
           function with the dispersion. xyz is the standard coordinate
           system, see online documentation of sw.
 'Mab'     convolutes the selected components of the spin-spin
           correlation function. Letter a and b can be 'x', 'y' or 'z'.
           For example: 'Sxx' will convolute the xx component of the
           correlation function with the dispersion. The xyz coordinates
           are in the Blume-Maleev coordinate system, see below.
 'Pab'     convolutes the selected element of the polarisation
           matrix. Letter a and b can be 'x', 'y' or 'z'. For example:
           'Pyy' will convolute the yy component of the polarisation
           matrix with the dispersion. The xyz coordinates are in the
           Blume-Maleev coordinate system, see below.
 'Pa'      convolutes the intensity of the simulated polarised
           neutron scattering, with inciden polarisation of Pa. Letter a
           can be 'x', 'y' or 'z'. For example: 'Py' will convolute the
           scattering intensity simulated for incident polarisation Pi ||
           y. The xyz coordinates are in the Blume-Maleev coordinate
           system, see below.

 Any linear combination of the above are allowed, for example: 'Sxx+2*Syy'
 convolutes the linear combination of the xx component of the spin-spin
 correlation function and the yy component.

 The Blume-Maleev coordinate system is a cartesian coordinate system
 with (xBM, yBM and zBM) basis vectors as follows:
           xBM    parallel to the momentum transfer Q,
           yBM    perpendicular to xBM in the scattering plane,
           zBM    perpendicular to the scattering plane.

 Output:

 parsed is struct type, contains the following fields:
 type      Cell contains as many elements as many in the sum. Each element
           is a vector as follows:
           type{idx}(1)    Index of type of cross section:
                           1   Sperp,
                           2   Sab,
                           3   Mab,
                           4   Pab,
                           5   Pa.
           type{idx}(2:3)  Index of the component:
                           1   x,
                           2   y,
                           3   z.

 preFact   Vector contains the values of the prefactors in the sum.
 string    Original input string.

 Test it with:
 <a href="matlab:parsed = sw_parstr('Sxx + Syy')">parsed = sw_parstr('Sxx + Syy')</a>

 See also SW_EGRID, SW.FITSPEC.

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