Mantid
Loading...
Searching...
No Matches
ReflectometryTransform.cpp
Go to the documentation of this file.
1// Mantid Repository : https://github.com/mantidproject/mantid
2//
3// Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI,
4// NScD Oak Ridge National Laboratory, European Spallation Source,
5// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS
6// SPDX - License - Identifier: GPL - 3.0 +
8
13#include "MantidAPI/TableRow.h"
28#include "MantidKernel/Unit.h"
30#include "MantidKernel/V2D.h"
32
33#include <memory>
34#include <utility>
35
36using namespace Mantid::API;
37using namespace Mantid::Geometry;
38using namespace Mantid::Kernel;
39
40namespace {
51void writeRow(std::shared_ptr<Mantid::DataObjects::TableWorkspace> &vertexes, const V2D &vertex, size_t nHisto,
52 size_t nBins, double signal, double error) {
53 TableRow row = vertexes->appendRow();
54 row << vertex.X() << vertex.Y() << int(nHisto) << int(nBins) << signal << error;
55}
60void addColumnHeadings(Mantid::DataObjects::TableWorkspace &vertexes, const std::string &outputDimensions) {
61
62 if (outputDimensions == "Q (lab frame)") {
63 vertexes.addColumn("double", "Qx");
64 vertexes.addColumn("double", "Qy");
65 vertexes.addColumn("int", "OriginIndex");
66 vertexes.addColumn("int", "OriginBin");
67 vertexes.addColumn("double", "CellSignal");
68 vertexes.addColumn("double", "CellError");
69 }
70 if (outputDimensions == "P (lab frame)") {
71 vertexes.addColumn("double", "Pi+Pf");
72 vertexes.addColumn("double", "Pi-Pf");
73 vertexes.addColumn("int", "OriginIndex");
74 vertexes.addColumn("int", "OriginBin");
75 vertexes.addColumn("double", "CellSignal");
76 vertexes.addColumn("double", "CellError");
77 }
78 if (outputDimensions == "K (incident, final)") {
79 vertexes.addColumn("double", "Ki");
80 vertexes.addColumn("double", "Kf");
81 vertexes.addColumn("int", "OriginIndex");
82 vertexes.addColumn("int", "OriginBin");
83 vertexes.addColumn("double", "CellSignal");
84 vertexes.addColumn("double", "CellError");
85 }
86}
87} // namespace
88namespace Mantid::DataObjects {
89
104ReflectometryTransform::ReflectometryTransform(std::string d0Label, std::string d0ID, double d0Min, double d0Max,
105 std::string d1Label, std::string d1ID, double d1Min, double d1Max,
106 size_t d0NumBins, size_t d1NumBins, CalculateReflectometry *calc)
107 : m_d0NumBins(d0NumBins), m_d1NumBins(d1NumBins), m_d0Min(d0Min), m_d1Min(d1Min), m_d0Max(d0Max), m_d1Max(d1Max),
108 m_d0Label(std::move(d0Label)), m_d1Label(std::move(d1Label)), m_d0ID(std::move(d0ID)), m_d1ID(std::move(d1ID)),
109 m_calculator(calc) {
110 if (d0Min >= d0Max || d1Min >= d1Max)
111 throw std::invalid_argument("The supplied minimum values must be less than the maximum values.");
112}
113
120std::shared_ptr<MDEventWorkspace2Lean>
123 const BoxController_sptr &boxController) const {
124 auto ws = std::make_shared<MDEventWorkspace2Lean>();
125
126 ws->addDimension(a);
127 ws->addDimension(b);
128
129 BoxController_sptr wsbc = ws->getBoxController(); // Get the box controller
130 wsbc->setSplitInto(boxController->getSplitInto(0));
131 wsbc->setMaxDepth(boxController->getMaxDepth());
132 wsbc->setSplitThreshold(boxController->getSplitThreshold());
133
134 // Initialize the workspace.
135 ws->initialize();
136
137 // Start with a MDGridBox.
138 ws->splitBox();
139 return ws;
140}
141
152MantidVec createXAxis(MatrixWorkspace *const ws, const double gradX, const double cxToUnit, const size_t nBins,
153 const std::string &caption, const std::string &units) {
154 // Create an X - Axis.
155 auto xAxis = std::make_unique<BinEdgeAxis>(nBins);
156 auto xAxisRaw = xAxis.get();
157 ws->replaceAxis(0, std::move(xAxis));
158 auto unitXBasePtr = UnitFactory::Instance().create("Label");
159 std::shared_ptr<Mantid::Kernel::Units::Label> xUnit =
160 std::dynamic_pointer_cast<Mantid::Kernel::Units::Label>(unitXBasePtr);
161 xUnit->setLabel(caption, units);
162 xAxisRaw->unit() = xUnit;
163 xAxisRaw->title() = caption;
164 MantidVec xAxisVec(nBins);
165 for (size_t i = 0; i < nBins; ++i) {
166 double qxIncrement = ((1 / gradX) * (static_cast<double>(i) + 1) + cxToUnit);
167 xAxisRaw->setValue(i, qxIncrement);
168 xAxisVec[i] = qxIncrement;
169 }
170 return xAxisVec;
171}
172
183void createVerticalAxis(MatrixWorkspace *const ws, const MantidVec &xAxisVec, const double gradY, const double cyToUnit,
184 const size_t nBins, const std::string &caption, const std::string &units) {
185 // Create a Y (vertical) Axis
186 auto verticalAxis = std::make_unique<BinEdgeAxis>(nBins);
187 auto verticalAxisRaw = verticalAxis.get();
188 ws->replaceAxis(1, std::move(verticalAxis));
189 auto unitZBasePtr = UnitFactory::Instance().create("Label");
190 std::shared_ptr<Mantid::Kernel::Units::Label> verticalUnit =
191 std::dynamic_pointer_cast<Mantid::Kernel::Units::Label>(unitZBasePtr);
192 verticalAxisRaw->unit() = verticalUnit;
193 verticalUnit->setLabel(caption, units);
194 verticalAxisRaw->title() = caption;
195 auto xAxis = Kernel::make_cow<HistogramData::HistogramX>(xAxisVec);
196 for (size_t i = 0; i < nBins; ++i) {
197 ws->setX(i, xAxis);
198 double qzIncrement = ((1 / gradY) * (static_cast<double>(i) + 1) + cyToUnit);
199 verticalAxisRaw->setValue(i, qzIncrement);
200 }
201}
202
212 const size_t nhist = workspace->getNumberHistograms();
213 std::vector<double> twoThetas(nhist);
214 std::vector<double> twoThetaWidths(nhist);
215 std::vector<double> detectorHeights(nhist);
216
217 auto inst = workspace->getInstrument();
218 const V3D upDirVec = inst->getReferenceFrame()->vecPointingUp();
219
220 const auto &spectrumInfo = workspace->spectrumInfo();
221 const auto &detectorInfo = workspace->detectorInfo();
222 for (size_t i = 0; i < nhist; ++i) {
223 if (!spectrumInfo.hasDetectors(i) || spectrumInfo.isMonitor(i)) {
224 // If no detector found, skip onto the next spectrum
225 twoThetas[i] = -1.0; // Indicates a detector to skip
226 twoThetaWidths[i] = -1.0;
227 continue;
228 }
229
230 // We have to convert twoTheta from radians to degrees
231 const double twoTheta = spectrumInfo.signedTwoTheta(i) * rad2deg;
232 twoThetas[i] = twoTheta;
240 // If the spectrum is based on a group of detectors assume they all have
241 // same shape and same r,twoTheta
242 // DetectorGroup::getID gives ID of first detector.
243 size_t detIndex = detectorInfo.indexOf(spectrumInfo.detector(i).getID());
244 double l2 = detectorInfo.l2(detIndex);
245 // Get the shape
246 auto shape = detectorInfo.detector(detIndex).shape(); // Defined in its own reference frame with centre at 0,0,0
247 BoundingBox bbox = shape->getBoundingBox();
248 auto maxPoint(bbox.maxPoint());
249 auto minPoint(bbox.minPoint());
250 auto span = maxPoint - minPoint;
251 detectorHeights[i] = span.scalar_prod(upDirVec);
252 twoThetaWidths[i] =
253 (std::atan(maxPoint.scalar_prod(upDirVec) / l2) - std::atan(minPoint.scalar_prod(upDirVec) / l2)) * rad2deg;
254 }
256 cache.twoThetas = twoThetas;
257 cache.twoThetaWidths = twoThetaWidths;
258 cache.detectorHeights = detectorHeights;
259 return cache;
260}
261
271 const BoxController_sptr &boxController, Mantid::Geometry::MDFrame_uptr frame) const {
272 auto dim0 = std::make_shared<MDHistoDimension>(m_d0Label, m_d0ID, *frame, static_cast<Mantid::coord_t>(m_d0Min),
273 static_cast<Mantid::coord_t>(m_d0Max), m_d0NumBins);
274 auto dim1 = std::make_shared<MDHistoDimension>(m_d1Label, m_d1ID, *frame, static_cast<Mantid::coord_t>(m_d1Min),
275 static_cast<Mantid::coord_t>(m_d1Max), m_d1NumBins);
276
277 auto ws = createMDWorkspace(dim0, dim1, boxController);
278
279 auto spectraAxis = inputWs->getAxis(1);
280 for (size_t index = 0; index < inputWs->getNumberHistograms(); ++index) {
281 auto counts = inputWs->readY(index);
282 auto wavelengths = inputWs->readX(index);
283 auto errors = inputWs->readE(index);
284 const size_t nInputBins = wavelengths.size() - 1;
285 const double twoTheta = spectraAxis->getValue(index);
286 m_calculator->setTwoTheta(twoTheta);
287 // Loop over all bins in spectra
288 for (size_t binIndex = 0; binIndex < nInputBins; ++binIndex) {
289 const double &wavelength = 0.5 * (wavelengths[binIndex] + wavelengths[binIndex + 1]);
290 double _d0 = m_calculator->calculateDim0(wavelength);
291 double _d1 = m_calculator->calculateDim1(wavelength);
292 double centers[2] = {_d0, _d1};
293
294 ws->addEvent(MDLeanEvent<2>(float(counts[binIndex]), float(errors[binIndex] * errors[binIndex]), centers));
295 }
296 }
297 ws->splitAllIfNeeded(nullptr);
298 ws->refreshCache();
299 return ws;
300}
301
309 auto ws = std::make_shared<Mantid::DataObjects::Workspace2D>();
310
311 ws->initialize(m_d1NumBins, m_d0NumBins,
312 m_d0NumBins); // Create the output workspace as a distribution
313
314 // Mapping so that d0 and d1 values calculated can be added to the matrix
315 // workspace at the correct index.
316 const double gradD0 = double(m_d0NumBins) / (m_d0Max - m_d0Min); // The x - axis
317 const double gradD1 = double(m_d1NumBins) / (m_d1Max - m_d1Min); // Actually the y-axis
318 const double cxToIndex = -gradD0 * m_d0Min;
319 const double cyToIndex = -gradD1 * m_d1Min;
320 const double cxToD0 = m_d0Min - (1 / gradD0);
321 const double cyToD1 = m_d1Min - (1 / gradD1);
322
323 // Create an X - Axis.
324 MantidVec xAxisVec = createXAxis(ws.get(), gradD0, cxToD0, m_d0NumBins, m_d0Label, "1/Angstroms");
325 // Create a Y (vertical) Axis
326 createVerticalAxis(ws.get(), xAxisVec, gradD1, cyToD1, m_d1NumBins, m_d1Label, "1/Angstroms");
327
328 // Loop over all entries in the input workspace and calculate d0 and d1
329 // for each.
330 auto spectraAxis = inputWs->getAxis(1);
331 for (size_t index = 0; index < inputWs->getNumberHistograms(); ++index) {
332 auto counts = inputWs->readY(index);
333 auto wavelengths = inputWs->readX(index);
334 auto errors = inputWs->readE(index);
335 const size_t nInputBins = wavelengths.size() - 1;
336 const double twoTheta = spectraAxis->getValue(index);
337 m_calculator->setTwoTheta(twoTheta);
338 // Loop over all bins in spectra
339 for (size_t binIndex = 0; binIndex < nInputBins; ++binIndex) {
340 const double wavelength = 0.5 * (wavelengths[binIndex] + wavelengths[binIndex + 1]);
341 double _d0 = m_calculator->calculateDim0(wavelength);
342 double _d1 = m_calculator->calculateDim1(wavelength);
343
344 if (_d0 >= m_d0Min && _d0 <= m_d0Max && _d1 >= m_d1Min &&
345 _d1 <= m_d1Max) // Check that the calculated ki and kf are in range
346 {
347 const auto outIndexX = static_cast<int>((gradD0 * _d0) + cxToIndex);
348 const auto outIndexZ = static_cast<int>((gradD1 * _d1) + cyToIndex);
349
350 ws->dataY(outIndexZ)[outIndexX] += counts[binIndex];
351 ws->dataE(outIndexZ)[outIndexX] += errors[binIndex];
352 }
353 }
354 }
355 return ws;
356}
357
359
360 auto input_x_dim = inputWs->getXDimension();
361
363 new MDHistoDimension(input_x_dim->getName(), input_x_dim->getDimensionId(), input_x_dim->getMDFrame(),
364 static_cast<Mantid::coord_t>(input_x_dim->getMinimum()),
365 static_cast<Mantid::coord_t>(input_x_dim->getMaximum()), input_x_dim->getNBins()));
366
367 auto input_y_dim = inputWs->getYDimension();
368
370 new MDHistoDimension(input_y_dim->getName(), input_y_dim->getDimensionId(), input_y_dim->getMDFrame(),
371 static_cast<Mantid::coord_t>(input_y_dim->getMinimum()),
372 static_cast<Mantid::coord_t>(input_y_dim->getMaximum()), input_y_dim->getNBins()));
373
374 auto outWs = std::make_shared<MDHistoWorkspace>(dim0, dim1);
375
376 for (size_t nHistoIndex = 0; nHistoIndex < inputWs->getNumberHistograms(); ++nHistoIndex) {
377 const auto &Y = inputWs->y(nHistoIndex);
378 const auto &E = inputWs->e(nHistoIndex);
379
380 const size_t numBins = Y.size();
381 for (size_t nBinIndex = 0; nBinIndex < numBins; ++nBinIndex) {
382 const auto value_index = outWs->getLinearIndex(nBinIndex, nHistoIndex);
383 outWs->setSignalAt(value_index, Y[nBinIndex]);
384 outWs->setErrorSquaredAt(value_index, E[nBinIndex] * E[nBinIndex]);
385 }
386 }
387 return outWs;
388}
389
400 std::shared_ptr<Mantid::DataObjects::TableWorkspace> &vertexes,
401 bool dumpVertexes, const std::string &outputDimensions) const {
403 WorkspaceFactory::Instance().create("RebinnedOutput", m_d1NumBins, m_d0NumBins + 1, m_d0NumBins);
404 RebinnedOutput_sptr outWS = std::static_pointer_cast<RebinnedOutput>(temp);
405
406 const double widthD0 = (m_d0Max - m_d0Min) / double(m_d0NumBins);
407 const double widthD1 = (m_d1Max - m_d1Min) / double(m_d1NumBins);
408
409 std::vector<double> xBinsVec;
410 std::vector<double> zBinsVec;
413
414 // Put the correct bin boundaries into the workspace
415 auto verticalAxis = std::make_unique<BinEdgeAxis>(zBinsVec);
416 auto verticalAxisRaw = verticalAxis.get();
417 outWS->replaceAxis(1, std::move(verticalAxis));
418 HistogramData::BinEdges binEdges(xBinsVec);
419 for (size_t i = 0; i < zBinsVec.size() - 1; ++i)
420 outWS->setBinEdges(i, binEdges);
421
422 verticalAxisRaw->title() = m_d1Label;
423
424 // Prepare the required theta values
425 DetectorAngularCache cache = initAngularCaches(inputWS.get());
426 auto twoThetas = cache.twoThetas;
427 auto twoThetaWidths = cache.twoThetaWidths;
428
429 const size_t nHistos = inputWS->getNumberHistograms();
430 const size_t nBins = inputWS->blocksize();
431
432 // Holds the spectrum-detector mapping
433 std::vector<specnum_t> specNumberMapping;
434 std::vector<detid_t> detIDMapping;
435 // Create a table for the output if we want to debug vertex positioning
436 addColumnHeadings(*vertexes, outputDimensions);
437 const auto &spectrumInfo = inputWS->spectrumInfo();
438 for (size_t i = 0; i < nHistos; ++i) {
439 if (!spectrumInfo.hasDetectors(i) || spectrumInfo.isMasked(i) || spectrumInfo.isMonitor(i)) {
440 continue;
441 }
442 const auto &detector = spectrumInfo.detector(i);
443
444 // Compute polygon points
445 const double twoTheta = twoThetas[i];
446 const double twoThetaWidth = twoThetaWidths[i];
447 const double twoThetaHalfWidth = 0.5 * twoThetaWidth;
448 const double twoThetaLower = twoTheta - twoThetaHalfWidth;
449 const double twoThetaUpper = twoTheta + twoThetaHalfWidth;
450
451 const MantidVec &X = inputWS->readX(i);
452 const MantidVec &Y = inputWS->readY(i);
453 const MantidVec &E = inputWS->readE(i);
454 for (size_t j = 0; j < nBins; ++j) {
455 const double lamLower = X[j];
456 const double lamUpper = X[j + 1];
457 const double signal = Y[j];
458 const double error = E[j];
459
460 auto inputQ = m_calculator->createQuad(lamUpper, lamLower, twoThetaUpper, twoThetaLower);
461 FractionalRebinning::rebinToFractionalOutput(inputQ, inputWS, i, j, *outWS, zBinsVec);
462 // Find which qy bin this point lies in
463 const auto qIndex = std::upper_bound(zBinsVec.begin(), zBinsVec.end(), inputQ[0].Y()) - zBinsVec.begin();
464 if (qIndex != 0 && qIndex < static_cast<int>(zBinsVec.size())) {
465 // Add this spectra-detector pair to the mapping
466 specNumberMapping.emplace_back(outWS->getSpectrum(qIndex - 1).getSpectrumNo());
467 detIDMapping.emplace_back(detector.getID());
468 }
469 // Debugging
470 if (dumpVertexes) {
471 writeRow(vertexes, inputQ[0], i, j, signal, error);
472 writeRow(vertexes, inputQ[1], i, j, signal, error);
473 writeRow(vertexes, inputQ[2], i, j, signal, error);
474 writeRow(vertexes, inputQ[3], i, j, signal, error);
475 }
476 }
477 }
479 outWS->finalize();
481 // Set the output spectrum-detector mapping
482 SpectrumDetectorMapping outputDetectorMap(specNumberMapping, detIDMapping);
483 outWS->updateSpectraUsing(outputDetectorMap);
484 outWS->getAxis(0)->title() = m_d0Label;
485 outWS->setYUnit("");
486 outWS->setYUnitLabel("Intensity");
487
488 return outWS;
489}
490} // namespace Mantid::DataObjects
double error
Definition: IndexPeaks.cpp:133
IPeaksWorkspace_sptr workspace
Definition: IndexPeaks.cpp:114
std::map< DeltaEMode::Type, std::string > index
Definition: DeltaEMode.cpp:19
Base MatrixWorkspace Abstract Class.
void replaceAxis(const std::size_t &axisIndex, std::unique_ptr< Axis > newAxis)
Replaces one of the workspace's axes with the new one provided.
virtual void setX(const std::size_t index, const Kernel::cow_ptr< HistogramData::HistogramX > &X)
Deprecated, use setSharedX() instead.
A minimal class to hold the mapping between the spectrum number and its related detector ID numbers f...
TableRow represents a row in a TableWorkspace.
Definition: TableRow.h:39
Provides a common interface to Reflectometry Transform calculators.
Templated class holding data about a neutron detection event in N-dimensions (for example,...
Definition: MDLeanEvent.h:60
Mantid::API::MatrixWorkspace_sptr execute(const Mantid::API::MatrixWorkspace_const_sptr &inputWs) const
Convert to the output dimensions.
Mantid::API::IMDHistoWorkspace_sptr executeMDNormPoly(const Mantid::API::MatrixWorkspace_const_sptr &inputWs) const
ReflectometryTransform(std::string d0Label, std::string d0ID, double d0Min, double d0Max, std::string d1Label, std::string d1ID, double d1Min, double d1Max, size_t d0NumBins, size_t d1NumBins, CalculateReflectometry *calc)
Constructor.
std::shared_ptr< DataObjects::MDEventWorkspace2Lean > createMDWorkspace(const Geometry::IMDDimension_sptr &, const Geometry::IMDDimension_sptr &, const API::BoxController_sptr &boxController) const
Creates an MD workspace.
Mantid::API::MatrixWorkspace_sptr executeNormPoly(const Mantid::API::MatrixWorkspace_const_sptr &inputWS, std::shared_ptr< Mantid::DataObjects::TableWorkspace > &vertexes, bool dumpVertexes, const std::string &outputDimensions) const
Execuate transformation using normalised polynomial binning.
Mantid::API::IMDEventWorkspace_sptr executeMD(const Mantid::API::MatrixWorkspace_const_sptr &inputWs, const Mantid::API::BoxController_sptr &boxController, Mantid::Geometry::MDFrame_uptr frame) const
Performs centre-point rebinning and produces an MDWorkspace.
std::shared_ptr< CalculateReflectometry > m_calculator
TableWorkspace is an implementation of Workspace in which the data are organised in columns of same s...
API::Column_sptr addColumn(const std::string &type, const std::string &name) override
Creates a new column.
A simple structure that defines an axis-aligned cuboid shaped bounding box for a geometrical object.
Definition: BoundingBox.h:34
const Kernel::V3D & minPoint() const
Returns the min point of the box.
Definition: BoundingBox.h:90
const Kernel::V3D & maxPoint() const
Returns the min point of the box.
Definition: BoundingBox.h:92
static T & Instance()
Return a reference to the Singleton instance, creating it if it does not already exist Creation is do...
Implements a 2-dimensional vector embedded in a 3D space, i.e.
Definition: V2D.h:29
double Y() const
Y position.
Definition: V2D.h:49
double X() const
X position.
Definition: V2D.h:44
Class for 3D vectors.
Definition: V3D.h:34
std::shared_ptr< IMDEventWorkspace > IMDEventWorkspace_sptr
Shared pointer to Mantid::API::IMDEventWorkspace.
std::shared_ptr< const MatrixWorkspace > MatrixWorkspace_const_sptr
shared pointer to the matrix workspace base class (const version)
std::shared_ptr< IMDHistoWorkspace > IMDHistoWorkspace_sptr
shared pointer to Mantid::API::IMDHistoWorkspace
std::shared_ptr< BoxController > BoxController_sptr
Shared ptr to BoxController.
std::shared_ptr< MatrixWorkspace > MatrixWorkspace_sptr
shared pointer to the matrix workspace base class
MANTID_DATAOBJECTS_DLL void normaliseOutput(const API::MatrixWorkspace_sptr &outputWS, const API::MatrixWorkspace_const_sptr &inputWS, API::Progress *progress=nullptr)
Compute sqrt of errors and put back in bin width division if necessary.
MANTID_DATAOBJECTS_DLL void rebinToFractionalOutput(const Geometry::Quadrilateral &inputQ, const API::MatrixWorkspace_const_sptr &inputWS, const size_t i, const size_t j, DataObjects::RebinnedOutput &outputWS, const std::vector< double > &verticalAxis, const DataObjects::RebinnedOutput_const_sptr &inputRB=nullptr)
Rebin the input quadrilateral to to output grid.
MANTID_DATAOBJECTS_DLL void finalizeFractionalRebin(DataObjects::RebinnedOutput &outputWS)
Set finalize flag after fractional rebinning loop.
MANTID_DATAOBJECTS_DLL void createVerticalAxis(Mantid::API::MatrixWorkspace *const ws, const MantidVec &xAxisVec, const double gradY, const double cyToUnit, const size_t nBins, const std::string &caption, const std::string &units)
Create a new y(vertical)-axis for the output workspace.
MANTID_DATAOBJECTS_DLL DetectorAngularCache initAngularCaches(const Mantid::API::MatrixWorkspace *const workspace)
Create angular caches.
MANTID_DATAOBJECTS_DLL MantidVec createXAxis(Mantid::API::MatrixWorkspace *const ws, const double gradX, const double cxToUnit, const size_t nBins, const std::string &caption, const std::string &units)
Create a new x-axis for the output workspace.
std::shared_ptr< RebinnedOutput > RebinnedOutput_sptr
shared pointer to the RebinnedOutput class
std::unique_ptr< MDFrame > MDFrame_uptr
Definition: MDFrame.h:36
constexpr double rad2deg
Radians to degrees conversion factor.
Definition: AngleUnits.h:23
std::shared_ptr< IMDDimension > IMDDimension_sptr
Shared Pointer for IMDDimension. Frequently used type in framework.
Definition: IMDDimension.h:98
std::shared_ptr< MDHistoDimension > MDHistoDimension_sptr
Shared pointer to a MDHistoDimension.
int MANTID_KERNEL_DLL createAxisFromRebinParams(const std::vector< double > &params, std::vector< double > &xnew, const bool resize_xnew=true, const bool full_bins_only=false, const double xMinHint=std::nan(""), const double xMaxHint=std::nan(""), const bool useReverseLogarithmic=false, const double power=-1)
Creates a new output X array given a 'standard' set of rebinning parameters.
float coord_t
Typedef for the data type to use for coordinate axes in MD objects such as MDBox, MDEventWorkspace,...
Definition: MDTypes.h:27
std::vector< double > MantidVec
typedef for the data storage used in Mantid matrix workspaces
Definition: cow_ptr.h:172
STL namespace.
Simple container for porting detector angular information.