Mantid
Loading...
Searching...
No Matches
Public Member Functions | Static Public Member Functions | Private Member Functions | Private Attributes | List of all members
Mantid::Geometry::OrientedLattice Class Reference

Class to implement UB matrix. More...

#include <Geometry/Crystal/OrientedLattice.h>

Inheritance diagram for Mantid::Geometry::OrientedLattice:
Mantid::Geometry::UnitCell

Public Member Functions

const Kernel::DblMatrixgetModUB () const
 
const Kernel::DblMatrixgetU () const
 Get the U matrix. More...
 
const Kernel::DblMatrixgetUB () const
 Get the UB matrix. More...
 
Kernel::V3D getuVector () const
 gets a vector along beam direction when goniometers are at 0. More...
 
Kernel::V3D getvVector () const
 gets a vector in the horizontal plane, perpendicular to the beam direction when goniometers are at 0. More...
 
Kernel::V3D hklFromQ (const Kernel::V3D &Q) const
 Return hkl from the Q-sample coordinates. More...
 
void loadNexus (::NeXus::File *file, const std::string &group)
 Load the lattice to from an open NeXus file. More...
 
bool operator!= (const OrientedLattice &other) const
 
bool operator== (const OrientedLattice &other) const
 
 OrientedLattice (const double _a, const double _b, const double _c, const double _alpha, const double _beta, const double _gamma, const Kernel::DblMatrix &Umatrix=Kernel::DblMatrix(3, 3, true), const int angleunit=angDegrees)
 Constructor. More...
 
 OrientedLattice (const double _a, const double _b, const double _c, const Kernel::DblMatrix &Umatrix=Kernel::DblMatrix(3, 3, true))
 Constructor. More...
 
 OrientedLattice (const Kernel::DblMatrix &Umatrix=Kernel::DblMatrix(3, 3, true))
 Default constructor. More...
 
 OrientedLattice (const UnitCell &uc, const Kernel::DblMatrix &Umatrix=Kernel::DblMatrix(3, 3, true))
 UnitCell constructor. More...
 
Kernel::V3D qFromHKL (const Kernel::V3D &hkl) const
 Return Q-sample coordinates from hkl. More...
 
void saveNexus (::NeXus::File *file, const std::string &group) const
 Save the lattice to an open NeXus file. More...
 
void setModUB (const Kernel::DblMatrix &newModUB)
 Sets the Modulation UB matrix. More...
 
void setU (const Kernel::DblMatrix &newU, const bool force=true)
 Sets the U matrix. More...
 
void setUB (const Kernel::DblMatrix &newUB)
 Sets the UB matrix and recalculates lattice parameters. More...
 
const Kernel::DblMatrixsetUFromVectors (const Kernel::V3D &u, const Kernel::V3D &v)
 Create the U matrix from two vectors. More...
 
- Public Member Functions inherited from Mantid::Geometry::UnitCell
double a () const
 Get lattice parameter. More...
 
double a (int nd) const
 Get lattice parameter a1-a3 as function of index (0-2) More...
 
double a1 () const
 Get lattice parameter. More...
 
double a2 () const
 Get lattice parameter. More...
 
double a3 () const
 Get lattice parameter. More...
 
double alpha () const
 Get lattice parameter. More...
 
double alpha1 () const
 Get lattice parameter. More...
 
double alpha2 () const
 Get lattice parameter. More...
 
double alpha3 () const
 Get lattice parameter. More...
 
double alphastar () const
 Get reciprocal lattice parameter. More...
 
double astar () const
 Get reciprocal lattice parameter. More...
 
double b () const
 Get lattice parameter. More...
 
double b1 () const
 Get reciprocal lattice parameter. More...
 
double b2 () const
 Get reciprocal lattice parameter. More...
 
double b3 () const
 Get reciprocal lattice parameter. More...
 
double beta () const
 Get lattice parameter. More...
 
double beta1 () const
 Get reciprocal lattice parameter. More...
 
double beta2 () const
 Get reciprocal lattice parameter. More...
 
