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

Re #15542 merge with master

parent 8ecd3c4f
......@@ -282,10 +282,10 @@ std::map<std::string, std::string> ChangeTimeZero::validateInputs() {
// If both inputs are being used, then return straight away.
if (isRelative && absoluteTimeInput) {
invalidProperties.emplace("RelativeTimeOffset",
"You can either sepcify a relative time shift or "
"You can either specify a relative time shift or "
"an absolute time shift.");
invalidProperties.emplace("AbsoluteTimeOffset",
"You can either sepcify a relative time shift or "
"You can either specify a relative time shift or "
"an absolute time shift.");
return invalidProperties;
......@@ -304,15 +304,17 @@ std::map<std::string, std::string> ChangeTimeZero::validateInputs() {
// proton_charge entry exists
if (isAbsolute) {
MatrixWorkspace_sptr ws = getProperty("InputWorkspace");
auto run = ws->run();
try {
run.getTimeSeriesProperty<double>("proton_charge");
} catch (...) {
invalidProperties.insert(
std::make_pair("InputWorkspace",
"A TimeOffset with an absolute time, requires the "
"input workspace to have a proton_charge property in "
"its log."));
if (ws) {
auto run = ws->run();
try {
run.getTimeSeriesProperty<double>("proton_charge");
} catch (...) {
invalidProperties.insert(std::make_pair(
"InputWorkspace",
"A TimeOffset with an absolute time requires the "
"input workspace to have a proton_charge property in "
"its log."));
}
}
}
......
......@@ -66,7 +66,7 @@ void ConvertEmptyToTof::init() {
"Name of the output workspace, can be the same as the input");
declareProperty(
make_unique<Kernel::ArrayProperty<int>>("ListOfSpectraIndices"),
"A list of spectra indices as a string with ranges; e.g. "
"A list of spectra workspace indices as a string with ranges; e.g. "
"5-10,15,20-23. \n"
"Optional: if not specified, then the Start/EndIndex fields "
"are used alone. "
......@@ -91,7 +91,7 @@ void ConvertEmptyToTof::init() {
"ElasticPeakPosition", EMPTY_INT(), mustBePositive,
"Value of elastic peak position if none of the above are filled in.");
declareProperty("ElasticPeakPositionSpectrum", EMPTY_INT(), mustBePositive,
"Spectrum index used for elastic peak position above.");
"Workspace Index used for elastic peak position above.");
}
//----------------------------------------------------------------------------------------------
......@@ -129,7 +129,7 @@ void ConvertEmptyToTof::exec() {
else {
// validations
validateSpectraIndices(spectraIndices);
validateWorkspaceIndices(spectraIndices);
validateChannelIndices(channelIndices);
// Map of spectra index, epp
......@@ -163,11 +163,12 @@ void ConvertEmptyToTof::exec() {
* in the input workspace. If v is empty, uses all spectra.
* @param v :: vector with the spectra indices
*/
void ConvertEmptyToTof::validateSpectraIndices(std::vector<int> &v) {
void ConvertEmptyToTof::validateWorkspaceIndices(std::vector<int> &v) {
auto nHist = m_inputWS->getNumberHistograms();
if (v.empty()) {
g_log.information("No spectrum index given. Using all spectra to calculate "
"the elastic peak.");
g_log.information(
"No spectrum number given. Using all spectra to calculate "
"the elastic peak.");
// use all spectra indices
v.reserve(nHist);
for (unsigned int i = 0; i < nHist; ++i)
......
......@@ -33,9 +33,10 @@ std::map<std::string, std::string> ConvertToDistribution::validateInputs() {
std::map<std::string, std::string> errors;
MatrixWorkspace_sptr workspace = getProperty("Workspace");
if (workspace->id() == "EventWorkspace")
if (workspace && workspace->id() == "EventWorkspace") {
errors["Workspace"] = "Event workspaces cannot be directly converted to "
"distributions.";
}
return errors;
}
......
......@@ -24,7 +24,7 @@ void CopyDetectorMapping::init() {
make_unique<PropertyWithValue<bool>>("IndexBySpectrumNumber", false,
Direction::Input),
"Will use mapping indexed by spectrum number rather than the default of"
"spectrum index (recommended when both workspaces have a vertical axis "
"Workspace Index (recommended when both workspaces have a vertical axis "
"in spectrum number).");
}
......
......@@ -172,15 +172,15 @@ void CrossCorrelate::exec() {
for (int i = 0; i < nspecs; ++i) // Now loop on all spectra
{
PARALLEL_START_INTERUPT_REGION
size_t spec_index = indexes[i]; // Get the spectrum index from the table
size_t wsIndex = indexes[i]; // Get the ws index from the table
// Copy spectra info from input Workspace
out->getSpectrum(i)->copyInfoFrom(*inputWS->getSpectrum(spec_index));
out->getSpectrum(i)->copyInfoFrom(*inputWS->getSpectrum(wsIndex));
out->dataX(i) = XX;
// Get temp references
const MantidVec &iX = inputWS->readX(spec_index);
const MantidVec &iY = inputWS->readY(spec_index);
const MantidVec &iE = inputWS->readE(spec_index);
const MantidVec &iX = inputWS->readX(wsIndex);
const MantidVec &iY = inputWS->readY(wsIndex);
const MantidVec &iE = inputWS->readE(wsIndex);
// Copy Y,E data of spec(i) to temp vector
// Now rebin on the grid of reference spectrum
std::vector<double> tempY(nY);
......
......@@ -634,7 +634,7 @@ DetectorDiagnostic::calculateMedian(const API::MatrixWorkspace_sptr input,
}
PARALLEL_FOR1(input)
for (int i = 0; i < static_cast<int>(hists.size()); ++i) {
for (int i = 0; i < static_cast<int>(hists.size()); ++i) { // NOLINT
PARALLEL_START_INTERUPT_REGION
if (checkForMask) {
......
......@@ -129,15 +129,15 @@ void DetectorEfficiencyVariation::exec() {
* instrument to use for comparison
* @param variation :: The maximum fractional variation above the median that is
* allowed for god detectors
* @param minSpec :: Index number of the first spectrum to use
* @param maxSpec :: Index number of the last spectrum to use
* @param startWsIndex :: Index number of the first spectrum to use
* @param endWsIndex :: Index number of the last spectrum to use
* @throw invalid_argument if there is an incapatible property value and so the
* algorithm can't continue
*/
void DetectorEfficiencyVariation::retrieveProperties(
API::MatrixWorkspace_sptr &whiteBeam1,
API::MatrixWorkspace_sptr &whiteBeam2, double &variation, int &minSpec,
int &maxSpec) {
API::MatrixWorkspace_sptr &whiteBeam2, double &variation, int &startWsIndex,
int &endWsIndex) {
whiteBeam1 = getProperty("WhiteBeamBase");
whiteBeam2 = getProperty("WhiteBeamCompare");
if (whiteBeam1->getInstrument()->getName() !=
......@@ -145,8 +145,8 @@ void DetectorEfficiencyVariation::retrieveProperties(
throw std::invalid_argument("The two input white beam vanadium workspaces "
"must be from the same instrument");
}
int maxSpecIndex = static_cast<int>(whiteBeam1->getNumberHistograms()) - 1;
if (maxSpecIndex !=
int maxWsIndex = static_cast<int>(whiteBeam1->getNumberHistograms()) - 1;
if (maxWsIndex !=
static_cast<int>(whiteBeam2->getNumberHistograms()) -
1) { // we would get a crash later on if this were not true
throw std::invalid_argument("The input white beam vanadium workspaces must "
......@@ -155,24 +155,24 @@ void DetectorEfficiencyVariation::retrieveProperties(
variation = getProperty("Variation");
minSpec = getProperty("StartWorkspaceIndex");
if ((minSpec < 0) || (minSpec > maxSpecIndex)) {
startWsIndex = getProperty("StartWorkspaceIndex");
if ((startWsIndex < 0) || (startWsIndex > maxWsIndex)) {
g_log.warning("StartWorkspaceIndex out of range, changed to 0");
minSpec = 0;
startWsIndex = 0;
}
maxSpec = getProperty("EndWorkspaceIndex");
if (maxSpec == Mantid::EMPTY_INT())
maxSpec = maxSpecIndex;
if ((maxSpec < 0) || (maxSpec > maxSpecIndex)) {
endWsIndex = getProperty("EndWorkspaceIndex");
if (endWsIndex == Mantid::EMPTY_INT())
endWsIndex = maxWsIndex;
if ((endWsIndex < 0) || (endWsIndex > maxWsIndex)) {
g_log.warning(
"EndWorkspaceIndex out of range, changed to max Workspace number");
maxSpec = maxSpecIndex;
endWsIndex = maxWsIndex;
}
if ((maxSpec < minSpec)) {
if ((endWsIndex < startWsIndex)) {
g_log.warning(
"EndWorkspaceIndex can not be less than the StartWorkspaceIndex, "
"changed to max Workspace number");
maxSpec = maxSpecIndex;
endWsIndex = maxWsIndex;
}
}
......
......@@ -136,7 +136,7 @@ void EQSANSTofStructure::execEvent(
try {
det = inputWS->getDetector(ispec);
} catch (Exception::NotFoundError &) {
g_log.warning() << "Spectrum index " << ispec
g_log.warning() << "Workspace index " << ispec
<< " has no detector assigned to it - discarding"
<< std::endl;
// 'continue' statement moved outside catch block because Mac Intel
......
#include "MantidAlgorithms/EventWorkspaceAccess.h"
namespace Mantid {
namespace Algorithms {
///@cond Doxygen has problems for decltype for some reason.
/// Returns std::mem_fn object refering to EventWorkspace::getEventList().
decltype(std::mem_fn((DataObjects::EventList &
(DataObjects::EventWorkspace::*)(const std::size_t)) &
DataObjects::EventWorkspace::getEventList))
EventWorkspaceAccess::eventList =
std::mem_fn((DataObjects::EventList &
(DataObjects::EventWorkspace::*)(const std::size_t)) &
DataObjects::EventWorkspace::getEventList);
///@endcond
}
}
......@@ -29,7 +29,7 @@ void ExtractFFTSpectrum::init() {
PropertyMode::Optional),
"The optional input workspace for the imaginary part.");
declareProperty("FFTPart", 2, boost::make_shared<BoundedValidator<int>>(0, 5),
"Spectrum index, one of the six possible spectra output by "
"Spectrum number, one of the six possible spectra output by "
"the FFT algorithm");
declareProperty(make_unique<WorkspaceProperty<>>("OutputWorkspace", "",
Direction::Output),
......
......@@ -293,37 +293,41 @@ std::map<std::string, std::string> FFT::validateInputs() {
std::map<std::string, std::string> errors;
MatrixWorkspace_const_sptr inWS = getProperty("InputWorkspace");
const int iReal = getProperty("Real");
const int iImag = getProperty("Imaginary");
const MantidVec &X = inWS->readX(iReal);
if (inWS) {
const int iReal = getProperty("Real");
const int iImag = getProperty("Imaginary");
const MantidVec &X = inWS->readX(iReal);
// check that the workspace isn't empty
if (X.size() < 2) {
errors["InputWorkspace"] = "Input workspace must have at least two values";
} else {
// Check that the x values are evenly spaced
// If accepting rounding errors, just give a warning if bins are different.
if (areBinWidthsUneven(X)) {
// check that the workspace isn't empty
if (X.size() < 2) {
errors["InputWorkspace"] =
"X axis must be linear (all bins have same width)";
"Input workspace must have at least two values";
} else {
// Check that the x values are evenly spaced
// If accepting rounding errors, just give a warning if bins are
// different.
if (areBinWidthsUneven(X)) {
errors["InputWorkspace"] =
"X axis must be linear (all bins have same width)";
}
}
}
// check real, imaginary spectrum numbers and workspace sizes
int nHist = static_cast<int>(inWS->getNumberHistograms());
if (iReal >= nHist) {
errors["Real"] = "Real out of range";
}
if (iImag != EMPTY_INT()) {
MatrixWorkspace_const_sptr inImagWS = getProperty("InputImagWorkspace");
if (inImagWS) {
if (inWS->blocksize() != inImagWS->blocksize()) {
errors["Imaginary"] = "Real and Imaginary sizes do not match";
}
nHist = static_cast<int>(inImagWS->getNumberHistograms());
// check real, imaginary spectrum numbers and workspace sizes
int nHist = static_cast<int>(inWS->getNumberHistograms());
if (iReal >= nHist) {
errors["Real"] = "Real out of range";
}
if (iImag >= nHist) {
errors["Imaginary"] = "Imaginary out of range";
if (iImag != EMPTY_INT()) {
MatrixWorkspace_const_sptr inImagWS = getProperty("InputImagWorkspace");
if (inImagWS) {
if (inWS->blocksize() != inImagWS->blocksize()) {
errors["Imaginary"] = "Real and Imaginary sizes do not match";
}
nHist = static_cast<int>(inImagWS->getNumberHistograms());
}
if (iImag >= nHist) {
errors["Imaginary"] = "Imaginary out of range";
}
}
}
......
......@@ -31,7 +31,7 @@ void FFTSmooth::init() {
auto mustBePositive = boost::make_shared<BoundedValidator<int>>();
mustBePositive->setLower(0);
declareProperty("WorkspaceIndex", 0, mustBePositive,
"Spectrum index for smoothing");
"Workspace index for smoothing");
std::vector<std::string> type{"Zeroing"};
declareProperty("Filter", "Zeroing",
......
......@@ -33,7 +33,7 @@ void FFTSmooth2::init() {
auto mustBePositive = boost::make_shared<BoundedValidator<int>>();
mustBePositive->setLower(0);
declareProperty("WorkspaceIndex", 0, mustBePositive,
"Spectrum index for smoothing");
"Workspace index for smoothing");
std::vector<std::string> type{"Zeroing", "Butterworth"};
declareProperty("Filter", "Zeroing",
......
......@@ -766,8 +766,7 @@ void FilterEvents::setupCustomizedTOFCorrection() {
// Apply to m_detTofOffsets and m_detTofShifts
if (usedetid) {
// Get vector IDs
vector<detid_t> vecDetIDs;
vecDetIDs.resize(numhist, 0);
vector<detid_t> vecDetIDs(numhist, 0);
// Set up the detector IDs to vecDetIDs and set up the initial value
for (size_t i = 0; i < numhist; ++i) {
// It is assumed that there is one detector per spectra.
......@@ -784,10 +783,7 @@ void FilterEvents::setupCustomizedTOFCorrection() {
<< detids.size() << " detectors.";
throw runtime_error(errss.str());
}
detid_t detid = 0;
for (auto detit = detids.begin(); detit != detids.end(); ++detit)
detid = *detit;
vecDetIDs[i] = detid;
vecDetIDs[i] = *detids.begin();
}
// Map correction map to list
......
......@@ -119,7 +119,7 @@ void FindCenterOfMassPosition::exec() {
try {
det = inputWS->getDetector(i);
} catch (Exception::NotFoundError &) {
g_log.warning() << "Spectrum index " << i
g_log.warning() << "Workspace index " << i
<< " has no detector assigned to it - discarding"
<< std::endl;
continue;
......
......@@ -154,7 +154,7 @@ void FindCenterOfMassPosition2::exec() {
try {
det = inputWS->getDetector(i);
} catch (Exception::NotFoundError &) {
g_log.warning() << "Spectrum index " << i
g_log.warning() << "Workspace index " << i
<< " has no detector assigned to it - discarding"
<< std::endl;
continue;
......
......@@ -818,8 +818,7 @@ int FindPeaks::getVectorIndex(const MantidVec &vecX, double x) {
* (This is not the CORE fit peak method)
*
* @param input :: The input workspace
* @param spectrum :: The spectrum index of the peak (is actually the
*WorkspaceIndex)
* @param wsIndex :: The workspace index of the peak
* @param center_guess :: A guess of the X-value of the center of the peak, in
*whatever units of the X-axis of the workspace.
* @param fitWidth :: A guess of the full-width-half-max of the peak, in # of
......@@ -832,14 +831,14 @@ int FindPeaks::getVectorIndex(const MantidVec &vecX, double x) {
* @param rightpeakcentre :: centre of the right peak if existed
*/
void FindPeaks::fitPeakGivenFWHM(const API::MatrixWorkspace_sptr &input,
const int spectrum, const double center_guess,
const int wsIndex, const double center_guess,
const int fitWidth, const bool hasleftpeak,
const double leftpeakcentre,
const bool hasrightpeak,
const double rightpeakcentre) {
// The X axis you are looking at
const MantidVec &vecX = input->readX(spectrum);
const MantidVec &vecY = input->readY(spectrum);
const MantidVec &vecX = input->readX(wsIndex);
const MantidVec &vecY = input->readY(wsIndex);
// Find i_center - the index of the center - The guess is within the X axis?
int i_centre = this->getVectorIndex(vecX, center_guess);
......@@ -881,7 +880,7 @@ void FindPeaks::fitPeakGivenFWHM(const API::MatrixWorkspace_sptr &input,
<< ", " << vecX[i_max];
g_log.information(outss.str());
fitSinglePeak(input, spectrum, i_min, i_max, i_centre);
fitSinglePeak(input, wsIndex, i_min, i_max, i_centre);
return;
}
......@@ -890,15 +889,14 @@ void FindPeaks::fitPeakGivenFWHM(const API::MatrixWorkspace_sptr &input,
/** Attempts to fit a candidate peak with a given window of where peak resides
*
* @param input The input workspace
* @param spectrum The spectrum index of the peak (is actually the
*WorkspaceIndex)
* @param wsIndex The workspace index of the peak
* @param centre_guess :: Channel number of peak candidate i0 - the higher
*side of the peak (right side)
* @param xmin Minimum x value to find the peak
* @param xmax Maximum x value to find the peak
*/
void FindPeaks::fitPeakInWindow(const API::MatrixWorkspace_sptr &input,
const int spectrum, const double centre_guess,
const int wsIndex, const double centre_guess,
const double xmin, const double xmax) {
// Check
g_log.information() << "Fit Peak with given window: Guessed center = "
......@@ -906,12 +904,12 @@ void FindPeaks::fitPeakInWindow(const API::MatrixWorkspace_sptr &input,
<< ", x-max = " << xmax << "\n";
if (xmin >= centre_guess || xmax <= centre_guess) {
g_log.error("Peak centre is on the edge of Fit window. ");
addNonFitRecord(spectrum, centre_guess);
addNonFitRecord(wsIndex, centre_guess);
return;
}
// The X axis you are looking at
const MantidVec &vecX = input->readX(spectrum);
const MantidVec &vecX = input->readX(wsIndex);
// The centre index
int i_centre = this->getVectorIndex(vecX, centre_guess);
......@@ -923,7 +921,7 @@ void FindPeaks::fitPeakInWindow(const API::MatrixWorkspace_sptr &input,
<< " is out side of minimum x = " << xmin
<< ". Input X ragne = " << vecX.front() << ", "
<< vecX.back() << "\n";
addNonFitRecord(spectrum, centre_guess);
addNonFitRecord(wsIndex, centre_guess);
return;
}
......@@ -932,12 +930,12 @@ void FindPeaks::fitPeakInWindow(const API::MatrixWorkspace_sptr &input,
if (i_max < i_centre) {
g_log.error() << "Input peak centre @ " << centre_guess
<< " is out side of maximum x = " << xmax << "\n";
addNonFitRecord(spectrum, centre_guess);
addNonFitRecord(wsIndex, centre_guess);
return;
}
// finally do the actual fit
fitSinglePeak(input, spectrum, i_min, i_max, i_centre);
fitSinglePeak(input, wsIndex, i_min, i_max, i_centre);
return;
}
......
......@@ -652,8 +652,8 @@ void GeneratePeaks::getSpectraSet(
}
specnum_t icount = 0;
for (auto pit = m_spectraSet.begin(); pit != m_spectraSet.end(); ++pit) {
m_SpectrumMap.emplace(*pit, icount);
for (const auto specnum : m_spectraSet) {
m_SpectrumMap.emplace(specnum, icount);
++icount;
}
......@@ -725,9 +725,7 @@ API::MatrixWorkspace_sptr GeneratePeaks::createOutputWorkspace() {
// Only copy the X-values from spectra with peaks specified in the table
// workspace.
for (auto siter = m_spectraSet.begin(); siter != m_spectraSet.end();
++siter) {
specnum_t iws = *siter;
for (const auto &iws : m_spectraSet) {
std::copy(inputWS->dataX(iws).begin(), inputWS->dataX(iws).end(),
outputWS->dataX(iws).begin());
}
......
......@@ -3,6 +3,7 @@
#include "MantidAPI/CompositeFunction.h"
#include "MantidAPI/FileProperty.h"
#include "MantidAPI/FunctionFactory.h"
#include "MantidAPI/FuncMinimizerFactory.h"
#include "MantidAPI/ITableWorkspace.h"
#include "MantidAPI/IPeakFunction.h"
#include "MantidAPI/IBackgroundFunction.h"
......@@ -14,6 +15,7 @@
#include "MantidDataObjects/OffsetsWorkspace.h"
#include "MantidKernel/ArrayProperty.h"
#include "MantidKernel/ListValidator.h"
#include "MantidKernel/StartsWithValidator.h"
#include "MantidKernel/Statistics.h"
#include "MantidKernel/VectorHelper.h"
......@@ -123,12 +125,12 @@ DECLARE_ALGORITHM(GetDetOffsetsMultiPeaks)
*/
GetDetOffsetsMultiPeaks::GetDetOffsetsMultiPeaks()
: API::Algorithm(), m_inputWS(), m_eventW(), m_isEvent(false), m_backType(),
m_peakType(), m_maxChiSq(0.), m_minPeakHeight(0.), m_leastMaxObsY(0.),
m_maxOffset(0.), m_peakPositions(), m_fitWindows(), m_inputResolutionWS(),
m_hasInputResolution(false), m_minResFactor(0.), m_maxResFactor(0.),
m_outputW(), m_outputNP(), m_maskWS(), m_infoTableWS(),
m_peakOffsetTableWS(), m_resolutionWS(), m_useFitWindowTable(false),
m_vecFitWindow() {}
m_peakType(), m_minimizer(), m_maxChiSq(0.), m_minPeakHeight(0.),
m_leastMaxObsY(0.), m_maxOffset(0.), m_peakPositions(), m_fitWindows(),
m_inputResolutionWS(), m_hasInputResolution(false), m_minResFactor(0.),
m_maxResFactor(0.), m_outputW(), m_outputNP(), m_maskWS(),
m_infoTableWS(), m_peakOffsetTableWS(), m_resolutionWS(),
m_useFitWindowTable(false), m_vecFitWindow() {}
//----------------------------------------------------------------------------------------------
/** Destructor
......@@ -159,8 +161,8 @@ void GetDetOffsetsMultiPeaks::init() {
"Name of the input Tableworkspace containing peak fit window "
"information for each spectrum. ");
std::vector<std::string> peaktypes{"BackToBackExponential", "Gaussian",
"Lorentzian"};
std::vector<std::string> peaktypes =
FunctionFactory::Instance().getFunctionNames<API::IPeakFunction>();
declareProperty("PeakFunction", "Gaussian",
boost::make_shared<StringListValidator>(peaktypes),
"Type of peak to fit");
......@@ -204,6 +206,13 @@ void GetDetOffsetsMultiPeaks::init() {
"this peak will not be fit. It is designed for EventWorkspace with "
"integer counts.");
std::vector<std::string> minimizerOptions =
API::FuncMinimizerFactory::Instance().getKeys();
declareProperty("Minimizer", "Levenberg-MarquardtMD",
Kernel::IValidator_sptr(
new Kernel::StartsWithValidator(minimizerOptions)),
"Minimizer to use for fitting peaks.");
// Disable default gsl error handler (which is to call abort!)
gsl_set_error_handler_off();
......@@ -344,6 +353,7 @@ void GetDetOffsetsMultiPeaks::processProperties() {
// The maximum allowable chisq value for an individual peak fit
m_maxChiSq = this->getProperty("MaxChiSq");
m_minPeakHeight = this->getProperty("MinimumPeakHeight");
m_minimizer = getPropertyValue("Minimizer");
m_maxOffset = getProperty("MaxOffset");
m_leastMaxObsY = getProperty("MinimumPeakHeightObs");
......@@ -848,7 +858,7 @@ int GetDetOffsetsMultiPeaks::fitSpectra(
// throw if minD >= maxD
std::stringstream ess;
ess << "Stuff went wrong with wkspIndex=" << wi
<< " specIndex=" << inputW->getSpectrum(wi)->getSpectrumNo();
<< " specNum=" << inputW->getSpectrum(wi)->getSpectrumNo();
throw std::runtime_error(ess.str());
}
......@@ -909,6 +919,7 @@ int GetDetOffsetsMultiPeaks::fitSpectra(
findpeaks->setProperty<int>("MinGuessedPeakWidth", 4);
findpeaks->setProperty<int>("MaxGuessedPeakWidth", 4);
findpeaks->setProperty<double>("MinimumPeakHeight", m_minPeakHeight);
findpeaks->setProperty<std::string>("Minimizer", m_minimizer);
findpeaks->setProperty("StartFromObservedPeakCentre", true);
findpeaks->executeAsChildAlg();
......
......@@ -109,7 +109,7 @@ void GetEi::exec() {
<< "%\n";
// get the histograms created by the monitors
std::vector<size_t> indexes = getMonitorSpecIndexs(inWS, mon1Spec, mon2Spec);
std::vector<size_t> indexes = getMonitorWsIndexs(inWS, mon1Spec, mon2Spec);
g_log.information()
<< "Looking for a peak in the first monitor spectrum, spectra index "
......@@ -208,7 +208,7 @@ void GetEi::getGeometry(API::MatrixWorkspace_const_sptr WS, specnum_t mon0Spec,
* @throw NotFoundError if one of the requested spectrum numbers was not found
* in the workspace
*/
std::vector<size_t> GetEi::getMonitorSpecIndexs(
std::vector<size_t> GetEi::getMonitorWsIndexs(
API::MatrixWorkspace_const_sptr WS, specnum_t specNum1,
specnum_t specNum2) const { // getting spectra numbers from detector IDs is
// hard because the map works the other way,
......@@ -224,7 +224,7 @@ std::vector<size_t> GetEi::getMonitorSpecIndexs(
// workspace, we can't continue from here
g_log.error() << "Couldn't find the first monitor spectrum, number "
<< specNum1 << std::endl;