28Logger logger(
"ConvertPeaksWorkspace");
40 "Workspace of Indexed Peaks");
45 "Donor Workspace with instrument for conversion");
49 "Converted Workspaces");
58 std::map<std::string, std::string> issues;
67 issues[
"InstrumentWorkspace"] =
"Need a PeaksWorkspace with proper instrument attached to assist conversion.";
73 if (!inputExperimentInfo) {
74 issues[
"InstrumentWorkspace"] =
"Invalid instrument found in donor workspace.";
94 g_log.
notice() <<
"PeaksWorkspace -> LeanElasticPeaksWorkspace\n";
98 g_log.
notice() <<
"LeanElasticPeaksWorkspace -> PeaksWorkspace\n";
119 lpws->copyExperimentInfoFrom(inputExperimentInfo.get());
122 for (
int i = 0; i < pws->getNumberPeaks(); ++i) {
147 pws->copyExperimentInfoFrom(inputExperimentInfo.get());
151 for (
int i = 0; i < lpws->getNumberPeaks(); ++i) {
159 Peak pk(lpws->getPeak(i), inst);
161 }
catch (
const std::invalid_argument &errmsg) {
#define DECLARE_ALGORITHM(classname)
Kernel::Property * getPointerToProperty(const std::string &name) const override
Get a property by name.
TypedValue getProperty(const std::string &name) const override
Get the value of a property.
bool isDefault(const std::string &name) const
A property class for workspaces.
ConvertPeaksWorkspace : Bi-directional conversion between a regular PeaksWorkspace (with instrument) ...
Mantid::API::IPeaksWorkspace_sptr makePeaksWorkspace(const Mantid::API::IPeaksWorkspace_sptr &ipws, const Mantid::API::Workspace_sptr &ws)
LeanElasticPeaksWorkspace -> PeaksWorkspace.
void exec() override
Run the algorithm.
Mantid::API::IPeaksWorkspace_sptr makeLeanElasticPeaksWorkspace(const Mantid::API::IPeaksWorkspace_sptr &ipws)
PeaksWorkspace -> LeanElasticPeaksWorkspace.
std::map< std::string, std::string > validateInputs() override
Private validator for inputs.
Structure describing a single-crystal peak.
Structure describing a single-crystal peak.
IPropertyManager * setProperty(const std::string &name, const T &value)
Templated method to set the value of a PropertyWithValue.
The Logger class is in charge of the publishing messages from the framework through various channels.
void notice(const std::string &msg)
Logs at notice level.
void warning(const std::string &msg)
Logs at warning level.
std::shared_ptr< IPeaksWorkspace > IPeaksWorkspace_sptr
shared pointer to Mantid::API::IPeaksWorkspace
std::shared_ptr< Workspace > Workspace_sptr
shared pointer to Mantid::API::Workspace
std::shared_ptr< ExperimentInfo > ExperimentInfo_sptr
Shared pointer to ExperimentInfo.
std::shared_ptr< LeanElasticPeaksWorkspace > LeanElasticPeaksWorkspace_sptr
Typedef for a shared pointer to a peaks workspace.
std::shared_ptr< PeaksWorkspace > PeaksWorkspace_sptr
Typedef for a shared pointer to a peaks workspace.
std::shared_ptr< const Instrument > Instrument_const_sptr
Shared pointer to an const instrument object.
@ Input
An input workspace.
@ Output
An output workspace.