double beta3 () const
 Get reciprocal lattice parameter. More...
 
double betastar () const
 Get reciprocal lattice parameter. More...
 
double bstar () const
 Get reciprocal lattice parameter. More...
 
double c () const
 Get lattice parameter. More...
 
double cstar () const
 Get reciprocal lattice parameter. More...
 
double d (const Kernel::V3D &hkl) const
 Return d-spacing ( \( \mbox{ \AA } \)) for a given h,k,l coordinate. More...
 
double d (double h, double k, double l) const
 Return d-spacing ( \( \mbox{ \AA } \)) for a given h,k,l coordinate. More...
 
double dstar (const Kernel::V3D &hkl) const
 Return d*=1/d ( \( \mbox{ \AA }^{-1} \)) for a given h,k,l coordinate. More...
 
double dstar (double h, double k, double l) const
 Return d*=1/d ( \( \mbox{ \AA }^{-1} \)) for a given h,k,l coordinate. More...
 
double errora () const
 Get lattice parameter error. More...
 
double erroralpha (const int angleunit=angDegrees) const
 Get lattice parameter error. More...
 
double errorb () const
 Get lattice parameter error. More...
 
double errorbeta (const int angleunit=angDegrees) const
 Get lattice parameter error. More...
 
double errorc () const
 Get lattice parameter error. More...
 
double errorgamma (const int angleunit=angDegrees) const
 Get lattice parameter error. More...
 
double errorvolume () const
 Get lattice parameter error. More...
 
double gamma () const
 Get lattice parameter. More...
 
double gammastar () const
 Get reciprocal lattice parameter. More...
 
const Kernel::DblMatrixgetB () const
 Get the B-matrix. More...
 
const Kernel::DblMatrixgetBinv () const
 Get the inverse of the B-matrix. More...
 
bool getCrossTerm () const
 Get cross term boolean. More...
 
double getdh (int j) const
 Get modulation vectors for satellites. More...
 
double getdherr (int j) const
 Get error of modulation vectors for satellites. More...
 
double getdk (int j) const
 Get modulation vectors for satellites. More...
 
double getdkerr (int j) const
 Get error of modulation vectors for satellites. More...
 
double getdl (int j) const
 Get modulation vectors for satellites. More...
 
double getdlerr (int j) const
 Get error of modulation vectors for satellites. More...
 
const Kernel::DblMatrixgetG () const
 Get the metric tensor. More...
 
const Kernel::DblMatrixgetGstar () const
 Get the reciprocal metric tensor. More...
 
int getMaxOrder () const
 Get max order. More...
 
const Kernel::DblMatrixgetModHKL () const
 Get modulation vectors for satellites. More...
 
const Kernel::V3D getModVec (int j) const
 Get modulation vectors for satellites. More...
 
const Kernel::V3D getVecErr (int j) const
 Get errors for modulation vectors for satellites. More...
 
bool operator!= (const UnitCell &other) const
 
bool operator== (const UnitCell &other) const
 
virtual void recalculateFromGstar (const Kernel::Matrix< double > &NewGstar)
 Recalculate lattice from reciprocal metric tensor (Gstar=transpose(UB)*UB) More...
 
double recAngle (double h1, double k1, double l1, double h2, double k2, double l2, const int angleunit=angDegrees) const
 Calculate the angle in degrees or radians between two reciprocal vectors (h1,k1,l1) and (h2,k2,l2) More...
 
double recVolume () const
 Volume of the reciprocal lattice. More...
 
void set (double _a, double _b, double _c, double _alpha, double _beta, double _gamma, const int angleunit=angDegrees)
 Set lattice parameters. More...
 
void seta (double _a)
 Set lattice parameter. More...
 
void setalpha (double _alpha, const int angleunit=angDegrees)
 Set lattice parameter. More...
 
void setb (double _b)
 Set lattice parameter. More...
 
void setbeta (double _beta, const int angleunit=angDegrees)
 Set lattice parameter. More...
 
