11#include "MantidAlgorithms/DllConfig.h"
18namespace CorelliCalibration {
20 "ComponentName",
"Xposition",
"Yposition",
"Zposition",
21 "XdirectionCosine",
"YdirectionCosine",
"ZdirectionCosine",
"RotationAngle"};
23 "double",
"double",
"double",
"double"};
36 if (
fabs(
x - otherpos.
x) >= abstol ||
fabs(
y - otherpos.
y) >= abstol ||
fabs(
z - otherpos.
z) >= abstol ||
83 std::vector<std::string> getComponentNames();
89 const std::string &filename);
91 void saveCalibrationTable(
const std::string &filename);
104 const std::string
name()
const override {
return "CorelliCalibrationDatabase"; };
106 const std::string
category()
const override {
return "Diffraction\\Calibration"; };
109 const std::vector<std::string>
seeAlso()
const override {
110 return {
"CorelliPowderCalibrationCreate",
"CorelliCalibrationApply"};
114 return "Save calibrated components' positions and orientations to "
119 static inline std::string corelliComponentDatabaseName(
const std::string &componentname,
120 const std::string &directory);
122 static inline std::string corelliCalibrationDatabaseName(
const std::string &datestamp,
const std::string &directory);
124 static std::string convertTimeStamp(
const std::string &run_start_time);
127 static inline bool isFileExist(
const std::string &filepath);
130 static inline std::string joinPath(
const std::string &directory,
const std::string &basename);
136 std::map<std::string, std::string> validateInputs()
override;
137 void init()
override;
138 void exec()
override;
141 void updateComponentDatabaseFiles(
const std::string &calibdbdir,
142 std::map<std::string, DataObjects::TableWorkspace_sptr> &calibwsmap);
144 void loadNonCalibratedComponentDatabase(
const std::string &calibddir,
145 std::map<std::string, DataObjects::TableWorkspace_sptr> &calibwsmap);
147 void createOutputCalibrationTable(std::map<std::string, DataObjects::TableWorkspace_sptr> &calibwsmap,
148 const std::vector<std::string> &orderedcomponents);
150 void saveCalibrationTable(
const std::string &calibdbdir);
153 void setComponentMap(
const std::vector<std::string> &componentnames,
154 std::map<std::string, DataObjects::TableWorkspace_sptr> &compmap);
Base class from which all concrete algorithm classes should be derived.
CorelliCalibrationDatabase: blablabla TODO.
std::string mDateStamp
Date stamp: YYYYMMDD.
const std::vector< std::string > seeAlso() const override
Extra help info.
const std::string category() const override
function to return a category of the algorithm.
DataObjects::TableWorkspace_sptr mInputCalibrationTableWS
Input calibration worksapce.
const std::string summary() const override
function returns a summary message that will be displayed in the default GUI, and in the help.
int version() const override
function to return a version of the algorithm, must be overridden in all algorithms
DataObjects::TableWorkspace_sptr mOutputWS
Output calibration worksapce (merged with previous calibrated data)
API::MatrixWorkspace_sptr mInputWS
Input workspace where the calibration is from.
const std::string name() const override
function to return a name of the algorithm, must be overridden in all algorithms
Class containing static and member methods to work with calibration table workspaces.
DataObjects::TableWorkspace_sptr mCalibWS
DataObjects::TableWorkspace_sptr getCalibrationWorkspace()
Get calibration workspace.
bool isSingleComponentTable
std::shared_ptr< MatrixWorkspace > MatrixWorkspace_sptr
shared pointer to the matrix workspace base class
static const std::vector< std::string > calibrationTableColumnTypes
static const std::vector< std::string > calibrationTableColumnNames
std::shared_ptr< TableWorkspace > TableWorkspace_sptr
shared pointer to Mantid::DataObjects::TableWorkspace
Helper class which provides the Collimation Length for SANS instruments.
Load a single-component database file to a table workspace of history of positions for the component.
Structure to handle all the calibration component positions.
bool equalTo(const ComponentPosition &otherpos, double abstol)