Commit b396588f authored by Lamar Moore's avatar Lamar Moore
Browse files

Re #15542 merge with master

parent 8ecd3c4f
<!-- TEMPLATE FOR BUG REPORTS -->
### Expected behavior
### Actual behavior
### Steps to reproduce the behavior
### Platforms affected
...@@ -6,8 +6,10 @@ Description of work. ...@@ -6,8 +6,10 @@ Description of work.
Fixes #xxxx. Fixes #xxxx.
[Release notes](/docs/source/release/) <!-- RELEASE NOTES
<!-- Replace with a link above to the updated file or state "Does not need to be in the release notes." --> Either edit the file in docs/source/release/... and it will be in your pull request or state
*Does not need to be in the release notes.*
-->
--- ---
......
...@@ -9,6 +9,7 @@ ...@@ -9,6 +9,7 @@
#include <nexus/NeXusFile.hpp> #include <nexus/NeXusFile.hpp>
#include <boost/optional.hpp> #include <boost/optional.hpp>
#include <numeric>
#include <vector> #include <vector>
namespace Mantid { namespace Mantid {
...@@ -294,10 +295,10 @@ public: ...@@ -294,10 +295,10 @@ public:
// We need to account for optional top level splitting // We need to account for optional top level splitting
if (depth == 0 && m_splitTopInto) { if (depth == 0 && m_splitTopInto) {
size_t numSplitTop = 1; const auto &splitTopInto = m_splitTopInto.get();
for (size_t d = 0; d < m_splitTopInto.get().size(); d++) size_t numSplitTop =
numSplitTop *= m_splitTopInto.get()[d]; std::accumulate(splitTopInto.cbegin(), splitTopInto.cend(), size_t{1},
std::multiplies<size_t>());
m_numMDBoxes[depth + 1] += numSplitTop; m_numMDBoxes[depth + 1] += numSplitTop;
} else { } else {
m_numMDBoxes[depth + 1] += m_numSplit; m_numMDBoxes[depth + 1] += m_numSplit;
...@@ -321,20 +322,14 @@ public: ...@@ -321,20 +322,14 @@ public:
/** Return the total number of MD Boxes, irrespective of depth */ /** Return the total number of MD Boxes, irrespective of depth */
size_t getTotalNumMDBoxes() const { size_t getTotalNumMDBoxes() const {
size_t total = 0; return std::accumulate(m_numMDBoxes.cbegin(), m_numMDBoxes.cend(),
for (size_t depth = 0; depth < m_numMDBoxes.size(); depth++) { size_t{0}, std::plus<size_t>());
total += m_numMDBoxes[depth];
}
return total;
} }
/** Return the total number of MDGridBox'es, irrespective of depth */ /** Return the total number of MDGridBox'es, irrespective of depth */
size_t getTotalNumMDGridBoxes() const { size_t getTotalNumMDGridBoxes() const {
size_t total = 0; return std::accumulate(m_numMDGridBoxes.cbegin(), m_numMDGridBoxes.cend(),
for (size_t depth = 0; depth < m_numMDGridBoxes.size(); depth++) { size_t{0}, std::plus<size_t>());
total += m_numMDGridBoxes[depth];
}
return total;
} }
/** Return the average recursion depth of gridding. /** Return the average recursion depth of gridding.
......
...@@ -134,12 +134,11 @@ const std::vector<std::string> &FunctionFactoryImpl::getFunctionNames() const { ...@@ -134,12 +134,11 @@ const std::vector<std::string> &FunctionFactoryImpl::getFunctionNames() const {
// Create the entry in the cache and work with it directly // Create the entry in the cache and work with it directly
std::vector<std::string> &typeNames = m_cachedFunctionNames[soughtType]; std::vector<std::string> &typeNames = m_cachedFunctionNames[soughtType];
const std::vector<std::string> names = this->getKeys(); const std::vector<std::string> names = this->getKeys();
for (auto it = names.begin(); it != names.end(); ++it) { std::copy_if(names.cbegin(), names.cend(), std::back_inserter(typeNames),
boost::shared_ptr<IFunction> func = this->createFunction(*it); [this](const std::string &name) {
if (func && dynamic_cast<FunctionType *>(func.get())) { boost::shared_ptr<IFunction> func = this->createFunction(name);
typeNames.push_back(*it); return boost::dynamic_pointer_cast<FunctionType>(func);
} });
}
return typeNames; return typeNames;
} }
......
...@@ -167,6 +167,9 @@ protected: ...@@ -167,6 +167,9 @@ protected:
/// Protected copy constructor. May be used by childs for cloning. /// Protected copy constructor. May be used by childs for cloning.
IMDWorkspace(const IMDWorkspace &) = default; IMDWorkspace(const IMDWorkspace &) = default;
void makeSinglePointWithNaN(std::vector<coord_t> &x, std::vector<signal_t> &y,
std::vector<signal_t> &e) const;
const std::string toString() const override; const std::string toString() const override;
private: private:
......
...@@ -108,12 +108,12 @@ public: ...@@ -108,12 +108,12 @@ public:
std::map<specnum_t, Mantid::Kernel::V3D> std::map<specnum_t, Mantid::Kernel::V3D>
getNeighbours(const Geometry::IDetector *comp, const double radius = 0.0, getNeighbours(const Geometry::IDetector *comp, const double radius = 0.0,
const bool ignoreMaskedDetectors = false) const; const bool ignoreMaskedDetectors = false) const;
/// Query the NearestNeighbours object for a given spectrum index using a /// Query the NearestNeighbours object for a given spectrum number using a
/// search radius /// search radius
std::map<specnum_t, Mantid::Kernel::V3D> std::map<specnum_t, Mantid::Kernel::V3D>
getNeighbours(specnum_t spec, const double radius, getNeighbours(specnum_t spec, const double radius,
const bool ignoreMaskedDetectors = false) const; const bool ignoreMaskedDetectors = false) const;
/// Query the NearestNeighbours object for a given spectrum index using the /// Query the NearestNeighbours object for a given spectrum number using the
/// direct number of nearest neighbours /// direct number of nearest neighbours
std::map<specnum_t, Mantid::Kernel::V3D> std::map<specnum_t, Mantid::Kernel::V3D>
getNeighboursExact(specnum_t spec, const int nNeighbours, getNeighboursExact(specnum_t spec, const int nNeighbours,
...@@ -315,7 +315,7 @@ public: ...@@ -315,7 +315,7 @@ public:
/** /**
* Probes if DX (X Error) values were set on a particular spectrum * Probes if DX (X Error) values were set on a particular spectrum
* @param index: the spectrum index * @param index: the workspace index
*/ */
virtual bool hasDx(const std::size_t index) const { virtual bool hasDx(const std::size_t index) const {
return getSpectrum(index)->hasDx(); return getSpectrum(index)->hasDx();
...@@ -364,7 +364,7 @@ public: ...@@ -364,7 +364,7 @@ public:
// Methods to set and access masked bins // Methods to set and access masked bins
void maskBin(const size_t &workspaceIndex, const size_t &binIndex, void maskBin(const size_t &workspaceIndex, const size_t &binIndex,
const double &weight = 1.0); const double &weight = 1.0);
void flagMasked(const size_t &spectrumIndex, const size_t &binIndex, void flagMasked(const size_t &index, const size_t &binIndex,
const double &weight = 1.0); const double &weight = 1.0);
bool hasMaskedBins(const size_t &workspaceIndex) const; bool hasMaskedBins(const size_t &workspaceIndex) const;
/// Masked bins for each spectrum are stored as a set of pairs containing <bin /// Masked bins for each spectrum are stored as a set of pairs containing <bin
...@@ -512,7 +512,7 @@ private: ...@@ -512,7 +512,7 @@ private:
/// Flag indicating whether the data has common bins. False by default /// Flag indicating whether the data has common bins. False by default
mutable bool m_isCommonBinsFlag; mutable bool m_isCommonBinsFlag;
/// The set of masked bins in a map keyed on spectrum index /// The set of masked bins in a map keyed on workspace index
std::map<int64_t, MaskList> m_masks; std::map<int64_t, MaskList> m_masks;
/// A workspace holding monitor data relating to the main data in the /// A workspace holding monitor data relating to the main data in the
......
...@@ -399,8 +399,7 @@ private: ...@@ -399,8 +399,7 @@ private:
std::string error; std::string error;
// Cycle through each workspace in the group ... // Cycle through each workspace in the group ...
for (auto it = wsGroupNames.begin(); it != wsGroupNames.end(); ++it) { for (const auto &memberWsName : wsGroupNames) {
std::string memberWsName = *it;
boost::shared_ptr<Workspace> memberWs = boost::shared_ptr<Workspace> memberWs =
AnalysisDataService::Instance().retrieve(memberWsName); AnalysisDataService::Instance().retrieve(memberWsName);
......
...@@ -328,17 +328,17 @@ AlgorithmFactoryImpl::getDescriptors(bool includeHidden) const { ...@@ -328,17 +328,17 @@ AlgorithmFactoryImpl::getDescriptors(bool includeHidden) const {
// results vector // results vector
std::vector<Algorithm_descriptor> res; std::vector<Algorithm_descriptor> res;
for (auto s = sv.cbegin(); s != sv.cend(); ++s) { for (const auto &s : sv) {
if (s->empty()) if (s.empty())
continue; continue;
Algorithm_descriptor desc; Algorithm_descriptor desc;
size_t i = s->find('|'); size_t i = s.find('|');
if (i == std::string::npos) { if (i == std::string::npos) {
desc.name = *s; desc.name = s;
desc.version = 1; desc.version = 1;
} else if (i > 0) { } else if (i > 0) {
desc.name = s->substr(0, i); desc.name = s.substr(0, i);
std::string vers = s->substr(i + 1); std::string vers = s.substr(i + 1);
desc.version = vers.empty() ? 1 : atoi(vers.c_str()); desc.version = vers.empty() ? 1 : atoi(vers.c_str());
} else } else
continue; continue;
......
...@@ -8,7 +8,8 @@ namespace Mantid { ...@@ -8,7 +8,8 @@ namespace Mantid {
namespace API { namespace API {
GeometryInfoFactory::GeometryInfoFactory(const MatrixWorkspace &workspace) GeometryInfoFactory::GeometryInfoFactory(const MatrixWorkspace &workspace)
: m_workspace(workspace), m_instrument(workspace.getInstrument()) { : m_workspace(workspace), m_instrument(workspace.getInstrument()),
m_L1(-1.0) {
// Note: This does not seem possible currently (the instrument objects is // Note: This does not seem possible currently (the instrument objects is
// always allocated, even if it is empty), so this will not fail. // always allocated, even if it is empty), so this will not fail.
if (!m_instrument) if (!m_instrument)
......
...@@ -275,9 +275,9 @@ ITableWorkspace_sptr Grouping::toTable() const { ...@@ -275,9 +275,9 @@ ITableWorkspace_sptr Grouping::toTable() const {
newTable->addColumn("vector_int", "Detectors"); newTable->addColumn("vector_int", "Detectors");
for (auto it = this->groups.begin(); it != this->groups.end(); ++it) { for (const auto &group : this->groups) {
TableRow newRow = newTable->appendRow(); TableRow newRow = newTable->appendRow();
newRow << Kernel::Strings::parseRange(*it); newRow << Kernel::Strings::parseRange(group);
} }
return newTable; return newTable;
......
...@@ -115,6 +115,22 @@ const std::string IMDWorkspace::toString() const { ...@@ -115,6 +115,22 @@ const std::string IMDWorkspace::toString() const {
return os.str(); return os.str();
} }
//----------------------------------------------------------------------------------------------
/**
* Make a single point with NaN as the signal and error
* This can be returned when there would otherwise be nothing to plot
* @param x :: position on the line
* @param y :: signal value
* @param e :: error value
*/
void IMDWorkspace::makeSinglePointWithNaN(std::vector<coord_t> &x,
std::vector<signal_t> &y,
std::vector<signal_t> &e) const {
x.push_back(0);
y.push_back(std::numeric_limits<signal_t>::quiet_NaN());
e.push_back(std::numeric_limits<signal_t>::quiet_NaN());
}
//----------------------------------------------------------------------------------------------- //-----------------------------------------------------------------------------------------------
/** Obtain coordinates for a line plot through a IMDWorkspace. /** Obtain coordinates for a line plot through a IMDWorkspace.
* Cross the workspace from start to end points, recording the signal along the * Cross the workspace from start to end points, recording the signal along the
......
...@@ -1037,7 +1037,7 @@ void MatrixWorkspace::maskWorkspaceIndex(const std::size_t index) { ...@@ -1037,7 +1037,7 @@ void MatrixWorkspace::maskWorkspaceIndex(const std::size_t index) {
* on the same spectrum. Writing to * on the same spectrum. Writing to
* the mask set is marked parrallel critical so different spectra can be * the mask set is marked parrallel critical so different spectra can be
* analysised in parallel * analysised in parallel
* @param workspaceIndex :: The workspace spectrum index of the bin * @param workspaceIndex :: The workspace index of the bin
* @param binIndex :: The index of the bin in the spectrum * @param binIndex :: The index of the bin in the spectrum
* @param weight :: 'How heavily' the bin is to be masked. =1 for full * @param weight :: 'How heavily' the bin is to be masked. =1 for full
* masking (the default). * masking (the default).
...@@ -1065,20 +1065,20 @@ void MatrixWorkspace::maskBin(const size_t &workspaceIndex, ...@@ -1065,20 +1065,20 @@ void MatrixWorkspace::maskBin(const size_t &workspaceIndex,
} }
/** Writes the masking weight to m_masks (doesn't alter y-values). Contains a /** Writes the masking weight to m_masks (doesn't alter y-values). Contains a
* parrallel critical section * parallel critical section
* and so is thread safe * and so is thread safe
* @param spectrumIndex :: The workspace spectrum index of the bin * @param index :: The workspace index of the spectrum
* @param binIndex :: The index of the bin in the spectrum * @param binIndex :: The index of the bin in the spectrum
* @param weight :: 'How heavily' the bin is to be masked. =1 for full * @param weight :: 'How heavily' the bin is to be masked. =1 for full
* masking (the default). * masking (the default).
*/ */
void MatrixWorkspace::flagMasked(const size_t &spectrumIndex, void MatrixWorkspace::flagMasked(const size_t &index, const size_t &binIndex,
const size_t &binIndex, const double &weight) { const double &weight) {
// Writing to m_masks is not thread-safe, so put in some protection // Writing to m_masks is not thread-safe, so put in some protection
PARALLEL_CRITICAL(maskBin) { PARALLEL_CRITICAL(maskBin) {
// First get a reference to the list for this spectrum (or create a new // First get a reference to the list for this spectrum (or create a new
// list) // list)
MaskList &binList = m_masks[spectrumIndex]; MaskList &binList = m_masks[index];
auto it = binList.find(binIndex); auto it = binList.find(binIndex);
if (it != binList.end()) { if (it != binList.end()) {
binList.erase(it); binList.erase(it);
...@@ -1088,7 +1088,7 @@ void MatrixWorkspace::flagMasked(const size_t &spectrumIndex, ...@@ -1088,7 +1088,7 @@ void MatrixWorkspace::flagMasked(const size_t &spectrumIndex,
} }
/** Does this spectrum contain any masked bins /** Does this spectrum contain any masked bins
* @param workspaceIndex :: The workspace spectrum index to test * @param workspaceIndex :: The workspace index to test
* @return True if there are masked bins for this spectrum * @return True if there are masked bins for this spectrum
*/ */
bool MatrixWorkspace::hasMaskedBins(const size_t &workspaceIndex) const { bool MatrixWorkspace::hasMaskedBins(const size_t &workspaceIndex) const {
......
...@@ -101,7 +101,8 @@ std::set<specnum_t> SpectrumDetectorMapping::getSpectrumNumbers() const { ...@@ -101,7 +101,8 @@ std::set<specnum_t> SpectrumDetectorMapping::getSpectrumNumbers() const {
const std::set<detid_t> &SpectrumDetectorMapping::getDetectorIDsForSpectrumNo( const std::set<detid_t> &SpectrumDetectorMapping::getDetectorIDsForSpectrumNo(
const specnum_t spectrumNo) const { const specnum_t spectrumNo) const {
if (!m_indexIsSpecNo) if (!m_indexIsSpecNo)
throw std::runtime_error("Indices are in spectrum index, not number."); throw std::runtime_error(
"Indices are in the spectrum detector map, not spectrum number.");
return m_mapping.at(spectrumNo); return m_mapping.at(spectrumNo);
} }
...@@ -109,7 +110,8 @@ const std::set<detid_t> & ...@@ -109,7 +110,8 @@ const std::set<detid_t> &
SpectrumDetectorMapping::getDetectorIDsForSpectrumIndex( SpectrumDetectorMapping::getDetectorIDsForSpectrumIndex(
const size_t spectrumIndex) const { const size_t spectrumIndex) const {
if (m_indexIsSpecNo) if (m_indexIsSpecNo)
throw std::runtime_error("Indices are in spectrum number, not index."); throw std::runtime_error(
"Spectrum numbers are in the spectrum detector map, not index.");
return m_mapping.at(static_cast<int>(spectrumIndex)); return m_mapping.at(static_cast<int>(spectrumIndex));
} }
......
...@@ -306,7 +306,7 @@ public: ...@@ -306,7 +306,7 @@ public:
auto ws2 = makeWorkspaceWithDetectors(1, 2); auto ws2 = makeWorkspaceWithDetectors(1, 2);
TS_ASSERT(!ws2->hasMaskedBins(0)); TS_ASSERT(!ws2->hasMaskedBins(0));
// Doesn't throw on invalid spectrum index, just returns false // Doesn't throw on invalid spectrum number, just returns false
TS_ASSERT(!ws2->hasMaskedBins(1)); TS_ASSERT(!ws2->hasMaskedBins(1));
TS_ASSERT(!ws2->hasMaskedBins(-1)); TS_ASSERT(!ws2->hasMaskedBins(-1));
......
...@@ -96,6 +96,7 @@ set ( SRC_FILES ...@@ -96,6 +96,7 @@ set ( SRC_FILES
src/EditInstrumentGeometry.cpp src/EditInstrumentGeometry.cpp
src/ElasticWindow.cpp src/ElasticWindow.cpp
src/EstimateResolutionDiffraction.cpp src/EstimateResolutionDiffraction.cpp
src/EventWorkspaceAccess.cpp
src/Exponential.cpp src/Exponential.cpp
src/ExponentialCorrection.cpp src/ExponentialCorrection.cpp
src/ExportTimeSeriesLog.cpp src/ExportTimeSeriesLog.cpp
...@@ -150,6 +151,7 @@ set ( SRC_FILES ...@@ -150,6 +151,7 @@ set ( SRC_FILES
src/MaskBins.cpp src/MaskBins.cpp
src/MaskBinsFromTable.cpp src/MaskBinsFromTable.cpp
src/MaskDetectorsIf.cpp src/MaskDetectorsIf.cpp
src/MatrixWorkspaceAccess.cpp
src/Max.cpp src/Max.cpp
src/MaxEnt.cpp src/MaxEnt.cpp
src/MaxEnt/MaxentData.cpp src/MaxEnt/MaxentData.cpp
...@@ -243,6 +245,7 @@ set ( SRC_FILES ...@@ -243,6 +245,7 @@ set ( SRC_FILES
src/SolidAngle.cpp src/SolidAngle.cpp
src/SortEvents.cpp src/SortEvents.cpp
src/SpatialGrouping.cpp src/SpatialGrouping.cpp
src/SpectrumAlgorithm.cpp
src/SpecularReflectionAlgorithm.cpp src/SpecularReflectionAlgorithm.cpp
src/SpecularReflectionCalculateTheta.cpp src/SpecularReflectionCalculateTheta.cpp
src/SpecularReflectionPositionCorrect.cpp src/SpecularReflectionPositionCorrect.cpp
...@@ -375,6 +378,7 @@ set ( INC_FILES ...@@ -375,6 +378,7 @@ set ( INC_FILES
inc/MantidAlgorithms/EditInstrumentGeometry.h inc/MantidAlgorithms/EditInstrumentGeometry.h
inc/MantidAlgorithms/ElasticWindow.h inc/MantidAlgorithms/ElasticWindow.h
inc/MantidAlgorithms/EstimateResolutionDiffraction.h inc/MantidAlgorithms/EstimateResolutionDiffraction.h
inc/MantidAlgorithms/EventWorkspaceAccess.h
inc/MantidAlgorithms/Exponential.h inc/MantidAlgorithms/Exponential.h
inc/MantidAlgorithms/ExponentialCorrection.h inc/MantidAlgorithms/ExponentialCorrection.h
inc/MantidAlgorithms/ExportTimeSeriesLog.h inc/MantidAlgorithms/ExportTimeSeriesLog.h
...@@ -430,6 +434,7 @@ set ( INC_FILES ...@@ -430,6 +434,7 @@ set ( INC_FILES
inc/MantidAlgorithms/MaskBins.h inc/MantidAlgorithms/MaskBins.h
inc/MantidAlgorithms/MaskBinsFromTable.h inc/MantidAlgorithms/MaskBinsFromTable.h
inc/MantidAlgorithms/MaskDetectorsIf.h inc/MantidAlgorithms/MaskDetectorsIf.h
inc/MantidAlgorithms/MatrixWorkspaceAccess.h
inc/MantidAlgorithms/Max.h inc/MantidAlgorithms/Max.h
inc/MantidAlgorithms/MaxEnt.h inc/MantidAlgorithms/MaxEnt.h
inc/MantidAlgorithms/MaxEnt/MaxentData.h inc/MantidAlgorithms/MaxEnt/MaxentData.h
...@@ -524,6 +529,7 @@ set ( INC_FILES ...@@ -524,6 +529,7 @@ set ( INC_FILES
inc/MantidAlgorithms/SolidAngle.h inc/MantidAlgorithms/SolidAngle.h
inc/MantidAlgorithms/SortEvents.h inc/MantidAlgorithms/SortEvents.h
inc/MantidAlgorithms/SpatialGrouping.h inc/MantidAlgorithms/SpatialGrouping.h
inc/MantidAlgorithms/SpectrumAlgorithm.h
inc/MantidAlgorithms/SpecularReflectionAlgorithm.h inc/MantidAlgorithms/SpecularReflectionAlgorithm.h
inc/MantidAlgorithms/SpecularReflectionCalculateTheta.h inc/MantidAlgorithms/SpecularReflectionCalculateTheta.h
inc/MantidAlgorithms/SpecularReflectionPositionCorrect.h inc/MantidAlgorithms/SpecularReflectionPositionCorrect.h
......
...@@ -44,7 +44,7 @@ public: ...@@ -44,7 +44,7 @@ public:
const std::string name() const override { return "ApplyDeadTimeCorr"; }; const std::string name() const override { return "ApplyDeadTimeCorr"; };
/// Summary of algorithms purpose /// Summary of algorithms purpose
const std::string summary() const override { const std::string summary() const override {
return "Apply deadtime correction to each spectra of a workspace."; return "Apply deadtime correction to each spectrum of a workspace.";
} }
/// Algorithm's version for identification /// Algorithm's version for identification
...@@ -59,6 +59,8 @@ private: ...@@ -59,6 +59,8 @@ private:
void init() override; void init() override;
/// Run the algorithm /// Run the algorithm
void exec() override; void exec() override;
/// Validate the inputs
std::map<std::string, std::string> validateInputs() override;
}; };
} // namespace Algorithms } // namespace Algorithms
......
...@@ -68,11 +68,13 @@ public: ...@@ -68,11 +68,13 @@ public:
/// Algorithm's category for identification overriding a virtual method /// Algorithm's category for identification overriding a virtual method
const std::string category() const override { return "Muon"; } const std::string category() const override { return "Muon"; }
protected:
std::map<std::string, std::string> validateInputs() override;
private: private:
// Overridden Algorithm methods // Overridden Algorithm methods
void init() override; void init() override;
void exec() override; void exec() override;
std::map<std::string, std::string> validateInputs() override;
}; };
} // namespace Algorithm } // namespace Algorithm
......
...@@ -51,13 +51,15 @@ public: ...@@ -51,13 +51,15 @@ public:
/// Algorithm's category for identification overriding a virtual method /// Algorithm's category for identification overriding a virtual method
const std::string category() const override { return "Muon"; } const std::string category() const override { return "Muon"; }
protected:
/// Validate the inputs
std::map<std::string, std::string> validateInputs() override;
private: private:
/// Initialise the algorithm /// Initialise the algorithm
void init() override; void init() override;
/// Execute the algorithm /// Execute the algorithm
void exec() override; void exec() override;
/// Validate the inputs
std::map<std::string, std::string> validateInputs() override;
/// Prepare workspace for fit by extracting data /// Prepare workspace for fit by extracting data
API::MatrixWorkspace_sptr extractDataFromWorkspace(double startTime, API::MatrixWorkspace_sptr extractDataFromWorkspace(double startTime,
double endTime); double endTime);
......
...@@ -85,8 +85,8 @@ private: ...@@ -85,8 +85,8 @@ private:
void convertToDistribution(API::MatrixWorkspace_sptr workspace); void convertToDistribution(API::MatrixWorkspace_sptr workspace);
void restoreDistributionState(API::MatrixWorkspace_sptr workspace); void restoreDistributionState(API::MatrixWorkspace_sptr workspace);
void checkRange(double &startX, double &endX); void checkRange(double &startX, double &endX);
void getSpecInds(std::vector<int> &output, const int workspaceTotal); void getWsInds(std::vector<int> &output, const int workspaceTotal);
double Mean(const API::MatrixWorkspace_const_sptr WS, const int specInd, double Mean(const API::MatrixWorkspace_const_sptr WS, const int wsInd,
const double startX, const double endX, double &variance) const; const double startX, const double endX, double &variance) const;
double LinearFit(API::MatrixWorkspace_sptr WS, int spectrum, double startX, double LinearFit(API::MatrixWorkspace_sptr WS, int spectrum, double startX,
double endX); double endX);
......
#ifndef MANTID_ALGORITHM_CHANGEBINOFFSET_H_ #ifndef MANTID_ALGORITHM_CHANGEBINOFFSET_H_
#define MANTID_ALGORITHM_CHANGEBINOFFSET_H_ #define MANTID_ALGORITHM_CHANGEBINOFFSET_H_