void setc (double _c)
 Set lattice parameter. More...
 
void setCrossTerm (bool CT)
 Set modulation vectors for satellites. More...
 
void setError (double _aerr, double _berr, double _cerr, double _alphaerr, double _betaerr, double _gammaerr, const int angleunit=angDegrees)
 Set lattice parameter errors. More...
 
void setErrora (double _aerr)
 Set lattice parameter error. More...
 
void setErroralpha (double _alphaerr, const int angleunit=angDegrees)
 Set lattice parameter error. More...
 
void setErrorb (double _berr)
 Set lattice parameter error. More...
 
void setErrorbeta (double _betaerr, const int angleunit=angDegrees)
 Set lattice parameter error. More...
 
void setErrorc (double _cerr)
 Set lattice parameter error. More...
 
void setErrorgamma (double _gammaerr, const int angleunit=angDegrees)
 Set lattice parameter error. More...
 
void setErrorModHKL (const Kernel::DblMatrix &newErrorModHKL)
 Set modulation vectors for satellites. More...
 
void setErrorModHKL (double _dh1err, double _dk1err, double _dl1err, double _dh2err, double _dk2err, double _dl2err, double _dh3err, double _dk3err, double _dl3err)
 Set modulation vectors for satellites. More...
 
void setgamma (double _gamma, const int angleunit=angDegrees)
 Set lattice parameter. More...
 
void setMaxOrder (int MaxO)
 Set modulation vectors for satellites. More...
 
void setModerr (int i, double _dherr, double _dkerr, double _dlerr)
 Set modulation vectors for satellites. More...
 
void setModerr1 (double _dh1err, double _dk1err, double _dl1err)
 Set modulation vectors for satellites. More...
 
void setModerr2 (double _dh2err, double _dk2err, double _dl2err)
 Set modulation vectors for satellites. More...
 
void setModerr3 (double _dh3err, double _dk3err, double _dl3err)
 Set modulation vectors for satellites. More...
 
void setModHKL (const Kernel::DblMatrix &newModHKL)
 Set modulation vectors for satellites. More...
 
void setModHKL (double _dh1, double _dk1, double _dl1, double _dh2, double _dk2, double _dl2, double _dh3, double _dk3, double _dl3)
 Set modulation vectors for satellites. More...
 
void setModVec1 (const Kernel::V3D &newModVec)
 Set modulation vectors for satellites. More...
 
void setModVec1 (double _dh1, double _dk1, double _dl1)
 Set modulation vectors for satellites. More...
 
void setModVec2 (const Kernel::V3D &newModVec)
 Set modulation vectors for satellites. More...
 
void setModVec2 (double _dh2, double _dk2, double _dl2)
 Set modulation vectors for satellites. More...
 
void setModVec3 (const Kernel::V3D &newModVec)
 Set modulation vectors for satellites. More...
 
void setModVec3 (double _dh3, double _dk3, double _dl3)
 Set modulation vectors for satellites. More...
 
 UnitCell ()
 Default constructor. More...
 
 UnitCell (const double _a, const double _b, const double _c)
 Constructor. More...
 
 UnitCell (const double _a, const double _b, const double _c, const double _alpha, const double _beta, const double _gamma, const int angleunit=angDegrees)
 Constructor. More...
 
double volume () const
 Volume of the direct unit-cell. More...
 
virtual ~UnitCell ()=default
 

Static Public Member Functions

static bool GetABC (const Kernel::DblMatrix &UB, Kernel::V3D &a_dir, Kernel::V3D &b_dir, Kernel::V3D &c_dir)
 Get the real space edge vectors a, b, c corresponding to the UB matrix. More...
 
static bool GetUB (Kernel::DblMatrix &UB, const Kernel::V3D &a_dir, const Kernel::V3D &b_dir, const Kernel::V3D &c_dir)
 Get the UB matix corresponding to the real space edge vectors a, b, c. More...
 

Private Member Functions

void recalculate () override
 Private function, called at initialization or whenever lattice parameters are changed. More...
 
