30 "Input Peaks Workspace");
32 auto mustBePositive = std::make_shared<BoundedValidator<double>>();
33 mustBePositive->setLower(0.0);
37 "Max Scalar Error (0.2)");
39 this->
declareProperty(
"BestOnly",
true,
"Show at most one for each Bravais Lattice");
42 "Gets set with the number of possible cells.");
44 this->
declareProperty(
"AllowPermutations",
true,
"Allow permutations of conventional cells");
52 throw std::runtime_error(
"Could not read the peaks workspace");
59 throw std::runtime_error(
"ERROR: The stored UB is not a valid orientation matrix");
62 double max_scalar_error = this->
getProperty(
"MaxScalarError");
64 bool allowPermutations = this->
getProperty(
"AllowPermutations");
70 size_t num_cells = list.size();
73 g_log.
notice() <<
"Num Cells : " << num_cells <<
'\n';
75 for (
size_t i = 0; i < num_cells; i++) {
82 this->
setProperty(
"NumberOfCells",
static_cast<int>(num_cells));
#define DECLARE_ALGORITHM(classname)
void declareProperty(std::unique_ptr< Kernel::Property > p, const std::string &doc="") override
Add a property to the list of managed properties.
TypedValue getProperty(const std::string &name) const override
Get the value of a property.
A property class for workspaces.
void exec() override
Run the algorithm.
void init() override
Initialise the properties.
static std::string GetLatticeParameterString(const Kernel::DblMatrix &UB)
Get a formatted string listing the lattice parameters and cell volume.
static bool CheckUB(const Kernel::DblMatrix &UB)
Check that the specified UB is reasonable for an orientation matrix.
Class to implement UB matrix.
const Kernel::DblMatrix & getUB() const
Get the UB matrix.
static std::vector< ConventionalCell > GetCells(const Kernel::DblMatrix &UB, bool best_only, bool allowPermutations=false)
Get list of all possible conventional cells for UB, regardless of errors, using this UB,...
static void RemoveHighErrorForms(std::vector< ConventionalCell > &list, double level)
Remove cells from list that have scalar errors above the specified level.
IPropertyManager * setProperty(const std::string &name, const T &value)
Templated method to set the value of a PropertyWithValue.
void notice(const std::string &msg)
Logs at notice level.
The concrete, templated class for properties.
std::shared_ptr< const IPeaksWorkspace > IPeaksWorkspace_const_sptr
shared pointer to Mantid::API::IPeaksWorkspace (const version)
@ InOut
Both an input & output workspace.
@ Input
An input workspace.
@ Output
An output workspace.