20#include "MantidHistogramData/Histogram.h"
21#include "MantidHistogramData/HistogramBuilder.h"
22#include "MantidHistogramData/LinearGenerator.h"
29#include <gsl/gsl_linalg.h>
34using Mantid::HistogramData::LinearGenerator;
35using Mantid::HistogramData::Points;
38using namespace Kernel;
53std::map<std::string, std::string> inverseCaption = {
54 {
"Time",
"Frequency"}, {
"Frequency",
"Time"}, {
"d-Spacing",
"q"}, {
"q",
"d-Spacing"}};
56std::map<std::string, std::string> inverseLabel = {{
"s",
"Hz"},
57 {
"microsecond",
"MHz"},
59 {
"MHz",
"microsecond"},
60 {
"Angstrom",
"Angstrom^-1"},
61 {
"Angstrom^-1",
"Angstrom"}};
63const double THRESHOLD = 1E-6;
65const double BIN_WIDTH_ERROR_LEVEL = 0.5;
75 const std::string &yLabel) {
77 ws->setYUnitLabel(yLabel);
80 std::shared_ptr<Units::Label> label = std::dynamic_pointer_cast<Units::Label>(unit);
81 label->setLabel(
"Number of Iterations",
"");
83 const size_t nspec = ws->getNumberHistograms();
84 if (itCount.empty()) {
87 for (
size_t spec = 0; spec < nspec; spec++) {
88 auto &dataX = ws->dataX(spec);
89 dataX.resize(itCount[spec]);
90 auto &dataY = ws->dataY(spec);
91 dataY.resize(itCount[spec]);
92 auto &dataE = ws->dataE(spec);
93 dataE.resize(itCount[spec]);
112 return "Runs Maximum Entropy method on every spectrum of an input workspace. "
113 "It currently works for the case where data and image are related by a"
114 " 1D Fourier transform.";
125 std::make_shared<EqualBinSizesValidator>(BIN_WIDTH_ERROR_LEVEL)),
126 "An input workspace.");
129 "If true, the input data is assumed to be complex and the "
130 "input workspace is expected to have an even number of "
131 "histograms (2N). Spectrum numbers S and S+N are assumed to "
132 "be the real and imaginary part of the complex signal "
136 "If true, the algorithm will use complex images for the "
137 "calculations. This is the recommended option when there is "
138 "no prior knowledge about the image. If the image is known "
139 "to be real, this option can be set to false and the "
140 "algorithm will only consider the real part for "
144 "If true, the reconstructed image is only allowed to take "
145 "positive values. It can take negative values otherwise. "
146 "This option defines the entropy formula that will be used "
147 "for the calculations (see next section for more details).");
150 "Automatically calculate and apply phase shift. Zero on the "
151 "X axis is assumed to be in the first bin. If it is not, "
152 "setting this property will automatically correct for this.");
154 auto mustBePositive = std::make_shared<BoundedValidator<size_t>>();
155 mustBePositive->setLower(0);
157 "An integer number indicating the factor by which the number "
158 "of points will be increased in the image and reconstructed "
161 auto mustBeNonNegative = std::make_shared<BoundedValidator<double>>();
162 mustBeNonNegative->setLower(1E-12);
164 "A maximum entropy constant. This algorithm was first developed for the "
165 "ISIS muon group where the default 0.4 was found to give good "
167 "In general the user will need to experiment with this value. Choosing a "
168 "small value may lead to unphysical spiky reconstructions and choosing "
169 "an increasingly large "
170 "value the reconstruction will start to resamble that of a direct "
172 "transform reconstruction. However, where the data contain a "
173 "zero Fourier data point with a small error the "
174 "reconstruction will be insensitive to the choice "
175 "of this property (and increasing so the more well determined "
176 "this data point is).");
180 "Target value of Chi-square divided by the number of data points (N)");
183 "Required precision for Chi-square");
187 "Distance penalty applied to the current image at each iteration.");
190 "Maximum degree of non-parallelism between S (the entropy) and C "
191 "(chi-squared). These needs to be parallel. Chosing a smaller "
192 "shouldn't change the output. However, if you find this is the "
193 "case please let the Mantid team know since this indicates that "
194 "the default value of this proporty may need changing or "
195 "other changes to this implementation are required.");
197 mustBePositive = std::make_shared<BoundedValidator<size_t>>();
198 mustBePositive->setLower(1);
200 "Maximum number of iterations.");
204 "Maximum number of iterations in alpha chop.");
207 std::make_shared<EqualBinSizesValidator>(BIN_WIDTH_ERROR_LEVEL)),
208 "Adjusts the calculated data by multiplying each value by the "
209 "corresponding Y value of this workspace. "
210 "The data in this workspace is complex in the same manner as complex "
214 std::make_shared<EqualBinSizesValidator>(BIN_WIDTH_ERROR_LEVEL)),
215 "Adjusts the calculated data by adding to each value the corresponding Y "
216 "value of this workspace. "
217 "If DataLinearAdj is also specified, this addition is done after its "
219 "See equation in documentation for how DataLinearAdj and DataConstAdj "
221 "The data in this workspace is complex in the same manner as complex "
224 "Reconstruction is done independently on each spectrum. "
225 "If false, all the spectra use one image and the reconstructions "
226 "differ only through their adjustments. "
227 "ComplexData must be set true, when this is false.");
230 "Output workspace containing the evolution of Chi-sq.");
232 "Output workspace containing the evolution of "
233 "non-paralellism between S and C.");
235 "The output workspace containing the reconstructed image.");
237 "The output workspace containing the reconstructed data.");
244 const double warningLevel = 0.01;
249 const std::string binError = binChecker.
validate();
250 if (!binError.empty()) {
251 messages[wsName] = binError;
261 std::map<std::string, std::string> result;
269 size_t nHistograms = 0;
274 nHistograms = inWS->getNumberHistograms();
276 if (complex && (nHistograms % 2))
277 result[
"InputWorkspace"] =
"The number of histograms in the input "
278 "workspace must be even for complex data";
288 size_t nAHistograms = 0;
290 nAHistograms = linAdj->getNumberHistograms();
291 if (nAHistograms % 2)
292 result[
"DataLinearAdj"] =
"The number of histograms in the linear "
293 "adjustments workspace must be even, because they are complex data";
294 else if (nAHistograms > 0 && nAHistograms < nHistograms)
295 result[
"DataLinearAdj"] =
"The number of histograms in the linear "
296 "adjustments workspace is insufficient for the input workspace";
304 nAHistograms = constAdj->getNumberHistograms();
305 if (nAHistograms % 2)
306 result[
"DataConstAdj"] =
"The number of histograms in the constant "
307 "adjustments workspace must be even, because they are complex data";
308 else if (nAHistograms > 0 && nAHistograms < nHistograms)
309 result[
"DataConstAdj"] =
"The number of histograms in the constant "
310 "adjustments workspace is insufficient for the input workspace";
322 const bool complexData =
getProperty(
"ComplexData");
324 const bool complexImage =
getProperty(
"ComplexImage");
326 const bool positiveImage =
getProperty(
"PositiveImage");
330 const size_t resolutionFactor =
getProperty(
"ResolutionFactor");
334 const double ChiTargetOverN =
getProperty(
"ChiTargetOverN");
340 const double distEps =
getProperty(
"DistancePenalty");
344 const size_t alphaIter =
getProperty(
"AlphaChopIterations");
349 size_t nHist = inWS->getNumberHistograms();
352 size_t npoints = inWS->blocksize() * resolutionFactor;
354 const size_t npointsX = inWS->isHistogramData() ? npoints + 1 : npoints;
360 const bool perSpectrumReconstruction =
getProperty(
"PerSpectrumReconstruction");
364 for (
size_t s = 0; s < nHist; s++) {
365 const auto &errors = inWS->e(s);
366 if (std::any_of(errors.cbegin(), errors.cend(), [](
const auto error) { return error <= 0.; })) {
367 throw std::invalid_argument(
"Input data must have all errors non-zero.");
374 dataSpace = std::make_shared<MaxentSpaceComplex>();
376 dataSpace = std::make_shared<MaxentSpaceReal>();
381 imageSpace = std::make_shared<MaxentSpaceComplex>();
383 imageSpace = std::make_shared<MaxentSpaceReal>();
388 if (perSpectrumReconstruction) {
389 transform = std::make_shared<MaxentTransformFourier>(dataSpace, imageSpace);
391 auto complexDataSpace = std::make_shared<MaxentSpaceComplex>();
392 transform = std::make_shared<MaxentTransformMultiFourier>(complexDataSpace, imageSpace, nHist / 2);
399 entropy = std::make_shared<MaxentEntropyPositiveValues>();
401 entropy = std::make_shared<MaxentEntropyNegativeValues>();
413 size_t nDataSpec = complexData ? nHist / 2 : nHist;
414 size_t nImageSpec = nDataSpec;
415 size_t nSpecConcat = 1;
416 if (!perSpectrumReconstruction) {
417 nSpecConcat = nImageSpec;
420 outImageWS = create<MatrixWorkspace>(*inWS, 2 * nImageSpec, Points(npoints));
421 for (
size_t i = 0; i < outImageWS->getNumberHistograms(); ++i)
422 outImageWS->getSpectrum(i).setDetectorID(
static_cast<detid_t>(i + 1));
423 HistogramBuilder builder;
424 builder.setX(npointsX);
425 builder.setY(npoints);
426 builder.setDistribution(inWS->isDistribution());
427 outDataWS = create<MatrixWorkspace>(*inWS, 2 * nDataSpec, builder.build());
429 for (
size_t i = 0; i < outDataWS->getNumberHistograms(); ++i)
430 outDataWS->getSpectrum(i).setDetectorID(
static_cast<detid_t>(i + 1));
431 outEvolChi = create<MatrixWorkspace>(*inWS, nImageSpec, Points(nIter));
432 outEvolTest = create<MatrixWorkspace>(*inWS, nImageSpec, Points(nIter));
434 npoints = complexImage ? npoints * 2 : npoints;
435 std::vector<size_t> iterationCounts;
436 iterationCounts.reserve(nImageSpec);
437 outEvolChi->setPoints(0, Points(nIter, LinearGenerator(0.0, 1.0)));
439 size_t dataLength = complexData ? 2 * inWS->y(0).size() : inWS->y(0).size();
440 dataLength *= nSpecConcat;
442 for (
size_t spec = 0; spec < nImageSpec; spec++) {
445 std::vector<double> image(npoints, background);
447 std::vector<double> data(dataLength, 0.0);
448 std::vector<double> errors(dataLength, 0.0);
451 !perSpectrumReconstruction);
453 !perSpectrumReconstruction);
455 if (!perSpectrumReconstruction) {
456 throw std::invalid_argument(
"ComplexData must be true, if PerSpectrumReconstruction is false.");
458 data = inWS->y(spec).rawData();
459 errors = inWS->e(spec).rawData();
463 std::vector<double> linearAdjustments;
464 std::vector<double> constAdjustments;
466 linearAdjustments =
toComplex(dataLinearAdj, spec,
false, !perSpectrumReconstruction);
469 constAdjustments =
toComplex(dataConstAdj, spec,
false, !perSpectrumReconstruction);
473 std::vector<double> evolChi(nIter, 0.);
474 std::vector<double> evolTest(nIter, 0.);
480 bool converged =
false;
481 for (
size_t it = 0; it < nIter; it++) {
485 maxentCalculator.
iterate(data, errors, image, background, linearAdjustments, constAdjustments);
488 double currChisq = maxentCalculator.
getChisq();
490 auto delta =
move(coeffs, ChiTargetOverN / currChisq, chiEps, alphaIter);
500 double currAngle = maxentCalculator.
getAngle();
501 evolChi[it] = currChisq;
502 evolTest[it] = currAngle;
505 if ((std::abs(currChisq / ChiTargetOverN - 1.) < chiEps) && (currAngle < angle)) {
508 g_log.
information() <<
"Converged after " << it + 1 <<
" iterations" << std::endl;
509 iterationCounts.emplace_back(it + 1);
525 iterationCounts.emplace_back(nIter);
530 auto solImage = maxentCalculator.
getImage();
533 populateDataWS(inWS, spec, nDataSpec, solData, !perSpectrumReconstruction, complexData, outDataWS);
534 populateImageWS(inWS, spec, nImageSpec, solImage, complexImage, outImageWS, autoShift);
538 outEvolChi->setSharedX(spec, outEvolChi->sharedX(0));
539 outEvolTest->setSharedX(spec, outEvolChi->sharedX(0));
542 outEvolChi->setCounts(spec, std::move(evolChi));
543 outEvolTest->setCounts(spec, std::move(evolTest));
547 setProperty(
"EvolChi", removeZeros(outEvolChi, iterationCounts,
"Chi squared"));
548 setProperty(
"EvolAngle", removeZeros(outEvolTest, iterationCounts,
"Maximum Angle"));
566 const size_t numBins = inWS->y(0).size();
567 size_t nSpec = inWS->getNumberHistograms() / 2;
568 std::vector<double> result;
569 result.reserve(2 * numBins);
571 if (inWS->getNumberHistograms() % 2)
572 throw std::invalid_argument(
"Cannot convert input workspace to complex data");
574 size_t nSpecOfInterest = (concatSpec ? nSpec : 1);
575 size_t firstSpecOfInterest = (concatSpec ? 0 : spec);
577 for (
size_t s = firstSpecOfInterest; s < firstSpecOfInterest + nSpecOfInterest; s++) {
579 for (
size_t i = 0; i < numBins; i++) {
580 result.emplace_back(inWS->y(s)[i]);
581 result.emplace_back(inWS->y(s + nSpec)[i]);
584 for (
size_t i = 0; i < numBins; i++) {
585 result.emplace_back(inWS->e(s)[i]);
586 result.emplace_back(inWS->e(s + nSpec)[i]);
610 size_t dim = coeffs.
c2.
size().first;
612 std::vector<double> deltaMin(dim, 0);
613 std::vector<double> deltaMax(dim, 0);
618 double dchiMin = chiMin - ChiTargetOverN;
619 double dchiMax = chiMax - ChiTargetOverN;
621 if (dchiMin * dchiMax > 0) {
624 if (
fabs(dchiMin) <
fabs(dchiMax)) {
633 double eps = 2. * chiEps;
638 std::vector<double>
delta(dim, 0);
640 while ((
fabs(eps / ChiTargetOverN) > chiEps) && (iter < alphaIter)) {
642 double aMid = 0.5 * (aMin + aMax);
645 eps = chiMid - ChiTargetOverN;
647 if (dchiMin * eps > 0) {
652 if (dchiMax * eps > 0) {
661 if ((
fabs(eps / ChiTargetOverN) > chiEps) || (iter > alphaIter)) {
662 throw std::runtime_error(
"Error encountered when calculating solution "
663 "image. No convergence in alpha chop.\n");
678 size_t dim = coeffs.
c2.
size().first;
687 for (
size_t k = 0; k < dim; k++) {
688 for (
size_t l = 0; l < dim; l++) {
689 A[k][l] = bx * coeffs.
c2[k][l] - ax * coeffs.
s2[k][l];
691 B[k][0] = -bx * coeffs.
c1[k][0] + ax * coeffs.
s1[k][0];
704 for (
size_t k = 0; k < dim; k++) {
706 for (
size_t l = 0; l < dim; l++) {
707 z += coeffs.
c2[k][l] * b[l];
709 ww += b[k] * (coeffs.
c1[k][0] + 0.5 *
z);
723 size_t dim = A.
size().first;
725 auto a = gsl_matrix_view_array(A[0], dim, dim);
726 auto b = gsl_vector_const_view_array(B[0], dim);
728 std::vector<double> vVec(dim * dim), sVec(dim), wVec(dim),
delta(dim);
730 auto v = gsl_matrix_view_array(vVec.data(), dim, dim);
731 auto s = gsl_vector_view_array(sVec.data(), dim);
732 auto w = gsl_vector_view_array(wVec.data(), dim);
733 auto x = gsl_vector_view_array(
delta.data(), dim);
736 gsl_linalg_SV_decomp(&a.matrix, &v.matrix, &s.vector, &w.vector);
743 double max = *std::max_element(sVec.begin(), sVec.end());
746 double threshold = THRESHOLD * max;
747 std::transform(sVec.begin(), sVec.end(), sVec.begin(), [&threshold](
double el) { return el > threshold ? el : 0.0; });
750 gsl_linalg_SV_solve(&a.matrix, &v.matrix, &s.vector, &b.vector, &
x.vector);
764 const std::vector<double> &image,
double background,
double distEps) {
766 const double pointSum = std::accumulate(image.cbegin(), image.cend(), 0.,
767 [](
const auto sum,
const auto point) { return sum + std::abs(point); });
769 const size_t dim = coeffs.
s2.
size().first;
773 for (
size_t k = 0; k < dim; k++) {
775 for (
size_t l = 0; l < dim; l++)
776 sum -= coeffs.
s2[k][l] *
delta[l];
777 dist +=
delta[k] * sum;
780 if (dist > distEps * pointSum / background) {
781 auto newDelta =
delta;
782 for (
size_t k = 0; k <
delta.size(); k++) {
783 newDelta[k] *= sqrt(distEps * pointSum / dist / background);
799 const std::vector<std::vector<double>> &dirs) {
801 if (image.empty() || dirs.empty() || (
delta.size() != dirs.size())) {
802 throw std::runtime_error(
"Cannot calculate new image");
805 std::vector<double> newImage = image;
808 for (
size_t i = 0; i < image.size(); i++) {
809 for (
size_t k = 0; k <
delta.size(); k++) {
810 newImage[i] +=
delta[k] * dirs[k][i];
831 if (complex && result.size() % 2)
832 throw std::invalid_argument(
"Cannot write image results to output workspaces");
834 int npoints = complex ?
static_cast<int>(result.size() / 2) :
static_cast<int>(result.size());
840 auto dataPoints = inWS->points(spec);
841 double x0 = dataPoints[0];
842 double dx = dataPoints[1] - x0;
844 double delta = 1. / dx / npoints;
845 const int isOdd = (inWS->y(0).size() % 2) ? 1 : 0;
847 double shift = x0 * 2. * M_PI;
852 for (
int i = 0; i < npoints; i++) {
853 X[i] =
delta * (-npoints / 2 + i);
858 for (
int i = 0; i < npoints; i++) {
859 int j = (npoints / 2 + i + isOdd) % npoints;
860 double xShift =
X[i] * shift;
861 double c = cos(xShift);
862 double s = sin(xShift);
863 YR[i] = result[2 * j] * c - result[2 * j + 1] * s;
864 YI[i] = result[2 * j] * s + result[2 * j + 1] * c;
869 for (
int i = 0; i < npoints; i++) {
870 int j = (npoints / 2 + i + isOdd) % npoints;
871 double xShift =
X[i] * shift;
872 double c = cos(xShift);
873 double s = sin(xShift);
874 YR[i] = result[j] * c;
875 YI[i] = result[j] * s;
882 auto inputUnit = inWS->getAxis(0)->unit();
884 std::shared_ptr<Kernel::Units::Label> lblUnit =
888 lblUnit->setLabel(inverseCaption[inWS->getAxis(0)->unit()->caption()],
889 inverseLabel[inWS->getAxis(0)->unit()->label().ascii()]);
890 outWS->getAxis(0)->unit() = lblUnit;
894 outWS->mutableX(spec) =
X;
895 outWS->mutableY(spec) = YR;
896 outWS->mutableE(spec) = E;
897 outWS->setSharedX(nspec + spec, outWS->sharedX(spec));
898 outWS->mutableY(nspec + spec) = YI;
899 outWS->setSharedE(nspec + spec, outWS->sharedE(spec));
914 const std::vector<double> &result,
bool concatenated,
bool complex,
917 if (complex && result.size() % 2)
918 throw std::invalid_argument(
"Cannot write data results to output workspaces");
919 if (concatenated && !complex)
920 throw std::invalid_argument(
"Concatenated data results must be complex");
921 if (concatenated && result.size() % (nspec * 2))
922 throw std::invalid_argument(
"Cannot write complex concatenated data results to output workspaces");
923 if (concatenated && spec != 0)
924 throw std::invalid_argument(
"Cannot write concatenated data results to "
925 "output workspaces from non-first spectrum");
927 int resultLength = complex ?
static_cast<int>(result.size() / 2) :
static_cast<int>(result.size());
928 size_t spectrumLength = (concatenated ? resultLength / nspec : resultLength);
929 size_t spectrumLengthX = inWS->isHistogramData() ? spectrumLength + 1 : spectrumLength;
930 size_t nSpecAnalyzed = (concatenated ? nspec : 1);
933 double x0 = inWS->x(spec)[0];
934 double dx = inWS->x(spec)[1] - x0;
937 for (
size_t specA = spec; specA < spec + nSpecAnalyzed; specA++) {
945 for (
size_t i = 0; i < spectrumLengthX; i++) {
946 X[i] = x0 +
static_cast<double>(i) * dx;
953 for (
size_t i = 0; i < spectrumLength; i++) {
954 YR[i] = result[2 * i + 2 * specA * spectrumLength];
955 YI[i] = result[2 * i + 1 + 2 * specA * spectrumLength];
958 for (
size_t i = 0; i < spectrumLength; i++) {
959 YR[i] = result[2 * i];
960 YI[i] = result[2 * i + 1];
964 for (
size_t i = 0; i < spectrumLength; i++) {
970 outWS->mutableX(specA) =
X;
971 outWS->mutableY(specA) = YR;
972 outWS->mutableE(specA) = E;
973 outWS->mutableY(nspec + specA) = YI;
974 outWS->setSharedX(nspec + specA, outWS->sharedX(spec));
975 outWS->setSharedE(nspec + specA, outWS->sharedE(spec));
#define DECLARE_ALGORITHM(classname)
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.
void progress(double p, const std::string &msg="", double estimatedTime=0.0, int progressPrecision=0)
Sends ProgressNotification.
void interruption_point()
This is called during long-running operations, and check if the algorithm has requested that it be ca...
Helper class for reporting progress from algorithms.
A property class for workspaces.
void populateImageWS(API::MatrixWorkspace_const_sptr &inWS, size_t spec, size_t nspec, const std::vector< double > &result, bool complex, API::MatrixWorkspace_sptr &outWS, bool autoShift)
Populates the output workspace containing the reconstructed image.
std::map< std::string, std::string > validateInputs() override
Validate the input properties.
int version() const override
Algorithm's version.
std::vector< double > solveSVD(Kernel::DblMatrix &A, const Kernel::DblMatrix &B)
Solves A*x = B using SVD.
std::vector< double > updateImage(const std::vector< double > &image, const std::vector< double > &delta, const std::vector< std::vector< double > > &dirs)
Updates the image.
std::vector< double > toComplex(API::MatrixWorkspace_const_sptr &inWS, size_t spec, bool errors, bool concatenatedSpectra)
Returns spectrum 'spec' as a complex vector.
const std::string category() const override
Algorithm's category.
double calculateChi(const QuadraticCoefficients &coeffs, double a, std::vector< double > &beta)
Calculates Chi given the quadratic coefficients and an alpha value by solving the matrix equation A*b...
void validateBinEdges(const std::string &wsName, std::map< std::string, std::string > &messages)
Checks the bin spacing is equal.
void init() override
Initialise the algorithm's properties.
const std::string summary() const override
Algorithm's summary.
std::vector< double > applyDistancePenalty(const std::vector< double > &beta, const QuadraticCoefficients &coeffs, const std::vector< double > &image, double background, double distEps)
Applies a distance penalty.
const std::string name() const override
Algorithm's name.
void populateDataWS(API::MatrixWorkspace_const_sptr &inWS, size_t spec, size_t nspec, const std::vector< double > &result, bool concatenatedSpectra, bool complex, API::MatrixWorkspace_sptr &outWS)
Populates the output workspace containing the reconstructed data.
void exec() override
Run the algorithm.
std::vector< double > move(const QuadraticCoefficients &coeffs, double ChiTargetOverN, double chiEps, size_t alphaIter)
Moves the system one step closer towards the solution.
MaxentCalculator : This class performs one maxent iteration and calculates chi-sq,...
std::vector< std::vector< double > > getSearchDirections() const
Returns the search directions (in image space)
double getAngle() const
Returns the angle between the gradient of chi-square and the gradient of the entropy (calculated and ...
std::vector< double > getReconstructedData() const
Returns the reconstructed (calculated) data.
QuadraticCoefficients getQuadraticCoefficients() const
Returns the quadratic coefficients.
void iterate(const std::vector< double > &data, const std::vector< double > &errors, const std::vector< double > &image, double background, const std::vector< double > &linearAdjustments, const std::vector< double > &constAdjustments)
Performs an iteration and calculates everything: search directions (SB.
double getChisq()
Returns chi-square.
std::vector< double > getImage() const
Returns the (reconstructed) image.
EqualBinsChecker : Checks for evenly spaced bins.
virtual std::string validate() const
Perform validation of the given X array.
IPropertyManager * setProperty(const std::string &name, const T &value)
Templated method to set the value of a PropertyWithValue.
void information(const std::string &msg)
Logs at information level.
std::pair< size_t, size_t > size() const
Access matrix sizes.
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...
std::shared_ptr< const MatrixWorkspace > MatrixWorkspace_const_sptr
shared pointer to the matrix workspace base class (const version)
std::shared_ptr< MatrixWorkspace > MatrixWorkspace_sptr
shared pointer to the matrix workspace base class
std::shared_ptr< MaxentTransform > MaxentTransform_sptr
std::shared_ptr< MaxentEntropy > MaxentEntropy_sptr
std::shared_ptr< MaxentSpace > MaxentSpace_sptr
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< Unit > Unit_sptr
Shared pointer to the Unit base class.
int32_t detid_t
Typedef for a detector ID.
std::vector< double > MantidVec
typedef for the data storage used in Mantid matrix workspaces
@ Input
An input workspace.
@ Output
An output workspace.
Mantid::Kernel::DblMatrix s2
Mantid::Kernel::DblMatrix s1
Mantid::Kernel::DblMatrix c1
Mantid::Kernel::DblMatrix c2