void recalculateFromGstar (const Kernel::DblMatrix &NewGstar) override
 Make recalculateFrom private. More...
 

Private Attributes

Kernel::DblMatrix ModUB
 
Kernel::DblMatrix U
 
Kernel::DblMatrix UB
 

Additional Inherited Members

- Protected Member Functions inherited from Mantid::Geometry::UnitCell
void calculateB ()
 Private function to calculate B matrix. More...
 
void calculateG ()
 
void calculateGstar ()
 Private function to calculate Gstar matrix. More...
 
void calculateReciprocalLattice ()
 Private function to calculate reciprocal lattice parameters. More...
 
virtual void recalculate ()
 Private function, called at initialization or whenever lattice parameters are changed. More...
 
- Protected Attributes inherited from Mantid::Geometry::UnitCell
Kernel::DblMatrix B
 B matrix for a right-handed coordinate system, in Busing-Levy convention. More...
 
Kernel::DblMatrix Binv
 Inverse of the B matrix. More...
 
bool CrossTerm
 
std::vector< double > da
 Lattice parameter a,b,c,alpha,beta,gamma (in \( \mbox{ \AA } \) and radians) More...
 
std::vector< double > errorda
 Error in lattice parameters (in \( \mbox{ \AA } \) and radians) More...
 
Kernel::DblMatrix errorModHKL
 
Kernel::DblMatrix G
 Metric tensor. More...
 
Kernel::DblMatrix Gstar
 Reciprocal lattice tensor. More...
 
int MaxOrder
 
Kernel::DblMatrix ModHKL
 
std::vector< double > ra
 Reciprocal lattice parameters (in \( \mbox{ \AA }^{-1} \) and radians) More...
 

Detailed Description

Class to implement UB matrix.

See documentation about UB matrix in the Mantid repository.

Author
Andrei Savici, SNS, ORNL
Date
2011-04-15

Definition at line 21 of file OrientedLattice.h.

Constructor & Destructor Documentation

◆ OrientedLattice() [1/4]

Mantid::Geometry::OrientedLattice::OrientedLattice ( const Kernel::DblMatrix Umatrix = Kernel::DblMatrix(3, 3, true))

Default constructor.

Parameters
Umatrix:: orientation matrix U. By default this will be identity matrix

Definition at line 21 of file OrientedLattice.cpp.

References Mantid::Geometry::UnitCell::getB(), Mantid::Geometry::UnitCell::getModHKL(), Mantid::Kernel::Matrix< T >::isRotation(), ModUB, U, and UB.

◆ OrientedLattice() [2/4]

Mantid::Geometry::OrientedLattice::OrientedLattice ( const double  _a,
const double  _b,
const double  _c,
const Kernel::DblMatrix Umatrix = Kernel::DblMatrix(3, 3, true) 
)

Constructor.

Parameters
_a:: lattice parameter \( a \) with \(\alpha = \beta = \gamma = 90^\circ \)
_b:: lattice parameter \( b \) with \(\alpha = \beta = \gamma = 90^\circ \)
_c:: lattice parameter \( c \) with \(\alpha = \beta = \gamma = 90^\circ \)
Umatrix:: orientation matrix U

Definition at line 39 of file OrientedLattice.cpp.

References Mantid::Geometry::UnitCell::getB(), Mantid::Geometry::UnitCell::getModHKL(), Mantid::Kernel::Matrix< T >::isRotation(), ModUB, U, and UB.

◆ OrientedLattice() [3/4]

Mantid::Geometry::OrientedLattice::OrientedLattice ( const double  _a,
const double  _b,
const double  _c,
const double  _alpha,
const double  _beta,
const double  _gamma,
const Kernel::DblMatrix Umatrix = Kernel::DblMatrix(3, 3, true),
const int  angleunit = angDegrees 
)

Constructor.

