Mantid
|
Class to implement UB matrix. More...
#include <Geometry/Crystal/OrientedLattice.h>
Public Member Functions | |
const Kernel::DblMatrix & | getModUB () const |
const Kernel::DblMatrix & | getU () const |
Get the U matrix. More... | |
const Kernel::DblMatrix & | getUB () 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::DblMatrix & | setUFromVectors (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::DblMatrix & | getB () const |
Get the B-matrix. More... | |
const Kernel::DblMatrix & | getBinv () 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::DblMatrix & | getG () const |
Get the metric tensor. More... | |
const Kernel::DblMatrix & | getGstar () const |
Get the reciprocal metric tensor. More... | |
int | getMaxOrder () const |
Get max order. More... | |
const Kernel::DblMatrix & | getModHKL () 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... | |
Class to implement UB matrix.
See documentation about UB matrix in the Mantid repository.
Definition at line 21 of file OrientedLattice.h.
Mantid::Geometry::OrientedLattice::OrientedLattice | ( | const Kernel::DblMatrix & | Umatrix = Kernel::DblMatrix(3, 3, true) | ) |
Default constructor.
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.
Mantid::Geometry::OrientedLattice::OrientedLattice | ( | const double | _a, |
const double | _b, | ||
const double | _c, | ||
const Kernel::DblMatrix & | Umatrix = Kernel::DblMatrix(3, 3, true) |
||
) |
Constructor.
_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.
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.
_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.
Mantid::Geometry::OrientedLattice::OrientedLattice | ( | const UnitCell & | uc, |
const Kernel::DblMatrix & | Umatrix = Kernel::DblMatrix(3, 3, true) |
||
) |
UnitCell constructor.
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.
|
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.
UB | A 3x3 matrix containing a UB matrix. |
a_dir | Will be set to the real space edge vector for side a of the unit cell |
b_dir | Will be set to the real space edge vector for side b of the unit cell |
c_dir | Will be set to the real space edge vector for side c of the unit cell |
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().
const DblMatrix & Mantid::Geometry::OrientedLattice::getModUB | ( | ) | const |
Definition at line 97 of file OrientedLattice.cpp.
References ModUB.
Referenced by Mantid::Crystal::SaveIsawUB::exec(), Mantid::MDAlgorithms::IntegrateEllipsoidsV1::exec(), and export_OrientedLattice().
const DblMatrix & Mantid::Geometry::OrientedLattice::getU | ( | ) | const |
Get the U 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().
const DblMatrix & Mantid::Geometry::OrientedLattice::getUB | ( | ) | const |
Get the UB matrix.
The UB Matrix uses the inelastic convention: q = UB . (hkl) where q is the wavevector transfer of the LATTICE (not the neutron). and |q| = 1.0/d_spacing
Definition at line 95 of file OrientedLattice.cpp.
References UB.
Referenced by Mantid::Crystal::CalculatePeaksHKL::exec(), Mantid::Crystal::FindUBUsingIndexedPeaks::exec(), Mantid::Crystal::PredictPeaks::exec(), Mantid::Crystal::SaveIsawUB::exec(), Mantid::Crystal::SCDCalibratePanels::exec(), Mantid::Crystal::ShowPossibleCells::exec(), Mantid::Crystal::TransformHKL::exec(), Mantid::MDAlgorithms::IntegrateEllipsoidsV1::exec(), export_OrientedLattice(), Mantid::MDAlgorithms::LoadDNSSCD::fillOutputWorkspace(), hklFromQ(), Mantid::DataObjects::PeaksWorkspace::peakInfo(), and setModUB().
|
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.
UB | A 3x3 matrix that will be set to the UB matrix. |
a_dir | The real space edge vector for side a of the unit cell |
b_dir | The real space edge vector for side b of the unit cell |
c_dir | The real space edge vector for side c of the unit cell |
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().
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
Definition at line 162 of file OrientedLattice.cpp.
References Mantid::Kernel::Matrix< T >::Invert(), UB, and Mantid::Geometry::z.
Referenced by export_OrientedLattice().
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
Definition at line 175 of file OrientedLattice.cpp.
References Mantid::Kernel::Matrix< T >::Invert(), UB, and Mantid::Geometry::x.
Referenced by export_OrientedLattice().
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.
Q | :: Q-vector in $AA^-1 in the sample frame |
Definition at line 145 of file OrientedLattice.cpp.
References getUB(), and Mantid::Kernel::Matrix< T >::Invert().
void Mantid::Geometry::OrientedLattice::loadNexus | ( | ::NeXus::File * | file, |
const std::string & | group | ||
) |
bool Mantid::Geometry::OrientedLattice::operator!= | ( | const OrientedLattice & | other | ) | const |
Definition at line 342 of file OrientedLattice.cpp.
References UB.
bool Mantid::Geometry::OrientedLattice::operator== | ( | const OrientedLattice & | other | ) | const |
Definition at line 341 of file OrientedLattice.cpp.
References UB.
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.
hkl | a V3D with H,K,L |
Definition at line 156 of file OrientedLattice.cpp.
References UB.
Referenced by Mantid::Crystal::SCDPanelErrors::eval().
|
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.
|
inlineoverrideprivatevirtual |
Make recalculateFrom private.
Reimplemented from Mantid::Geometry::UnitCell.
Definition at line 71 of file OrientedLattice.h.
Referenced by setUB().
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.
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.
void Mantid::Geometry::OrientedLattice::setModUB | ( | const Kernel::DblMatrix & | newModUB | ) |
Sets the Modulation UB matrix.
newModUB | :: the new Modulation UB matrix |
Definition at line 132 of file OrientedLattice.cpp.
References getUB(), Mantid::Kernel::Matrix< T >::Invert(), ModUB, and Mantid::Geometry::UnitCell::setModHKL().
Referenced by Mantid::Crystal::FindUBUsingIndexedPeaks::exec(), Mantid::MDAlgorithms::IntegrateEllipsoidsV1::exec(), Mantid::Geometry::IndexingUtils::GetModulationVector(), and Mantid::Geometry::IndexingUtils::GetModulationVectors().
void Mantid::Geometry::OrientedLattice::setU | ( | const Kernel::DblMatrix & | newU, |
const bool | force = true |
||
) |
Sets the U matrix.
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().
void Mantid::Geometry::OrientedLattice::setUB | ( | const Kernel::DblMatrix & | newUB | ) |
Sets the UB matrix and recalculates lattice parameters.
newUB | :: the new UB matrix |
Definition at line 115 of file OrientedLattice.cpp.
References Mantid::Geometry::UnitCell::B, Mantid::Kernel::Matrix< T >::determinant(), Mantid::Geometry::UnitCell::getB(), Mantid::Kernel::Matrix< T >::Invert(), recalculateFromGstar(), Mantid::Kernel::Matrix< T >::Tprime(), U, and UB.
Referenced by Mantid::Crystal::FindUBUsingIndexedPeaks::exec(), Mantid::Crystal::SaveHKL::exec(), Mantid::Crystal::TransformHKL::exec(), Mantid::MDAlgorithms::CalculateCoverageDGS::exec(), Mantid::MDAlgorithms::IntegrateEllipsoidsV1::exec(), Mantid::MDAlgorithms::LoadDNSSCD::fillOutputWorkspace(), Mantid::Geometry::IndexingUtils::Find_UB(), Mantid::MDAlgorithms::MDNorm::getBinParameters(), Mantid::Geometry::IndexingUtils::GetLatticeParameters(), Mantid::Geometry::IndexingUtils::GetModulationVector(), Mantid::Geometry::IndexingUtils::GetModulationVectors(), and loadNexus().
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.
u | :: first vector of new coordinate system (in hkl units) |
v | :: second vector of the new coordinate system |
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().
|
private |
Definition at line 68 of file OrientedLattice.h.
Referenced by getModUB(), OrientedLattice(), setModUB(), and setU().
|
private |
Definition at line 66 of file OrientedLattice.h.
Referenced by getU(), OrientedLattice(), recalculate(), setU(), setUB(), and setUFromVectors().
|
private |
Definition at line 67 of file OrientedLattice.h.
Referenced by GetABC(), getUB(), GetUB(), getuVector(), getvVector(), operator!=(), operator==(), OrientedLattice(), qFromHKL(), recalculate(), saveNexus(), setU(), and setUB().