30#include <boost/container/flat_set.hpp>
31#include <boost/math/special_functions/round.hpp>
54 std::vector<std::pair<std::string, bool>> criteria{{
"BankName",
true}};
55 peaksWs->sort(criteria);
60 std::vector<Peak> &peaks = peaksWs->getPeaks();
61 auto it = std::remove_if(peaks.begin(), peaks.end(), [edge, inst](
const Peak &pk) {
62 return edgePixel(inst, pk.getBankName(), pk.getCol(), pk.getRow(), edge);
64 peaks.erase(it, peaks.end());
68 auto nPeaks =
static_cast<int>(peaksWs->getNumberPeaks());
72 bool snapPanels =
getProperty(
"CalibrateSNAPPanels");
79 boost::container::flat_set<string> MyBankNames;
80 boost::container::flat_set<string> MyPanels;
82 MyPanels.insert(
"East");
83 MyPanels.insert(
"West");
84 int maxRecurseDepth = 4;
87 for (
int num = 1; num < 64; ++num) {
89 std::ostringstream mess;
90 mess <<
"bank" << num;
94 MyBankNames.insert(mess.str());
99 for (
int i = 0; i < nPeaks; ++i) {
100 std::string
name = peaksWs->getPeak(i).getBankName();
102 MyBankNames.insert(
name);
106 std::vector<std::string> fit_workspaces(MyBankNames.size() + MyPanels.size(),
"fit_");
107 std::vector<std::string> parameter_workspaces(MyBankNames.size() + MyPanels.size(),
"params_");
108 int bankAndPanelCount = 0;
109 for (
auto &MyPanel : MyPanels) {
110 fit_workspaces[bankAndPanelCount] += MyPanel;
111 parameter_workspaces[bankAndPanelCount] += MyPanel;
115 findL2(MyPanels, peaksWs);
117 double delta = results->cell<
double>(4, 1);
118 g_log.
notice() <<
"For west rotation change det_arc1 " <<
delta <<
" degrees\n";
120 delta = results->cell<
double>(4, 1);
121 g_log.
notice() <<
"For east rotation change det_arc2 " <<
delta <<
" degrees\n";
124 for (
auto &MyBankName : MyBankNames) {
125 fit_workspaces[bankAndPanelCount] += MyBankName;
126 parameter_workspaces[bankAndPanelCount] += MyBankName;
130 findL2(MyBankNames, peaksWs);
134 for (
int j = bankAndPanelCount - 1; j >= 0; j--) {
136 fit_workspaces.erase(fit_workspaces.begin() + j);
138 parameter_workspaces.erase(parameter_workspaces.begin() + j);
144 parameter_workspaces.emplace_back(
"params_L1");
145 fit_workspaces.emplace_back(
"fit_L1");
149 parameter_workspaces.emplace_back(
"params_T0");
150 fit_workspaces.emplace_back(
"fit_T0");
152 std::sort(parameter_workspaces.begin(), parameter_workspaces.end());
153 std::sort(fit_workspaces.begin(), fit_workspaces.end());
157 groupAlg->initialize();
158 groupAlg->setProperty(
"InputWorkspaces", parameter_workspaces);
159 groupAlg->setProperty(
"OutputWorkspace",
"Fit_Parameters");
163 groupAlg->initialize();
164 groupAlg->setProperty(
"InputWorkspaces", fit_workspaces);
165 groupAlg->setProperty(
"OutputWorkspace",
"Fit_Residuals");
172 for (
int i = 0; i < nPeaks; i++) {
177 }
catch (
const std::exception &exc) {
178 g_log.
notice() <<
"Problem in applying calibration to peak " << i <<
" : " << exc.what() <<
"\n";
187 string DetCalFileName =
getProperty(
"DetCalFilename");
188 API::Run &run = peaksWs->mutableRun();
201 ColWksp->setInstrument(inst2);
204 RowWksp->setInstrument(inst2);
207 TofWksp->setInstrument(inst2);
208 OrientedLattice lattice = peaksWs->mutableSample().getOrientedLattice();
211 peaksWs->sort(criteria);
213 for (
int i = 0; i < static_cast<int>(MyBankNames.size()); ++i) {
215 const std::string &bankName = *std::next(MyBankNames.begin(), i);
216 size_t k = bankName.find_last_not_of(
"0123456789");
218 if (k < bankName.length())
219 bank = boost::lexical_cast<int>(bankName.substr(k + 1));
220 ColWksp->getSpectrum(i).setSpectrumNo(
specnum_t(bank));
221 RowWksp->getSpectrum(i).setSpectrumNo(
specnum_t(bank));
222 TofWksp->getSpectrum(i).setSpectrumNo(
specnum_t(bank));
223 auto &ColX = ColWksp->mutableX(i);
224 auto &ColY = ColWksp->mutableY(i);
225 auto &RowX = RowWksp->mutableX(i);
226 auto &RowY = RowWksp->mutableY(i);
227 auto &TofX = TofWksp->mutableX(i);
228 auto &TofY = TofWksp->mutableY(i);
230 for (
int j = 0; j < nPeaks; j++) {
231 Peak peak = peaksWs->getPeak(j);
236 ColX[icount] = peak.
getCol();
237 ColY[icount] = theoretical.
getCol();
238 RowX[icount] = peak.
getRow();
239 RowY[icount] = theoretical.
getRow();
240 TofX[icount] = peak.
getTOF();
241 TofY[icount] = theoretical.
getTOF();
262 save->setProperty(
"InputWorkspace", outputWS);
263 save->setProperty(
"FileName", outputFile);
278 std::ostringstream fun_str;
279 fun_str <<
"name=SCDPanelErrors,Workspace=" << peaksWs->getName() <<
",Bank=moderator";
280 std::ostringstream tie_str;
281 tie_str <<
"XShift=0.0,YShift=0.0,XRotate=0.0,YRotate=0.0,ZRotate=0.0,"
282 "ScaleWidth=1.0,ScaleHeight=1.0,T0Shift ="
284 fitL1_alg->setPropertyValue(
"Function", fun_str.str());
285 fitL1_alg->setProperty(
"Ties", tie_str.str());
286 fitL1_alg->setProperty(
"InputWorkspace", L1WS);
287 fitL1_alg->setProperty(
"CreateOutput",
true);
288 fitL1_alg->setProperty(
"Output",
"fit");
289 fitL1_alg->executeAsChildAlg();
290 std::string fitL1Status = fitL1_alg->getProperty(
"OutputStatus");
291 double chisqL1 = fitL1_alg->getProperty(
"OutputChi2overDoF");
296 double deltaL1 = paramsL1->getRef<
double>(
"Value", 2);
298 com.
moveDetector(0.0, 0.0, deltaL1, 0.0, 0.0, 0.0, 1.0, 1.0,
"moderator", peaksWs);
299 g_log.
notice() <<
"L1 = " << -peaksWs->getInstrument()->getSource()->getPos().Z() <<
" " << fitL1Status
300 <<
" Chi2overDoF " << chisqL1 <<
"\n";
314 std::ostringstream fun_str;
315 fun_str <<
"name=SCDPanelErrors,Workspace=" << peaksWs->getName() <<
",Bank=none";
316 std::ostringstream tie_str;
317 tie_str <<
"XShift=0.0,YShift=0.0,ZShift=0.0,XRotate=0.0,YRotate=0.0,ZRotate=0.0,"
318 "ScaleWidth=1.0,ScaleHeight=1.0";
319 fitT0_alg->setPropertyValue(
"Function", fun_str.str());
320 fitT0_alg->setProperty(
"Ties", tie_str.str());
321 fitT0_alg->setProperty(
"InputWorkspace", T0WS);
322 fitT0_alg->setProperty(
"CreateOutput",
true);
323 fitT0_alg->setProperty(
"Output",
"fit");
325 fitT0_alg->setProperty(
"Minimizer",
"Simplex");
326 fitT0_alg->setProperty(
"MaxIterations", 1000);
327 fitT0_alg->executeAsChildAlg();
328 std::string fitT0Status = fitT0_alg->getProperty(
"OutputStatus");
329 double chisqT0 = fitT0_alg->getProperty(
"OutputChi2overDoF");
334 mT0 = paramsT0->getRef<
double>(
"Value", 8);
335 API::Run &run = peaksWs->mutableRun();
338 if (run.hasProperty(
"T0")) {
341 run.addProperty<
double>(
"T0",
mT0 + oldT0,
true);
342 g_log.
notice() <<
"T0 = " <<
mT0 <<
" " << fitT0Status <<
" Chi2overDoF " << chisqT0 <<
"\n";
343 for (
int i = 0; i < peaksWs->getNumberPeaks(); i++) {
358 g_log.
error(
"Can't locate CalculateUMatrix algorithm");
369 peaksWs->sample().hasOrientedLattice()) {
374 alpha = latt.
alpha();
376 gamma = latt.
gamma();
378 ub_alg->setProperty(
"PeaksWorkspace", peaksWs);
379 ub_alg->setProperty(
"a", a);
380 ub_alg->setProperty(
"b", b);
381 ub_alg->setProperty(
"c", c);
382 ub_alg->setProperty(
"alpha", alpha);
383 ub_alg->setProperty(
"beta", beta);
384 ub_alg->setProperty(
"gamma", gamma);
385 ub_alg->executeAsChildAlg();
389 alg->setPropertyValue(
"PeaksWorkspace", peaksWs->getName());
390 alg->setProperty(
"Tolerance", 0.15);
391 alg->executeAsChildAlg();
392 int numIndexed = alg->getProperty(
"NumIndexed");
394 g_log.
notice() << peaksWs->sample().getOrientedLattice().getUB() <<
"\n";
408 boost::container::flat_set<string> &AllBankName,
double T0,
409 const string &filename) {
411 if (filename.empty())
414 g_log.
notice() <<
"Saving DetCal file in " << filename <<
"\n";
417 const size_t number_spectra = instrument->getNumberDetectors();
420 wksp->setInstrument(instrument);
421 wksp->rebuildSpectraMapping(
true );
424 std::vector<string> banknames(AllBankName.begin(), AllBankName.end());
428 alg->setProperty(
"InputWorkspace", wksp);
429 alg->setProperty(
"Filename", filename);
430 alg->setProperty(
"TimeOffset", T0);
431 alg->setProperty(
"BankNames", banknames);
432 alg->executeAsChildAlg();
437 "Workspace of Indexed Peaks");
439 auto mustBePositive = std::make_shared<BoundedValidator<double>>();
440 mustBePositive->setLower(0.0);
443 "Lattice Parameter a (Leave empty to use lattice constants "
444 "in peaks workspace)");
446 "Lattice Parameter b (Leave empty to use lattice constants "
447 "in peaks workspace)");
449 "Lattice Parameter c (Leave empty to use lattice constants "
450 "in peaks workspace)");
452 "Lattice Parameter alpha in degrees (Leave empty to use "
453 "lattice constants in peaks workspace)");
455 "Lattice Parameter beta in degrees (Leave empty to use "
456 "lattice constants in peaks workspace)");
458 "Lattice Parameter gamma in degrees (Leave empty to use "
459 "lattice constants in peaks workspace)");
460 declareProperty(
"ChangeL1",
true,
"Change the L1(source to sample) distance");
463 "Change the height and width of the "
464 "detectors. Implemented only for "
465 "RectangularDetectors.");
467 declareProperty(
"EdgePixels", 0,
"Remove peaks that are at pixels this close to edge. ");
468 declareProperty(
"CalibrateBanks",
true,
"Calibrate the panels of the banks.");
470 "Calibrate the 3 X 3 panels of the "
474 const std::vector<std::string> detcalExts{
".DetCal",
".Det_Cal"};
476 std::make_unique<FileProperty>(
"DetCalFilename",
"SCDCalibrate.DetCal",
FileProperty::Save, detcalExts),
477 "Path to an ISAW-style .detcal file to save.");
480 "Path to an Mantid .xml description(for LoadParameterFile) file to "
484 "Path to a NeXus file comparing calculated and theoretical "
485 "column of each peak.");
488 "Path to a NeXus file comparing calculated and theoretical "
489 "row of each peak.");
492 "Path to a NeXus file comparing calculated and theoretical "
493 "TOF of each peak.");
495 const string OUTPUTS(
"Outputs");
504 ostream <<
" <parameter name =\"" << name <<
"\"><value val=\"" <<
value <<
"\" /> </parameter>\n";
509 if (FileName.empty())
512 g_log.
notice() <<
"Saving parameter file as " << FileName <<
"\n";
515 ofstream oss3(FileName.c_str());
516 oss3 <<
"<?xml version=\"1.0\" encoding=\"UTF-8\" ?>\n";
517 oss3 <<
" <parameter-file instrument=\"" << instrument.
getName() <<
"\" valid-from=\""
522 for (
auto bankName : AllBankNames) {
523 if (instrument.
getName().compare(
"CORELLI") == 0.0)
524 bankName.append(
"/sixteenpack");
525 oss3 <<
"<component-link name=\"" << bankName <<
"\">\n";
528 Quat relRot = bank->getRelativeRot();
536 V3D pos1 = bank->getRelativePos();
541 vector<double> oldScalex =
pmap->getDouble(bank->getName(),
string(
"scalex"));
542 vector<double> oldScaley =
pmap->getDouble(bank->getName(),
string(
"scaley"));
545 if (!oldScalex.empty())
550 if (!oldScaley.empty())
555 oss3 << R
"( <parameter name ="scalex"><value val=")" << scalex << "\" /> </parameter>\n";
556 oss3 << R
"( <parameter name ="scaley"><value val=")" << scaley << "\" /> </parameter>\n";
557 oss3 <<
"</component-link>\n";
563 oss3 <<
"<component-link name=\"" << source->getName() <<
"\">\n";
564 V3D sourceRelPos = source->getRelativePos();
569 oss3 <<
"</component-link>\n";
570 oss3 <<
"</parameter-file>\n";
582 for (
int bankIndex = 0; bankIndex < static_cast<int>(MyBankNames.size()); ++bankIndex) {
584 const std::string &iBank = *std::next(MyBankNames.begin(), bankIndex);
585 const std::string bankName =
"__PWS_" + iBank;
588 std::vector<Peak> &localPeaks = local->getPeaks();
589 auto lit = std::remove_if(localPeaks.begin(), localPeaks.end(), [&iBank](
const Peak &pk) {
590 std::string name = pk.getBankName();
591 IComponent_const_sptr det = pk.getInstrument()->getComponentByName(name);
592 if (det && iBank.substr(0, 4) !=
"bank") {
593 IComponent_const_sptr parent = det->getParent();
595 IComponent_const_sptr grandparent = parent->getParent();
597 name = grandparent->getName();
602 return name != iBank;
604 localPeaks.erase(lit, localPeaks.end());
606 int nBankPeaks = local->getNumberPeaks();
607 if (nBankPeaks < 6) {
608 g_log.
notice() <<
"Too few peaks for " << iBank <<
"\n";
615 auto &outSpec = q3DWS->getSpectrum(0);
616 auto &yVec = outSpec.mutableY();
617 auto &eVec = outSpec.mutableE();
618 auto &xVec = outSpec.mutableX();
621 for (
int i = 0; i < nBankPeaks; i++) {
631 for (
int j = 0; j < 3; j++) {
645 std::ostringstream fun_str;
646 fun_str <<
"name=SCDPanelErrors,Workspace=" + bankName <<
",Bank=" << iBank;
647 fit_alg->setPropertyValue(
"Function", fun_str.str());
648 std::ostringstream tie_str;
649 tie_str <<
"ScaleWidth=1.0,ScaleHeight=1.0,T0Shift =" <<
mT0;
650 fit_alg->setProperty(
"Ties", tie_str.str());
651 fit_alg->setProperty(
"InputWorkspace", q3DWS);
652 fit_alg->setProperty(
"CreateOutput",
true);
653 fit_alg->setProperty(
"Output",
"fit");
654 fit_alg->executeAsChildAlg();
655 std::string fitStatus = fit_alg->getProperty(
"OutputStatus");
656 double fitChisq = fit_alg->getProperty(
"OutputChi2overDoF");
657 g_log.
notice() << iBank <<
" " << fitStatus <<
" Chi2overDoF " << fitChisq <<
"\n";
662 double xShift = paramsWS->getRef<
double>(
"Value", 0);
663 double yShift = paramsWS->getRef<
double>(
"Value", 1);
664 double zShift = paramsWS->getRef<
double>(
"Value", 2);
665 double xRotate = paramsWS->getRef<
double>(
"Value", 3);
666 double yRotate = paramsWS->getRef<
double>(
"Value", 4);
667 double zRotate = paramsWS->getRef<
double>(
"Value", 5);
668 double scaleWidth = 1.0;
669 double scaleHeight = 1.0;
672 std::shared_ptr<const Geometry::RectangularDetector> rectDet =
673 std::dynamic_pointer_cast<const Geometry::RectangularDetector>(comp);
674 if (rectDet && changeSize) {
682 fit2_alg->setPropertyValue(
"Function", fun_str.str());
683 std::ostringstream tie_str2;
684 tie_str2 <<
"XShift=" << xShift <<
",YShift=" << yShift <<
",ZShift=" << zShift <<
",XRotate=" << xRotate
685 <<
",YRotate=" << yRotate <<
",ZRotate=" << zRotate <<
",T0Shift =" <<
mT0;
686 fit2_alg->setProperty(
"Ties", tie_str2.str());
687 fit2_alg->setProperty(
"InputWorkspace", q3DWS);
688 fit2_alg->setProperty(
"CreateOutput",
true);
689 fit2_alg->setProperty(
"Output",
"fit");
690 fit2_alg->executeAsChildAlg();
691 std::string fit2Status = fit2_alg->getProperty(
"OutputStatus");
692 double fit2Chisq = fit2_alg->getProperty(
"OutputChi2overDoF");
693 g_log.
notice() << iBank <<
" " << fit2Status <<
" Chi2overDoF " << fit2Chisq <<
"\n";
694 fitWS = fit2_alg->getProperty(
"OutputWorkspace");
696 paramsWS = fit2_alg->getProperty(
"OutputParameters");
698 scaleWidth = paramsWS->getRef<
double>(
"Value", 6);
699 scaleHeight = paramsWS->getRef<
double>(
"Value", 7);
703 det.
moveDetector(xShift, yShift, zShift, xRotate, yRotate, zRotate, scaleWidth, scaleHeight, iBank, peaksWs);
#define DECLARE_ALGORITHM(classname)
double value
The value of the point.
#define PARALLEL_START_INTERRUPT_REGION
Begins a block to skip processing is the algorithm has been interupted Note the end of the block if n...
#define PARALLEL_CRITICAL(name)
#define PARALLEL_END_INTERRUPT_REGION
Ends a block to skip processing is the algorithm has been interupted Note the start of the block if n...
#define PARALLEL_FOR_IF(condition)
Empty definitions - to enable set your complier to enable openMP.
#define PRAGMA_OMP(expression)
#define PARALLEL_CHECK_INTERRUPT_REGION
Adds a check after a Parallel region to see if it was interupted.
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.
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.
@ OptionalSave
to specify a file to write to but an empty string is
@ Save
to specify a file to write to, the file may or may not exist
ITableWorkspace is an implementation of Workspace in which the data are organised in columns of same ...
bool hasProperty(const std::string &name) const
Does the property exist on the object.
HeldType getPropertyValueAsType(const std::string &name) const
Get the value of a property as the given TYPE.
This class stores information regarding an experimental run as a series of log entries.
A property class for workspaces.
SCDCalibratePanels calibrates instrument parameters for Rectangular Detectors.
void saveXmlFile(const std::string &FileName, const boost::container::flat_set< std::string > &AllBankNames, const Geometry::Instrument &instrument) const
Saves the new instrument to an xml file that can be used with the LoadParameterFile Algorithm.
void init() override
Virtual method - must be overridden by concrete algorithm.
const std::string name() const override
function to return a name of the algorithm, must be overridden in all algorithms
void findT0(int nPeaks, const DataObjects::PeaksWorkspace_sptr &peaksWs)
Function to optimize T0.
void findL2(boost::container::flat_set< std::string > MyBankNames, const DataObjects::PeaksWorkspace_sptr &peaksWs)
Function to optimize L2.
int version() const override
Algorithm's version for identification overriding a virtual method.
void saveIsawDetCal(std::shared_ptr< Geometry::Instrument > &instrument, boost::container::flat_set< std::string > &AllBankName, double T0, const std::string &filename)
Really this is the operator SaveIsawDetCal but only the results of the given banks are saved.
void findU(const DataObjects::PeaksWorkspace_sptr &peaksWs)
Function to calculate U.
void exec() override
Virtual method - must be overridden by concrete algorithm.
void saveNexus(const std::string &outputFile, const API::MatrixWorkspace_sptr &outputWS)
save workspaces
void findL1(int nPeaks, const DataObjects::PeaksWorkspace_sptr &peaksWs)
Function to optimize L1.
const std::string category() const override
Algorithm's category for identification overriding a virtual method.
void moveDetector(double x, double y, double z, double rotx, double roty, double rotz, double scalex, double scaley, std::string detname, const API::Workspace_sptr &inputW) const
Move detectors with parameters.
double getIntensity() const override
Return the integrated peak intensity.
double getSigmaIntensity() const override
Return the error on the integrated peak intensity.
Mantid::Kernel::V3D getHKL() const override
Return the HKL vector.
double getBinCount() const override
Return the # of counts in the bin at its peak.
Mantid::Kernel::Matrix< double > getGoniometerMatrix() const override
Get the goniometer rotation matrix at which this peak was measured.
Structure describing a single-crystal peak.
int getCol() const override
For RectangularDetectors only, returns the column (x) of the pixel of the detector or -1 if not found...
Geometry::Instrument_const_sptr getInstrument() const
Return a shared ptr to the instrument for this peak.
std::string getBankName() const
Find the name of the bank that is the parent of the detector.
int getRow() const override
For RectangularDetectors only, returns the row (y) of the pixel of the detector or -1 if not found.
void setWavelength(double wavelength) override
Set the incident wavelength of the neutron.
double getL1() const override
Return the L1 flight path length (source to sample), in meters.
double getTOF() const override
Calculate the time of flight (in microseconds) of the neutrons for this peak, using the geometry of t...
double getL2() const override
Return the L2 flight path length (sample to detector), in meters.
void setInstrument(const Geometry::Instrument_const_sptr &inst)
Set the instrument (and save the source/sample pos).
double getScattering() const override
Calculate the scattering angle of the peak
std::shared_ptr< const IComponent > getComponentByName(const std::string &cname, int nlevels=0) const override
Returns a pointer to the first component of assembly encountered with the given name.
std::string getName() const override
Get the IComponent name.
IComponent_const_sptr getSource() const
Gets a pointer to the source.
std::shared_ptr< ParameterMap > getParameterMap() const
Pointer to the NOT const ParameterMap holding the parameters of the modified instrument components.
Types::Core::DateAndTime getValidFromDate() const
Class to implement UB matrix.
const Kernel::DblMatrix & getUB() const
Get the UB matrix.
double alpha() const
Get lattice parameter.
double a(int nd) const
Get lattice parameter a1-a3 as function of index (0-2)
double c() const
Get lattice parameter.
double beta() const
Get lattice parameter.
double b() const
Get lattice parameter.
double gamma() const
Get lattice parameter.
Exception for when an item is not found in a collection.
void setPropertyGroup(const std::string &name, const std::string &group)
Set the group for a given property.
void notice(const std::string &msg)
Logs at notice level.
void error(const std::string &msg)
Logs at error level.
std::vector< double > getEulerAngles(const std::string &convention) const
Calculate the Euler angles that are equivalent to this Quaternion.
static T & Instance()
Return a reference to the Singleton instance, creating it if it does not already exist Creation is do...
void initialize(const double &_l1, const int &_emode, const UnitParametersMap ¶ms)
Initialize the unit to perform conversion using singleToTof() and singleFromTof()
double singleFromTOF(const double tof) const override
Convert a single tof value to this unit.
constexpr double X() const noexcept
Get x.
constexpr double Y() const noexcept
Get y.
constexpr double Z() const noexcept
Get z.
std::shared_ptr< IAlgorithm > IAlgorithm_sptr
shared pointer to Mantid::API::IAlgorithm
std::shared_ptr< ITableWorkspace > ITableWorkspace_sptr
shared pointer to Mantid::API::ITableWorkspace
std::shared_ptr< MatrixWorkspace > MatrixWorkspace_sptr
shared pointer to the matrix workspace base class
void writeXmlParameter(ofstream &ostream, const string &name, const double value)
std::shared_ptr< Workspace2D > Workspace2D_sptr
shared pointer to Mantid::DataObjects::Workspace2D
std::shared_ptr< PeaksWorkspace > PeaksWorkspace_sptr
Typedef for a shared pointer to a peaks workspace.
std::unique_ptr< T > create(const P &parent, const IndexArg &indexArg, const HistArg &histArg)
This is the create() method that all the other create() methods call.
std::shared_ptr< const IComponent > IComponent_const_sptr
Typdef of a shared pointer to a const IComponent.
std::shared_ptr< ParameterMap > ParameterMap_sptr
ParameterMap shared pointer typedef.
std::shared_ptr< const Instrument > Instrument_const_sptr
Shared pointer to an const instrument object.
std::shared_ptr< Instrument > Instrument_sptr
Shared pointer to an instrument object.
std::enable_if< std::is_pointer< Arg >::value, bool >::type threadSafe(Arg workspace)
Thread-safety check Checks the workspace to ensure it is suitable for multithreaded access.
int32_t specnum_t
Typedef for a spectrum Number.
constexpr double EMPTY_DBL() noexcept
Returns what we consider an "empty" double within a property.
Generate a tableworkspace to store the calibration results.
adjust instrument component position and orientation
: detector size scale at y-direction
@ InOut
Both an input & output workspace.