Parameters
_a:: lattice parameter \( a \)
_b:: lattice parameter \( b \)
_c:: lattice parameter \( c \)
_alpha:: lattice parameter \( \alpha \)
_beta:: lattice parameter \( \beta \)
_gamma:: lattice parameter \( \gamma \)
angleunit:: units for angle, of type AngleUnits. Default is degrees.
Umatrix:: orientation matrix U

Definition at line 59 of file OrientedLattice.cpp.

References Mantid::Geometry::UnitCell::getB(), Mantid::Geometry::UnitCell::getModHKL(), Mantid::Kernel::Matrix< T >::isRotation(), ModUB, U, and UB.

◆ OrientedLattice() [4/4]

Mantid::Geometry::OrientedLattice::OrientedLattice ( const UnitCell uc,
const Kernel::DblMatrix Umatrix = Kernel::DblMatrix(3, 3, true) 
)

UnitCell constructor.

Parameters
uc:: UnitCell
Umatrix:: orientation matrix U. By default this will be identity matrix

Definition at line 74 of file OrientedLattice.cpp.

References Mantid::Geometry::UnitCell::getB(), Mantid::Geometry::UnitCell::getModHKL(), Mantid::Kernel::Matrix< T >::isRotation(), ModUB, U, and UB.

Member Function Documentation

◆ GetABC()

bool Mantid::Geometry::OrientedLattice::GetABC ( const Kernel::DblMatrix UB,
Kernel::V3D a_dir,
Kernel::V3D b_dir,
Kernel::V3D c_dir 
)
static

Get the real space edge vectors a, b, c corresponding to the UB matrix.

Get the real space edge vectors a,b,c corresponding to the UB matrix.

The rows of the inverse of the matrix with will be stored in a_dir, b_dir, c_dir.

Parameters
UBA 3x3 matrix containing a UB matrix.
a_dirWill be set to the real space edge vector for side a of the unit cell
b_dirWill be set to the real space edge vector for side b of the unit cell
c_dirWill be set to the real space edge vector for side c of the unit cell
Returns
true if the inverse of the matrix UB could be found and the a_dir, b_dir and c_dir vectors have been set to the rows of UB inverse.

Definition at line 318 of file OrientedLattice.cpp.

References Mantid::Kernel::Matrix< T >::Invert(), Mantid::Kernel::Matrix< T >::numCols(), Mantid::Kernel::Matrix< T >::numRows(), and UB.

Referenced by Mantid::Geometry::CompareABCsum(), Mantid::Geometry::GetDiffFrom90Sum(), Mantid::Geometry::ScalarUtils::GetRelatedUBs(), Mantid::Geometry::NiggliCell::MakeNiggliUB(), Mantid::Geometry::ConventionalCell::SetSidesIncreasing(), Mantid::Geometry::ConventionalCell::StandardizeHexagonal(), and Mantid::Geometry::ConventionalCell::StandardizeTetragonal().

◆ getModUB()

const DblMatrix & Mantid::Geometry::OrientedLattice::getModUB ( ) const

◆ getU()

const DblMatrix & Mantid::Geometry::OrientedLattice::getU ( ) const

Get the U matrix.

Returns
U :: U orientation matrix

Definition at line 85 of file OrientedLattice.cpp.

References U.

Referenced by Mantid::Algorithms::CopySample::copyParameters(), Mantid::Crystal::SaveHKL::exec(), export_OrientedLattice(), and setUFromVectors().

◆ getUB()

const DblMatrix & Mantid::Geometry::OrientedLattice::getUB ( ) const

◆ GetUB()

bool Mantid::Geometry::OrientedLattice::GetUB ( Kernel::DblMatrix UB,
const Kernel::V3D a_dir,
const Kernel::V3D b_dir,
const Kernel::V3D c_dir 
)
static

Get the UB matix corresponding to the real space edge vectors a, b, c.

Get the UB matrix corresponding to the real space edge vectors a,b,c.

The inverse of the matrix with vectors a,b,c as rows will be stored in UB.

