46 "An input workspace.");
49 "Name of the output MDEventWorkspace. If the workspace "
50 "already exists, then the events will be added to it.");
52 "Append events to the output workspace. The workspace is replaced if "
57 "Clearing the events from the input workspace during "
58 "conversion (to save memory) is not supported by algorithm "
64 "Use the histogram representation (event for event workspaces).\n"
65 "One MDEvent will be created for each histogram bin (even empty ones).\n"
66 "Warning! This can use significantly more memory!");
72 "What will be the dimensions of the output workspace?\n"
73 " Q (lab frame): Wave-vector change of the lattice in the lab frame.\n"
74 " Q (sample frame): Wave-vector change of the lattice in the frame of "
75 "the sample (taking out goniometer rotation).\n"
76 " HKL: Use the sample's UB matrix to convert to crystal's HKL indices.");
79 "Correct the weights of events by multiplying by the Lorentz "
80 "formula: sin(theta)^2 / lambda^4");
86 "Optional. If specified, then all the boxes will be split to this "
87 "minimum recursion depth. 1 = one level of splitting, etc.\n"
88 "Be careful using this since it can quickly create a huge number of "
89 "boxes = (SplitInto ^ (MinRercursionDepth * NumDimensions)).\n"
90 "But setting this property equal to MaxRecursionDepth property is "
91 "necessary if one wants to generate multiple file based workspaces in "
92 "order to merge them later\n");
108 std::string &TargFrameName,
109 std::string &ScalingName) {
128 throw std::invalid_argument(
"BaseConvertToDiffractionMDWorkspace::Unknown target frame: " + TargFrame);
137 Convert->initialize();
139 Convert->setRethrows(
true);
140 Convert->initialize();
143 Convert->setProperty(
"OutputWorkspace", this->
getPropertyValue(
"OutputWorkspace"));
144 Convert->setProperty(
"OverwriteExisting", !this->
getProperty(
"Append"));
147 throw std::runtime_error(
" ConvertToMD Q3D plugin used to transform into "
148 "DiffractionWorkspaced has not been registered "
149 "with the MDTransformation factory");
151 Convert->setPropertyValue(
"QDimensions",
"Q3D");
159 Convert->setProperty(
"QConversionScales", Scaling);
161 Convert->setProperty(
"OtherDimensions",
"");
162 Convert->setProperty(
"PreprocDetectorsWS",
"-");
164 bool lorCorr = this->
getProperty(
"LorentzCorrection");
165 Convert->setProperty(
"LorentzCorrection", lorCorr);
167 bool ignoreZeros = !this->
getProperty(
"OneEventPerBin");
168 Convert->setProperty(
"IgnoreZeroSignals", ignoreZeros);
170 std::vector<double> extents = this->
getProperty(
"Extents");
171 std::vector<double> minVal, maxVal;
173 Convert->setProperty(
"MinValues", minVal);
174 Convert->setProperty(
"MaxValues", maxVal);
178 Convert->setProperty(
"SplitThreshold", this->
getPropertyValue(
"SplitThreshold"));
179 Convert->setProperty(
"MaxRecursionDepth", this->
getPropertyValue(
"MaxRecursionDepth"));
183 Convert->setProperty(
"MinRecursionDepth", depth);
185 Convert->executeAsChildAlg();
void declareProperty(std::unique_ptr< Kernel::Property > p, const std::string &doc="") override
Add a property to the list of managed properties.
std::string getPropertyValue(const std::string &name) const override
Get the value of a property as a string.
TypedValue getProperty(const std::string &name) const override
Get the value of a property.
virtual std::shared_ptr< Algorithm > createChildAlgorithm(const std::string &name, const double startProgress=-1., const double endProgress=-1., const bool enableLogging=true, const int &version=-1)
Create a Child Algorithm.
void initBoxControllerProps(const std::string &SplitInto="5", int SplitThreshold=1000, int MaxRecursionDepth=5)
Initialise the properties.
std::string getBoxSettingsGroupName()
A property class for workspaces.
Interface to PropertyManager.
IPropertyManager * setProperty(const std::string &name, const T &value)
Templated method to set the value of a PropertyWithValue.
void setPropertySettings(const std::string &name, std::unique_ptr< IPropertySettings > settings)
void setPropertyGroup(const std::string &name, const std::string &group)
Set the group for a given property.
The concrete, templated class for properties.
static T & Instance()
Return a reference to the Singleton instance, creating it if it does not already exist Creation is do...
void exec() override
Execute the algorithm.
void init() override
Initialize the algorithm's properties.
void convertFramePropertyNames(const std::string &TargFrame, std::string &TargFrameName, std::string &ScalingName)
method to convert the value of the target frame specified for the ConvertToDiffractionMDWorksapce int...
virtual void convertExtents(const std::vector< double > &Extents, std::vector< double > &minVal, std::vector< double > &maxVal)=0
std::vector< std::string > frameOptions
Small class to diable propery on interface.
bool checkCriterion(const IPropertyManager *) const override
Checks that the specified property matches the criteria given.
std::shared_ptr< IMDEventWorkspace > IMDEventWorkspace_sptr
Shared pointer to Mantid::API::IMDEventWorkspace.
std::shared_ptr< Algorithm > Algorithm_sptr
Typedef for a shared pointer to an Algorithm.
std::shared_ptr< MatrixWorkspace > MatrixWorkspace_sptr
shared pointer to the matrix workspace base class
TargetFrame
enum describes availible target coordinate systems for Q3D mode
static const std::vector< std::string > availableTypes()
Returns the string list of available modes.
@ Input
An input workspace.
@ Output
An output workspace.