Home > Applications > Horace > @d3d > change_crystal.m

iFit/change_crystal

PURPOSE ^

Change the crystal lattice and orientation of a d3d object or array of objects

SYNOPSIS ^

function varargout = change_crystal (varargin)

DESCRIPTION ^

 Change the crystal lattice and orientation of a d3d object or array of objects

 Most commonly:
   >> wout = change_crystal (w, rlu_corr)              % change lattice parameters and orientation

 OR
   >> wout = change_crystal (w, alatt)                 % change just length of lattice vectors
   >> wout = change_crystal (w, alatt, angdeg)         % change all lattice parameters
   >> wout = change_crystal (w, alatt, angdeg, rotmat) % change lattice parameters and orientation


 Input:
 -----
   w           Input d3d object

   rlu_corr    Matrix to convert notional rlu in the current crystal lattice to
              the rlu in the the new crystal lattice together with any re-orientation
              of the crystal. The matrix is defined by the matrix:
                       qhkl(i) = rlu_corr(i,j) * qhkl_0(j)
               This matrix can be obtained from refining the lattice and
              orientation with the function refine_crystal (type
              >> help refine_crystal  for more details).
 *OR*
   alatt       New lattice parameters [a,b,c] (Angstroms)
   angdeg      New lattice angles [alf,bet,gam] (degrees)
   rotmat      Rotation matrix that relates crystal Cartesian coordinate frame of the new
              lattice as a rotation of the current crystal frame. Orthonormal coordinates
              in the two frames are related by 
                   v_new(i)= rotmat(i,j)*v_current(j)

 Output:
 -------
   wout        Output d3d object with changed crystal lattice parameters and orientation

 NOTE
  The input data set(s) can be reset to their original orientation by inverting the
  input data e.g.
    - call with inv(rlu_corr)

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