Parameters
UBA 3x3 matrix that will be set to the UB matrix.
a_dirThe real space edge vector for side a of the unit cell
b_dirThe real space edge vector for side b of the unit cell
c_dirThe real space edge vector for side c of the unit cell
Returns
true if UB was set to the new matrix and false if UB could not be set since the matrix with a,b,c as rows could not be inverted.

Definition at line 285 of file OrientedLattice.cpp.

References Mantid::Kernel::Matrix< T >::Invert(), Mantid::Kernel::Matrix< T >::numCols(), Mantid::Kernel::Matrix< T >::numRows(), Mantid::Kernel::Matrix< T >::setRow(), and UB.

Referenced by Mantid::Geometry::IndexingUtils::FormUB_From_abc_Vectors(), Mantid::Geometry::ScalarUtils::GetRelatedUBs(), Mantid::Geometry::NiggliCell::MakeNiggliUB(), Mantid::Geometry::IndexingUtils::ScanFor_UB(), Mantid::Geometry::ConventionalCell::SetSidesIncreasing(), Mantid::Geometry::ConventionalCell::StandardizeHexagonal(), and Mantid::Geometry::ConventionalCell::StandardizeTetragonal().

◆ getuVector()

Kernel::V3D Mantid::Geometry::OrientedLattice::getuVector ( ) const

gets a vector along beam direction when goniometers are at 0.

Note, this vector is not unique, but all vectors can be obtaineb by multiplying with a scalar

Returns
u :: V3D vector along beam direction

Definition at line 162 of file OrientedLattice.cpp.

References Mantid::Kernel::Matrix< T >::Invert(), UB, and Mantid::Geometry::z.

Referenced by export_OrientedLattice().

◆ getvVector()

Kernel::V3D Mantid::Geometry::OrientedLattice::getvVector ( ) const

gets a vector in the horizontal plane, perpendicular to the beam direction when goniometers are at 0.

Note, this vector is not unique, but all vectors can be obtaineb by multiplying with a scalar

Returns
v :: V3D vector perpendicular to the beam direction, in the horizontal plane

Definition at line 175 of file OrientedLattice.cpp.

References Mantid::Kernel::Matrix< T >::Invert(), UB, and Mantid::Geometry::x.

Referenced by export_OrientedLattice().

◆ hklFromQ()

V3D Mantid::Geometry::OrientedLattice::hklFromQ ( const Kernel::V3D Q) const

Return hkl from the Q-sample coordinates.

Calculate the hkl corresponding to a given Q-vector.

Parameters
Q:: Q-vector in $AA^-1 in the sample frame
Returns
a V3D with H,K,L

Definition at line 145 of file OrientedLattice.cpp.

References getUB(), and Mantid::Kernel::Matrix< T >::Invert().

◆ loadNexus()

void Mantid::Geometry::OrientedLattice::loadNexus ( ::NeXus::File *  file,
const std::string &  group 
)

Load the lattice to from an open NeXus file.

Load the object from an open NeXus file.

Parameters
file:: open NeXus file
group:: name of the group to open

Definition at line 262 of file OrientedLattice.cpp.

References setUB().

◆ operator!=()

bool Mantid::Geometry::OrientedLattice::operator!= ( const OrientedLattice other) const

Definition at line 342 of file OrientedLattice.cpp.

References UB.

◆ operator==()

bool Mantid::Geometry::OrientedLattice::operator== ( const OrientedLattice other) const

Definition at line 341 of file OrientedLattice.cpp.

References UB.

◆ qFromHKL()

V3D Mantid::Geometry::OrientedLattice::qFromHKL ( const Kernel::V3D hkl) const

Return Q-sample coordinates from hkl.

Calculate the hkl corresponding to a given Q-vector.

Parameters
hkla V3D with H,K,L
Returns
Q-vector in $AA^-1 in the sample frame

Definition at line 156 of file OrientedLattice.cpp.

References UB.

Referenced by Mantid::Crystal::SCDPanelErrors::eval().

◆ recalculate()

void Mantid::Geometry::OrientedLattice::recalculate ( )
overrideprivatevirtual

Private function, called at initialization or whenever lattice parameters are changed.

