Mantid
|
Instances of this class represent information about a selected conventional cell based on a specified UB for a Niggli reduced cell. More...
#include <ConventionalCell.h>
Public Member Functions | |
ConventionalCell (const Kernel::DblMatrix &UB, size_t form_num=0, bool allowPermutations=false) | |
Construct a ConventionalCell for the specified UB and form number. More... | |
std::string | GetCellType () const |
get the cell type name, as named in the ReducedCell class More... | |
std::string | GetCentering () const |
get the centering type name, as named in the ReducedCell class More... | |
std::string | GetDescription () const |
get string listing form number, error, cell type and centering More... | |
double | GetError () const |
get the error in the scalars for this form More... | |
size_t | GetFormNum () const |
get the form number for this conventional cell More... | |
Kernel::DblMatrix | GetHKL_Tran () const |
get the transform to change HKL to new conventional cell HKL More... | |
Kernel::DblMatrix | GetNewUB () const |
get the transformed orientation matrix for the conventional cell More... | |
Kernel::DblMatrix | GetOriginalUB () const |
get the original orientation matrix as passed in to the constructor More... | |
double | GetSumOfSides () const |
get the sum of the sides of the conventional unit cell More... | |
Private Member Functions | |
void | init (const Kernel::DblMatrix &UB, const ReducedCell &form_0, ReducedCell &form_i, const bool allowPermutations) |
Initialize the fields of this ConventionalCell object, using a specified matrix and two forms. More... | |
void | SetSidesIncreasing (Kernel::DblMatrix &UB) |
Change UB to a new matrix corresponding to a unit cell with the sides in increasing order of magnitude. More... | |
void | StandardizeHexagonal (Kernel::DblMatrix &UB) |
Change UB to a new matrix corresponding to a hexagonal unit cell with angles approximately 90, 90, 120. More... | |
void | StandardizeTetragonal (Kernel::DblMatrix &UB) |
Change UB to a new matrix corresponding to a unit cell with the first two sides approximately equal in magnitude. More... | |
Private Attributes | |
Kernel::DblMatrix | adjusted_UB |
std::string | cell_type |
std::string | centering |
size_t | form_number |
Kernel::DblMatrix | hkl_tran |
Kernel::DblMatrix | original_UB |
double | scalars_error |
Instances of this class represent information about a selected conventional cell based on a specified UB for a Niggli reduced cell.
An instance of the class records the original UB matrix, as well as the new UB for the conventional cell, the maximum error in the scalars, cell type and centering. See "Lattice Symmetry and Identification -- The Fundamental Role of Reduced Cells in Materials Characterization", Alan D. Mighell, Vol. 106, Number 6, Nov-Dec 2001, Journal of Research of the National Institute of Standards and Technology. This class is a direct port of the ISAW class ReducedCellInfo.
Definition at line 33 of file ConventionalCell.h.
Mantid::Geometry::ConventionalCell::ConventionalCell | ( | const Kernel::DblMatrix & | UB, |
size_t | form_num = 0 , |
||
bool | allowPermutations = false |
||
) |
Construct a ConventionalCell for the specified UB and form number.
Construct a ConventionalCell for the specified orientation matrix and the specified row of Table 2.
The form number must be between 1 and 44.
UB | The orientation matrix corresponding to a Niggli reduced cell. |
form_num | The row number from Table 2, that specifies the reduced form number. |
allowPermutations | Allow permutations of conventional cells for related UBs with better fit to peaks. |
Definition at line 33 of file ConventionalCell.cpp.
References form_number, Mantid::Geometry::IndexingUtils::GetLatticeParameters(), and init().
std::string Mantid::Geometry::ConventionalCell::GetCellType | ( | ) | const |
get the cell type name, as named in the ReducedCell class
Get the cell type for this conventional cell.
Definition at line 63 of file ConventionalCell.cpp.
References cell_type.
Referenced by Mantid::Geometry::ScalarUtils::GetCellBestError(), and GetDescription().
std::string Mantid::Geometry::ConventionalCell::GetCentering | ( | ) | const |
get the centering type name, as named in the ReducedCell class
Get centering for this conventional cell.
Definition at line 70 of file ConventionalCell.cpp.
References centering.
Referenced by GetDescription().
std::string Mantid::Geometry::ConventionalCell::GetDescription | ( | ) | const |
get string listing form number, error, cell type and centering
Get a formatted string listing the form number, error in scalars, the cell type and the centering.
Definition at line 113 of file ConventionalCell.cpp.
References GetCellType(), GetCentering(), GetError(), and GetFormNum().
Referenced by Mantid::Crystal::SelectCellOfType::exec(), and Mantid::Crystal::SelectCellWithForm::exec().
double Mantid::Geometry::ConventionalCell::GetError | ( | ) | const |
get the error in the scalars for this form
Get the error in the scalars for this conventional cell.
Definition at line 56 of file ConventionalCell.cpp.
References scalars_error.
Referenced by Mantid::Geometry::ScalarUtils::AddIfBest(), and GetDescription().
size_t Mantid::Geometry::ConventionalCell::GetFormNum | ( | ) | const |
get the form number for this conventional cell
Get the form number corresponding to this conventional cell.
Definition at line 48 of file ConventionalCell.cpp.
References form_number.
Referenced by Mantid::Geometry::ScalarUtils::AddIfBest(), and GetDescription().
Kernel::DblMatrix Mantid::Geometry::ConventionalCell::GetHKL_Tran | ( | ) | const |
get the transform to change HKL to new conventional cell HKL
Get a copy of the transform that maps the original HKL values to new HKL values corresponding to the conventional cell.
Definition at line 94 of file ConventionalCell.cpp.
References hkl_tran.
Referenced by Mantid::Crystal::SelectCellOfType::exec(), and Mantid::Crystal::SelectCellWithForm::exec().
Kernel::DblMatrix Mantid::Geometry::ConventionalCell::GetNewUB | ( | ) | const |
get the transformed orientation matrix for the conventional cell
Get a copy of the orientation matrix that indexes the peaks in a way that corresponds to the conventional cell.
Definition at line 86 of file ConventionalCell.cpp.
References adjusted_UB.
Referenced by Mantid::Crystal::SelectCellOfType::exec(), and Mantid::Crystal::SelectCellWithForm::exec().
Kernel::DblMatrix Mantid::Geometry::ConventionalCell::GetOriginalUB | ( | ) | const |
get the original orientation matrix as passed in to the constructor
Get a copy of the original UB matrix that was passed in to the constructor for this object.
Definition at line 78 of file ConventionalCell.cpp.
References original_UB.
double Mantid::Geometry::ConventionalCell::GetSumOfSides | ( | ) | const |
get the sum of the sides of the conventional unit cell
Get the sum of the sides, |a|+|b|+|c| of the conventional cell.
Definition at line 101 of file ConventionalCell.cpp.
References adjusted_UB, and Mantid::Geometry::IndexingUtils::GetLatticeParameters().
|
private |
Initialize the fields of this ConventionalCell object, using a specified matrix and two forms.
UB | The orientation matrix for the Niggli cell |
form_0 | The reduced cell form built with the lattice parameters for UB and form number zero. |
form_i | The reduced cell form built with the lattice parameters for UB and the form number of the desired conventional cell. |
allowPermutations | Allow permutations of conventional cells for related UBs with better fit to peaks. |
Definition at line 143 of file ConventionalCell.cpp.
References adjusted_UB, cell_type, centering, Mantid::Geometry::ReducedCell::GetCellType(), Mantid::Geometry::ReducedCell::GetCentering(), Mantid::Geometry::ReducedCell::GetTransformation(), Mantid::Geometry::ReducedCell::HEXAGONAL(), hkl_tran, Mantid::Kernel::Matrix< T >::Invert(), original_UB, Mantid::Geometry::ReducedCell::RHOMBOHEDRAL(), scalars_error, StandardizeHexagonal(), StandardizeTetragonal(), Mantid::Geometry::ReducedCell::TETRAGONAL(), and Mantid::Geometry::ReducedCell::WeightedDistance().
Referenced by ConventionalCell().
|
private |
Change UB to a new matrix corresponding to a unit cell with the sides in increasing order of magnitude.
This is used to arrange the UB matrix for an orthorhombic cell into a standard order.
UB | on input this should correspond to an orthorhombic cell. On output, it will correspond to an orthorhombic cell with sides in increasing order. |
Definition at line 174 of file ConventionalCell.cpp.
References Mantid::Kernel::V3D::compareMagnitude(), Mantid::Kernel::V3D::cross_prod(), Mantid::Geometry::OrientedLattice::GetABC(), Mantid::Geometry::OrientedLattice::GetUB(), and Mantid::Kernel::V3D::scalar_prod().
|
private |
Change UB to a new matrix corresponding to a hexagonal unit cell with angles approximately 90, 90, 120.
This is used to arrange the UB matrix for a hexagonal or rhombohedral cell into a standard order.
UB | on input this should correspond to a hexagonal or rhombohedral On output, it will correspond to a hexagonal cell with angles approximately 90, 90, 120. |
Definition at line 232 of file ConventionalCell.cpp.
References Mantid::Kernel::V3D::angle(), fabs, Mantid::Geometry::OrientedLattice::GetABC(), and Mantid::Geometry::OrientedLattice::GetUB().
Referenced by init().
|
private |
Change UB to a new matrix corresponding to a unit cell with the first two sides approximately equal in magnitude.
This is used to arrange the UB matrix for a tetragonal cell into a standard order.
UB | on input this should correspond to a tetragonal cell. On output, it will correspond to a tetragonal cell with the first two sides, a and b, set to the two sides that are most nearly equal in length. |
Definition at line 202 of file ConventionalCell.cpp.
References fabs, Mantid::Geometry::OrientedLattice::GetABC(), Mantid::Geometry::OrientedLattice::GetUB(), and Mantid::Kernel::V3D::norm().
Referenced by init().
|
private |
Definition at line 76 of file ConventionalCell.h.
Referenced by GetNewUB(), GetSumOfSides(), and init().
|
private |
Definition at line 73 of file ConventionalCell.h.
Referenced by GetCellType(), and init().
|
private |
Definition at line 74 of file ConventionalCell.h.
Referenced by GetCentering(), and init().
|
private |
Definition at line 71 of file ConventionalCell.h.
Referenced by ConventionalCell(), and GetFormNum().
|
private |
Definition at line 77 of file ConventionalCell.h.
Referenced by GetHKL_Tran(), and init().
|
private |
Definition at line 75 of file ConventionalCell.h.
Referenced by GetOriginalUB(), and init().
|
private |
Definition at line 72 of file ConventionalCell.h.
Referenced by GetError(), and init().