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"
29#include "MantidKernel/Unit.h"
31#include "MantidKernel/V2D.h"
33
34#include <memory>
35#include <utility>
36
37using namespace Mantid::API;
38using namespace Mantid::Geometry;
39using namespace Mantid::Kernel;
40
41namespace {
52void writeRow(std::shared_ptr<Mantid::DataObjects::TableWorkspace> &vertexes, const V2D &vertex, size_t nHisto,
53 size_t nBins, double signal, double error) {
54 TableRow row = vertexes->appendRow();
55 row << vertex.X() << vertex.Y() << int(nHisto) << int(nBins) << signal << error;
56}
61void addColumnHeadings(Mantid::DataObjects::TableWorkspace &vertexes, const std::string &outputDimensions) {
62
63 if (outputDimensions == "Q (lab frame)") {
64 vertexes.addColumn("double", "Qx");
65 vertexes.addColumn("double", "Qy");
66 vertexes.addColumn("int", "OriginIndex");
67 vertexes.addColumn("int", "OriginBin");
68 vertexes.addColumn("double", "CellSignal");
69 vertexes.addColumn("double", "CellError");
70 }
71 if (outputDimensions == "P (lab frame)") {
72 vertexes.addColumn("double", "Pi+Pf");
73 vertexes.addColumn("double", "Pi-Pf");
74 vertexes.addColumn("int", "OriginIndex");
75 vertexes.addColumn("int", "OriginBin");
76 vertexes.addColumn("double", "CellSignal");
77 vertexes.addColumn("double", "CellError");
78 }
79 if (outputDimensions == "K (incident, final)") {
80 vertexes.addColumn("double", "Ki");
81 vertexes.addColumn("double", "Kf");
82 vertexes.addColumn("int", "OriginIndex");
83 vertexes.addColumn("int", "OriginBin");
84 vertexes.addColumn("double", "CellSignal");
85 vertexes.addColumn("double", "CellError");
86 }
87}
88} // namespace
89namespace Mantid::DataObjects {
90
105ReflectometryTransform::ReflectometryTransform(std::string d0Label, std::string d0ID, double d0Min, double d0Max,
106 std::string d1Label, std::string d1ID, double d1Min, double d1Max,
107 size_t d0NumBins, size_t d1NumBins, CalculateReflectometry *calc)
108 : m_d0NumBins(d0NumBins), m_d1NumBins(d1NumBins), m_d0Min(d0Min), m_d1Min(d1Min), m_d0Max(d0Max), m_d1Max(d1Max),
109 m_d0Label(std::move(d0Label)), m_d1Label(std::move(d1Label)), m_d0ID(std::move(d0ID)), m_d1ID(std::move(d1ID)),
110 m_calculator(calc) {
111 if (d0Min >= d0Max || d1Min >= d1Max)
112 throw std::invalid_argument("The supplied minimum values must be less than the maximum values.");
113}
114
121std::shared_ptr<MDEventWorkspace2Lean>
124 const BoxController_sptr &boxController) const {
125 auto ws = std::make_shared<MDEventWorkspace2Lean>();
126
127 ws->addDimension(a);
128 ws->addDimension(b);
129
130 BoxController_sptr wsbc = ws->getBoxController(); // Get the box controller
131 wsbc->setSplitInto(boxController->getSplitInto(0));
132 wsbc->setMaxDepth(boxController->getMaxDepth());
133 wsbc->setSplitThreshold(boxController->getSplitThreshold());
134
135 // Initialize the workspace.
136 ws->initialize();
137
138 // Start with a MDGridBox.
139 ws->splitBox();
140 return ws;
141}
142
153MantidVec createXAxis(MatrixWorkspace *const ws, const double gradX, const double cxToUnit, const size_t nBins,
154 const std::string &caption, const std::string &units) {
155 // Create an X - Axis.
156 auto xAxis = std::make_unique<BinEdgeAxis>(nBins);
157 auto xAxisRaw = xAxis.get();
158 ws->replaceAxis(0, std::move(xAxis));
159 auto unitXBasePtr = UnitFactory::Instance().create("Label");
160 std::shared_ptr<Mantid::Kernel::Units::Label> xUnit =
161 std::dynamic_pointer_cast<Mantid::Kernel::Units::Label>(unitXBasePtr);
162 xUnit->setLabel(caption, units);
163 xAxisRaw->unit() = xUnit;
164 xAxisRaw->title() = caption;
165 MantidVec xAxisVec(nBins);
166 for (size_t i = 0; i < nBins; ++i) {
167 double qxIncrement = ((1 / gradX) * (static_cast<double>(i) + 1) + cxToUnit);
168 xAxisRaw->setValue(i, qxIncrement);
169 xAxisVec[i] = qxIncrement;
170 }
171 return xAxisVec;
172}
173
184void createVerticalAxis(MatrixWorkspace *const ws, const MantidVec &xAxisVec, const double gradY, const double cyToUnit,
185 const size_t nBins, const std::string &caption, const std::string &units) {
186 // Create a Y (vertical) Axis
187 auto verticalAxis = std::make_unique<BinEdgeAxis>(nBins);
188 auto verticalAxisRaw = verticalAxis.get();
189 ws->replaceAxis(1, std::move(verticalAxis));
190 auto unitZBasePtr = UnitFactory::Instance().create("Label");
191 std::shared_ptr<Mantid::Kernel::Units::Label> verticalUnit =
192 std::dynamic_pointer_cast<Mantid::Kernel::Units::Label>(unitZBasePtr);
193 verticalAxisRaw->unit() = verticalUnit;
194 verticalUnit->setLabel(caption, units);
195 verticalAxisRaw->title() = caption;
196 auto xAxis = Kernel::make_cow<HistogramData::HistogramX>(xAxisVec);
197 for (size_t i = 0; i < nBins; ++i) {
198 ws->setSharedX(i, xAxis);
199 double qzIncrement = ((1 / gradY) * (static_cast<double>(i) + 1) + cyToUnit);
200 verticalAxisRaw->setValue(i, qzIncrement);
201 }
202}
203
213 const size_t nhist = workspace->getNumberHistograms();
214 std::vector<double> twoThetas(nhist);
215 std::vector<double> twoThetaWidths(nhist);
216 std::vector<double> detectorHeights(nhist);
217
218 auto inst = workspace->getInstrument();
219 const V3D upDirVec = inst->getReferenceFrame()->vecPointingUp();
220
221 const auto &spectrumInfo = workspace->spectrumInfo();
222 const auto &detectorInfo = workspace->detectorInfo();
223 const auto &componentInfo = workspace->componentInfo();
224 for (size_t i = 0; i < nhist; ++i) {
225 if (!spectrumInfo.hasDetectors(i) || spectrumInfo.isMonitor(i)) {
226 // If no detector found, skip onto the next spectrum
227 twoThetas[i] = -1.0; // Indicates a detector to skip
228 twoThetaWidths[i] = -1.0;
229 continue;
230 }
231
232 // We have to convert twoTheta from radians to degrees
233 const double twoTheta = spectrumInfo.signedTwoTheta(i) * rad2deg;
234 twoThetas[i] = twoTheta;
242 // If the spectrum is based on a group of detectors assume they all have
243 // same shape and same r,twoTheta
244 // Use the first detector of the spectrum.
245 size_t detIndex = spectrumInfo.firstDetectorIndex(i);
246 double l2 = detectorInfo.l2(detIndex);
247 // Get the shape
248 // Get the shape, defined in its own reference frame with centre at 0,0,0
249 BoundingBox bbox = componentInfo.shape(detIndex).getBoundingBox();
250 auto maxPoint(bbox.maxPoint());
251 auto minPoint(bbox.minPoint());
252 auto span = maxPoint - minPoint;
253 detectorHeights[i] = span.scalar_prod(upDirVec);
254 twoThetaWidths[i] =
255 (std::atan(maxPoint.scalar_prod(upDirVec) / l2) - std::atan(minPoint.scalar_prod(upDirVec) / l2)) * rad2deg;
256 }
258 cache.twoThetas = twoThetas;
259 cache.twoThetaWidths = twoThetaWidths;
260 cache.detectorHeights = detectorHeights;
261 return cache;
262}
263
273 const BoxController_sptr &boxController, Mantid::Geometry::MDFrame_uptr frame) const {
274 auto dim0 = std::make_shared<MDHistoDimension>(m_d0Label, m_d0ID, *frame, static_cast<Mantid::coord_t>(m_d0Min),
275 static_cast<Mantid::coord_t>(m_d0Max), m_d0NumBins);
276 auto dim1 = std::make_shared<MDHistoDimension>(m_d1Label, m_d1ID, *frame, static_cast<Mantid::coord_t>(m_d1Min),
277 static_cast<Mantid::coord_t>(m_d1Max), m_d1NumBins);
278
279 auto ws = createMDWorkspace(dim0, dim1, boxController);
280
281 auto spectraAxis = inputWs->getAxis(1);
282 for (size_t index = 0; index < inputWs->getNumberHistograms(); ++index) {
283 auto counts = inputWs->y(index);
284 auto wavelengths = inputWs->x(index);
285 auto errors = inputWs->e(index);
286 const size_t nInputBins = wavelengths.size() - 1;
287 const double twoTheta = spectraAxis->getValue(index);
288 m_calculator->setTwoTheta(twoTheta);
289 // Loop over all bins in spectra
290 for (size_t binIndex = 0; binIndex < nInputBins; ++binIndex) {
291 const double &wavelength = 0.5 * (wavelengths[binIndex] + wavelengths[binIndex + 1]);
292 double _d0 = m_calculator->calculateDim0(wavelength);
293 double _d1 = m_calculator->calculateDim1(wavelength);
294 double centers[2] = {_d0, _d1};
295
296 ws->addEvent(MDLeanEvent<2>(float(counts[binIndex]), float(errors[binIndex] * errors[binIndex]), centers));
297 }
298 }
299 ws->splitAllIfNeeded(nullptr);
300 ws->refreshCache();
301 return ws;
302}
303
311 auto ws = std::make_shared<Mantid::DataObjects::Workspace2D>();
312
313 ws->initialize(m_d1NumBins, m_d0NumBins,
314 m_d0NumBins); // Create the output workspace as a distribution
315
316 // Mapping so that d0 and d1 values calculated can be added to the matrix
317 // workspace at the correct index.
318 const double gradD0 = double(m_d0NumBins) / (m_d0Max - m_d0Min); // The x - axis
319 const double gradD1 = double(m_d1NumBins) / (m_d1Max - m_d1Min); // Actually the y-axis
320 const double cxToIndex = -gradD0 * m_d0Min;
321 const double cyToIndex = -gradD1 * m_d1Min;
322 const double cxToD0 = m_d0Min - (1 / gradD0);
323 const double cyToD1 = m_d1Min - (1 / gradD1);
324
325 // Create an X - Axis.
326 MantidVec xAxisVec = createXAxis(ws.get(), gradD0, cxToD0, m_d0NumBins, m_d0Label, "1/Angstroms");
327 // Create a Y (vertical) Axis
328 createVerticalAxis(ws.get(), xAxisVec, gradD1, cyToD1, m_d1NumBins, m_d1Label, "1/Angstroms");
329
330 // Loop over all entries in the input workspace and calculate d0 and d1
331 // for each.
332 auto spectraAxis = inputWs->getAxis(1);
333 for (size_t index = 0; index < inputWs->getNumberHistograms(); ++index) {
334 auto counts = inputWs->y(index);
335 auto wavelengths = inputWs->x(index);
336 auto errors = inputWs->e(index);
337 const size_t nInputBins = wavelengths.size() - 1;
338 const double twoTheta = spectraAxis->getValue(index);
339 m_calculator->setTwoTheta(twoTheta);
340 // Loop over all bins in spectra
341 for (size_t binIndex = 0; binIndex < nInputBins; ++binIndex) {
342 const double wavelength = 0.5 * (wavelengths[binIndex] + wavelengths[binIndex + 1]);
343 double _d0 = m_calculator->calculateDim0(wavelength);
344 double _d1 = m_calculator->calculateDim1(wavelength);
345
346 if (_d0 >= m_d0Min && _d0 <= m_d0Max && _d1 >= m_d1Min &&
347 _d1 <= m_d1Max) // Check that the calculated ki and kf are in range
348 {
349 const auto outIndexX = static_cast<int>((gradD0 * _d0) + cxToIndex);
350 const auto outIndexZ = static_cast<int>((gradD1 * _d1) + cyToIndex);
351
352 ws->mutableY(outIndexZ)[outIndexX] += counts[binIndex];
353 ws->mutableE(outIndexZ)[outIndexX] += errors[binIndex];
354 }
355 }
356 }
357 return ws;
358}
359
361
362 auto input_x_dim = inputWs->getXDimension();
363
365 new MDHistoDimension(input_x_dim->getName(), input_x_dim->getDimensionId(), input_x_dim->getMDFrame(),
366 static_cast<Mantid::coord_t>(input_x_dim->getMinimum()),
367 static_cast<Mantid::coord_t>(input_x_dim->getMaximum()), input_x_dim->getNBins()));
368
369 auto input_y_dim = inputWs->getYDimension();
370
372 new MDHistoDimension(input_y_dim->getName(), input_y_dim->getDimensionId(), input_y_dim->getMDFrame(),
373 static_cast<Mantid::coord_t>(input_y_dim->getMinimum()),
374 static_cast<Mantid::coord_t>(input_y_dim->getMaximum()), input_y_dim->getNBins()));
375
376 auto outWs = std::make_shared<MDHistoWorkspace>(dim0, dim1);
377
378 for (size_t nHistoIndex = 0; nHistoIndex < inputWs->getNumberHistograms(); ++nHistoIndex) {
379 const auto &Y = inputWs->y(nHistoIndex);
380 const auto &E = inputWs->e(nHistoIndex);
381
382 const size_t numBins = Y.size();
383 for (size_t nBinIndex = 0; nBinIndex < numBins; ++nBinIndex) {
384 const auto value_index = outWs->getLinearIndex(nBinIndex, nHistoIndex);
385 outWs->setSignalAt(value_index, Y[nBinIndex]);
386 outWs->setErrorSquaredAt(value_index, E[nBinIndex] * E[nBinIndex]);
387 }
388 }
389 return outWs;
390}
391
402 std::shared_ptr<Mantid::DataObjects::TableWorkspace> &vertexes,
403 bool dumpVertexes, const std::string &outputDimensions) const {
405 WorkspaceFactory::Instance().create("RebinnedOutput", m_d1NumBins, m_d0NumBins + 1, m_d0NumBins);
406 RebinnedOutput_sptr outWS = std::static_pointer_cast<RebinnedOutput>(temp);
407
408 const double widthD0 = (m_d0Max - m_d0Min) / double(m_d0NumBins);
409 const double widthD1 = (m_d1Max - m_d1Min) / double(m_d1NumBins);
410
411 std::vector<double> xBinsVec;
412 std::vector<double> zBinsVec;
415
416 // Put the correct bin boundaries into the workspace
417 auto verticalAxis = std::make_unique<BinEdgeAxis>(zBinsVec);
418 auto verticalAxisRaw = verticalAxis.get();
419 outWS->replaceAxis(1, std::move(verticalAxis));
420 HistogramData::BinEdges binEdges(xBinsVec);
421 for (size_t i = 0; i < zBinsVec.size() - 1; ++i)
422 outWS->setBinEdges(i, binEdges);
423
424 verticalAxisRaw->title() = m_d1Label;
425
426 // Prepare the required theta values
427 DetectorAngularCache cache = initAngularCaches(inputWS.get());
428 auto twoThetas = cache.twoThetas;
429 auto twoThetaWidths = cache.twoThetaWidths;
430
431 const size_t nHistos = inputWS->getNumberHistograms();
432 const size_t nBins = inputWS->blocksize();
433
434 // Holds the spectrum-detector mapping
435 std::vector<specnum_t> specNumberMapping;
436 std::vector<detid_t> detIDMapping;
437 // Create a table for the output if we want to debug vertex positioning
438 addColumnHeadings(*vertexes, outputDimensions);
439 const auto &spectrumInfo = inputWS->spectrumInfo();
440 for (size_t i = 0; i < nHistos; ++i) {
441 if (!spectrumInfo.hasDetectors(i) || spectrumInfo.isMasked(i) || spectrumInfo.isMonitor(i)) {
442 continue;
443 }
444 // ID of the (first) detector of the spectrum
445 const auto detID = spectrumInfo.firstDetectorID(i);
446
447 // Compute polygon points
448 const double twoTheta = twoThetas[i];
449 const double twoThetaWidth = twoThetaWidths[i];
450 const double twoThetaHalfWidth = 0.5 * twoThetaWidth;
451 const double twoThetaLower = twoTheta - twoThetaHalfWidth;
452 const double twoThetaUpper = twoTheta + twoThetaHalfWidth;
453
454 Mantid::HistogramData::HistogramX const &X = inputWS->x(i);
455 Mantid::HistogramData::HistogramY const &Y = inputWS->y(i);
456 Mantid::HistogramData::HistogramE const &E = inputWS->e(i);
457 for (size_t j = 0; j < nBins; ++j) {
458 const double lamLower = X[j];
459 const double lamUpper = X[j + 1];
460 const double signal = Y[j];
461 const double error = E[j];
462
463 auto inputQ = m_calculator->createQuad(lamUpper, lamLower, twoThetaUpper, twoThetaLower);
464 FractionalRebinning::rebinToFractionalOutput(inputQ, inputWS, i, j, *outWS, zBinsVec);
465 // Find which qy bin this point lies in
466 const auto qIndex = std::upper_bound(zBinsVec.begin(), zBinsVec.end(), inputQ[0].Y()) - zBinsVec.begin();
467 if (qIndex != 0 && qIndex < static_cast<int>(zBinsVec.size())) {
468 // Add this spectra-detector pair to the mapping
469 specNumberMapping.emplace_back(outWS->getSpectrum(qIndex - 1).getSpectrumNo());
470 detIDMapping.emplace_back(detID);
471 }
472 // Debugging
473 if (dumpVertexes) {
474 writeRow(vertexes, inputQ[0], i, j, signal, error);
475 writeRow(vertexes, inputQ[1], i, j, signal, error);
476 writeRow(vertexes, inputQ[2], i, j, signal, error);
477 writeRow(vertexes, inputQ[3], i, j, signal, error);
478 }
479 }
480 }
482 outWS->finalize();
484 // Set the output spectrum-detector mapping
485 SpectrumDetectorMapping outputDetectorMap(specNumberMapping, detIDMapping);
486 outWS->updateSpectraUsing(outputDetectorMap);
487 outWS->getAxis(0)->title() = m_d0Label;
488 outWS->setYUnit("");
489 outWS->setYUnitLabel("Intensity");
490
491 return outWS;
492}
493} // namespace Mantid::DataObjects
double error
IPeaksWorkspace_sptr workspace
std::map< DeltaEMode::Type, std::string > index
Base MatrixWorkspace Abstract Class.
void setSharedX(const size_t index, const Kernel::cow_ptr< HistogramData::HistogramX > &x) &
void replaceAxis(const std::size_t &axisIndex, std::unique_ptr< Axis > newAxis)
Replaces one of the workspace's axes with the new one provided.
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:64
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:33
const Kernel::V3D & minPoint() const
Returns the min point of the box.
Definition BoundingBox.h:89
const Kernel::V3D & maxPoint() const
Returns the min point of the box.
Definition BoundingBox.h:91
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:35
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, std::span< double const > 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
Definition SumSpectra.h:23
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.
std::shared_ptr< MDHistoDimension > MDHistoDimension_sptr
Shared pointer to a MDHistoDimension.
std::size_t 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.