Reimplemented from Mantid::Geometry::UnitCell.

Definition at line 337 of file OrientedLattice.cpp.

References Mantid::Geometry::UnitCell::getB(), Mantid::Geometry::UnitCell::recalculate(), U, and UB.

◆ recalculateFromGstar()

void Mantid::Geometry::OrientedLattice::recalculateFromGstar ( const Kernel::DblMatrix NewGstar)
inlineoverrideprivatevirtual

Make recalculateFrom private.

Reimplemented from Mantid::Geometry::UnitCell.

Definition at line 71 of file OrientedLattice.h.

Referenced by setUB().

◆ saveNexus()

void Mantid::Geometry::OrientedLattice::saveNexus ( ::NeXus::File *  file,
const std::string &  group 
) const

Save the lattice to an open NeXus file.

Save the object to an open NeXus file.

Parameters
file:: open NeXus file
group:: name of the group to create

Definition at line 242 of file OrientedLattice.cpp.

References Mantid::Geometry::UnitCell::a(), Mantid::Geometry::UnitCell::alpha(), Mantid::Geometry::UnitCell::b(), Mantid::Geometry::UnitCell::beta(), Mantid::Geometry::UnitCell::c(), Mantid::Geometry::UnitCell::gamma(), Mantid::Kernel::Matrix< T >::getVector(), and UB.

◆ setModUB()

void Mantid::Geometry::OrientedLattice::setModUB ( const Kernel::DblMatrix newModUB)

◆ setU()

void Mantid::Geometry::OrientedLattice::setU ( const Kernel::DblMatrix newU,
const bool  force = true 
)

Sets the U matrix.

Parameters
newU:: the new U matrix
force:: If true, do not check that U matrix is valid

Definition at line 103 of file OrientedLattice.cpp.

References Mantid::Geometry::UnitCell::getB(), Mantid::Geometry::UnitCell::getModHKL(), Mantid::Kernel::Matrix< T >::isOrthogonal(), Mantid::Kernel::Matrix< T >::isRotation(), ModUB, U, and UB.

Referenced by Mantid::Algorithms::CopySample::copyParameters(), and setUFromVectors().

◆ setUB()

void Mantid::Geometry::OrientedLattice::setUB ( const Kernel::DblMatrix newUB)

◆ setUFromVectors()

const DblMatrix & Mantid::Geometry::OrientedLattice::setUFromVectors ( const Kernel::V3D u,
const Kernel::V3D v 
)

Create the U matrix from two vectors.

Set the U rotation matrix, to provide the transformation, which translate an arbitrary vector V expressed in RLU (hkl) into another coordinate system defined by vectors u and v, expressed in RLU (hkl) Author: Alex Buts.

Parameters
u:: first vector of new coordinate system (in hkl units)
v:: second vector of the new coordinate system
Returns
the U matrix calculated The transformation from old coordinate system to new coordinate system is performed by the whole UB matrix

Definition at line 195 of file OrientedLattice.cpp.

References Mantid::Kernel::V3D::cross_prod(), Mantid::Geometry::UnitCell::getB(), getU(), Mantid::Kernel::V3D::norm(), Mantid::Kernel::V3D::norm2(), Mantid::Kernel::V3D::normalize(), setU(), and U.

Referenced by Mantid::MDAlgorithms::LoadDNSSCD::fillOutputWorkspace().

Member Data Documentation

◆ ModUB

Kernel::DblMatrix Mantid::Geometry::OrientedLattice::ModUB
private

Definition at line 68 of file OrientedLattice.h.

Referenced by getModUB(), OrientedLattice(), setModUB(), and setU().

◆ U

Kernel::DblMatrix Mantid::Geometry::OrientedLattice::U
private

Definition at line 66 of file OrientedLattice.h.

Referenced by getU(), OrientedLattice(), recalculate(), setU(), setUB(), and setUFromVectors().

◆ UB

Kernel::DblMatrix Mantid::Geometry::OrientedLattice::UB
private

The documentation for this class was generated from the following files: