diff --git a/Framework/API/inc/MantidAPI/Axis.h b/Framework/API/inc/MantidAPI/Axis.h index 8dc272523373e9d569b79a3dc8ef6ff36bbc07a2..0822fbcd7859f2b79b1b68fcccb750a6c643d91e 100644 --- a/Framework/API/inc/MantidAPI/Axis.h +++ b/Framework/API/inc/MantidAPI/Axis.h @@ -87,7 +87,7 @@ public: /// Find the index of the given double value virtual size_t indexOfValue(const double value) const = 0; - /// Get the spectrum index + /// Get the spectrum number virtual specid_t spectraNo(const std::size_t &index) const; /// Get the length of the axis diff --git a/Framework/API/inc/MantidAPI/MatrixWorkspace.h b/Framework/API/inc/MantidAPI/MatrixWorkspace.h index d8c028f20fea884d5e5869fd329f200c9b022da9..7875dd0eb09d02e35769b52afd1694714646a6af 100644 --- a/Framework/API/inc/MantidAPI/MatrixWorkspace.h +++ b/Framework/API/inc/MantidAPI/MatrixWorkspace.h @@ -106,12 +106,12 @@ public: std::map<specid_t, Mantid::Kernel::V3D> getNeighbours(const Geometry::IDetector *comp, const double radius = 0.0, 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 std::map<specid_t, Mantid::Kernel::V3D> getNeighbours(specid_t spec, const double radius, 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 std::map<specid_t, Mantid::Kernel::V3D> getNeighboursExact(specid_t spec, const int nNeighbours, @@ -312,10 +312,10 @@ public: /** * Probes if DX (X Error) values were set on a particular spectrum - * @param index: the spectrum index + * @param specNum: the spectrum number */ - virtual bool hasDx(const std::size_t index) const { - return getSpectrum(index)->hasDx(); + virtual bool hasDx(const std::size_t specNum) const { + return getSpectrum(specNum)->hasDx(); } /// Generate the histogram or rebin the existing histogram. @@ -511,7 +511,7 @@ private: /// Flag indicating whether the data has common bins. False by default 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 spectrum number std::map<int64_t, MaskList> m_masks; /// A workspace holding monitor data relating to the main data in the diff --git a/Framework/API/src/SpectrumDetectorMapping.cpp b/Framework/API/src/SpectrumDetectorMapping.cpp index de51be6d8740cb89bbbf3e80317cbd29f72fc4bd..310e6441f291a24e62d74db720f71982ea7735c4 100644 --- a/Framework/API/src/SpectrumDetectorMapping.cpp +++ b/Framework/API/src/SpectrumDetectorMapping.cpp @@ -104,7 +104,7 @@ std::set<specid_t> SpectrumDetectorMapping::getSpectrumNumbers() const { const std::set<detid_t> &SpectrumDetectorMapping::getDetectorIDsForSpectrumNo( const specid_t spectrumNo) const { 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); } @@ -112,7 +112,7 @@ const std::set<detid_t> & SpectrumDetectorMapping::getDetectorIDsForSpectrumIndex( const size_t spectrumIndex) const { 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)); } diff --git a/Framework/API/test/MatrixWorkspaceTest.h b/Framework/API/test/MatrixWorkspaceTest.h index a3fda30a2722940f34dd4996e64b553b8e27ff27..aed440146e127e2a36f07405b7cc57102bb93df8 100644 --- a/Framework/API/test/MatrixWorkspaceTest.h +++ b/Framework/API/test/MatrixWorkspaceTest.h @@ -305,7 +305,7 @@ public: auto ws2 = makeWorkspaceWithDetectors(1, 2); 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)); diff --git a/Framework/Algorithms/src/ApplyTransmissionCorrection.cpp b/Framework/Algorithms/src/ApplyTransmissionCorrection.cpp index f4ca68ca097d871ee31c6a366fda97ab994939ee..9c660d3ff670da08400e8d201f387e4db14a6c77 100644 --- a/Framework/Algorithms/src/ApplyTransmissionCorrection.cpp +++ b/Framework/Algorithms/src/ApplyTransmissionCorrection.cpp @@ -98,7 +98,7 @@ void ApplyTransmissionCorrection::exec() { try { det = inputWS->getDetector(i); } catch (Exception::NotFoundError &) { - g_log.warning() << "Spectrum index " << i + g_log.warning() << "Spectrum number " << i << " has no detector assigned to it - discarding" << std::endl; // Catch if no detector. Next line tests whether this happened - test diff --git a/Framework/Algorithms/src/CalculateFlatBackground.cpp b/Framework/Algorithms/src/CalculateFlatBackground.cpp index cc9aa9240a03e094e45fa2c37bd7247a09bb241a..77c7133582ef7735c4c0940660d5e0e463801a5e 100644 --- a/Framework/Algorithms/src/CalculateFlatBackground.cpp +++ b/Framework/Algorithms/src/CalculateFlatBackground.cpp @@ -394,7 +394,7 @@ double CalculateFlatBackground::Mean(const API::MatrixWorkspace_const_sptr WS, * Uses linear algorithm to do the fitting. * * @param WS The workspace to fit -* @param spectrum The spectrum index to fit, using the workspace numbering of +* @param spectrum The spectrum number to fit, using the workspace numbering of *the spectra * @param startX An X value in the first bin to be included in the fit * @param endX An X value in the last bin to be included in the fit diff --git a/Framework/Algorithms/src/ConvertEmptyToTof.cpp b/Framework/Algorithms/src/ConvertEmptyToTof.cpp index dd86f371812a7e370f61bbe0f60338a23c974705..38a9762053c31e7e6135cff647ea02b7bbe4a648 100644 --- a/Framework/Algorithms/src/ConvertEmptyToTof.cpp +++ b/Framework/Algorithms/src/ConvertEmptyToTof.cpp @@ -89,7 +89,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."); + "Spectrum number used for elastic peak position above."); } //---------------------------------------------------------------------------------------------- @@ -164,7 +164,7 @@ void ConvertEmptyToTof::exec() { void ConvertEmptyToTof::validateSpectraIndices(std::vector<int> &v) { auto nHist = m_inputWS->getNumberHistograms(); if (v.size() == 0) { - g_log.information("No spectrum index given. Using all spectra to calculate " + g_log.information("No spectrum number given. Using all spectra to calculate " "the elastic peak."); // use all spectra indices v.reserve(nHist); diff --git a/Framework/Algorithms/src/CopyDetectorMapping.cpp b/Framework/Algorithms/src/CopyDetectorMapping.cpp index 609319a00e4e1b5c8e9c7aef27d0a758368039eb..ae508a023851e4ca550726403a11354aab2e8f0f 100644 --- a/Framework/Algorithms/src/CopyDetectorMapping.cpp +++ b/Framework/Algorithms/src/CopyDetectorMapping.cpp @@ -24,7 +24,7 @@ void CopyDetectorMapping::init() { new 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 " + "spectrum number (recommended when both workspaces have a vertical axis " "in spectrum number)."); } diff --git a/Framework/Algorithms/src/CrossCorrelate.cpp b/Framework/Algorithms/src/CrossCorrelate.cpp index aee9c1fe8717addebf4dad53213fa88ad24f2966..efe6daa74bd69fa94b0da93c7b37af037984079a 100644 --- a/Framework/Algorithms/src/CrossCorrelate.cpp +++ b/Framework/Algorithms/src/CrossCorrelate.cpp @@ -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); diff --git a/Framework/Algorithms/src/EQSANSTofStructure.cpp b/Framework/Algorithms/src/EQSANSTofStructure.cpp index ee10ed4b7598fb3eb11d5adeefafba364f704d69..8f5a6958e82a52e5edf8917fe25230daff152c81 100644 --- a/Framework/Algorithms/src/EQSANSTofStructure.cpp +++ b/Framework/Algorithms/src/EQSANSTofStructure.cpp @@ -136,7 +136,7 @@ void EQSANSTofStructure::execEvent( try { det = inputWS->getDetector(ispec); } catch (Exception::NotFoundError &) { - g_log.warning() << "Spectrum index " << ispec + g_log.warning() << "Spectrum number " << ispec << " has no detector assigned to it - discarding" << std::endl; // 'continue' statement moved outside catch block because Mac Intel diff --git a/Framework/Algorithms/src/ExtractFFTSpectrum.cpp b/Framework/Algorithms/src/ExtractFFTSpectrum.cpp index 9539f28656eb1f3895c9565ba5c028f433c23659..87c9aafafc8b3433d210847649f22ddda92ea74d 100644 --- a/Framework/Algorithms/src/ExtractFFTSpectrum.cpp +++ b/Framework/Algorithms/src/ExtractFFTSpectrum.cpp @@ -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( new WorkspaceProperty<>("OutputWorkspace", "", Direction::Output), diff --git a/Framework/Algorithms/src/FFTSmooth.cpp b/Framework/Algorithms/src/FFTSmooth.cpp index 7733e4f1c2a548c3fe3e3896412a06bca6bc53e0..806f5f7ae8d98e2075adac9b28c4b7ca2614772d 100644 --- a/Framework/Algorithms/src/FFTSmooth.cpp +++ b/Framework/Algorithms/src/FFTSmooth.cpp @@ -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", diff --git a/Framework/Algorithms/src/FFTSmooth2.cpp b/Framework/Algorithms/src/FFTSmooth2.cpp index 91c24992f7083f5648e475c5e44e7faa7900692b..253e194b9585f54157b76f4fdbe8063e6565d110 100644 --- a/Framework/Algorithms/src/FFTSmooth2.cpp +++ b/Framework/Algorithms/src/FFTSmooth2.cpp @@ -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", diff --git a/Framework/Algorithms/src/FindCenterOfMassPosition.cpp b/Framework/Algorithms/src/FindCenterOfMassPosition.cpp index c0fe7fb084ee884765426e5055a2f52d6e708938..3beee9ecd82b3d72e3be77129c4827ea6f078649 100644 --- a/Framework/Algorithms/src/FindCenterOfMassPosition.cpp +++ b/Framework/Algorithms/src/FindCenterOfMassPosition.cpp @@ -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; diff --git a/Framework/Algorithms/src/FindCenterOfMassPosition2.cpp b/Framework/Algorithms/src/FindCenterOfMassPosition2.cpp index 5462ddc17c7b29c548699e249eda2e088cc3ccbe..dbc388850d1f428e2dd6d6a50d2eecf0d0ff1df2 100644 --- a/Framework/Algorithms/src/FindCenterOfMassPosition2.cpp +++ b/Framework/Algorithms/src/FindCenterOfMassPosition2.cpp @@ -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; diff --git a/Framework/Algorithms/src/FindPeaks.cpp b/Framework/Algorithms/src/FindPeaks.cpp index a395853ae317d5436a5fb446ce1309d50951f73f..d368e92f15bb4335f0d322c00ca36e9d7b735f57 100644 --- a/Framework/Algorithms/src/FindPeaks.cpp +++ b/Framework/Algorithms/src/FindPeaks.cpp @@ -817,8 +817,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 @@ -831,14 +830,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); @@ -880,7 +879,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; } @@ -889,15 +888,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 = " @@ -905,12 +903,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); @@ -922,7 +920,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; } @@ -931,12 +929,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; } diff --git a/Framework/Algorithms/src/GetEi2.cpp b/Framework/Algorithms/src/GetEi2.cpp index e5e18e16f3df8b99687793186ecc889504429a40..fcaf5b2b02fb8764d5ce6f11e37f73e39e3ae1df 100644 --- a/Framework/Algorithms/src/GetEi2.cpp +++ b/Framework/Algorithms/src/GetEi2.cpp @@ -90,7 +90,7 @@ void GetEi2::init() declareProperty( "FirstMonitorIndex", 0, - "The spectrum index of the first montitor in the input workspace.", + "The workspace index of the first monitor in the input workspace.", Direction::Output); declareProperty("Tzero", 0.0, "", Direction::Output); diff --git a/Framework/Algorithms/src/Q1D2.cpp b/Framework/Algorithms/src/Q1D2.cpp index fbe418882dea48014b013be7c6146287c2aa546b..76cfb294f80abf3a7b2ae89d24d0b39c1d947f7b 100644 --- a/Framework/Algorithms/src/Q1D2.cpp +++ b/Framework/Algorithms/src/Q1D2.cpp @@ -353,9 +353,9 @@ Q1D2::setUpOutputWorkspace(const std::vector<double> &binParams) const { /** Calculate the normalization term for each output bin * @param wavStart [in] the index number of the first bin in the input * wavelengths that is actually being used -* @param specInd [in] the spectrum to calculate +* @param wsIndex [in] the ws index of the spectrum to calculate * @param pixelAdj [in] if not NULL this is workspace contains single bins with -* the adjustments, e.g. detector efficencies, for the given spectrum index +* the adjustments, e.g. detector efficencies, for the given ws index * @param wavePixelAdj [in] if not NULL this is workspace that contains the * adjustments for the pixels and wavelenght dependend values. * @param binNorms [in] pointer to a contigious array of doubles that are the @@ -367,7 +367,7 @@ Q1D2::setUpOutputWorkspace(const std::vector<double> &binParams) const { * @param normETo2 [out] this pointer must point to the end of the norm array, * it will be filled with the total of the error on the normalization */ -void Q1D2::calculateNormalization(const size_t wavStart, const size_t specInd, +void Q1D2::calculateNormalization(const size_t wavStart, const size_t wsIndex, API::MatrixWorkspace_const_sptr pixelAdj, API::MatrixWorkspace_const_sptr wavePixelAdj, double const *const binNorms, @@ -375,7 +375,7 @@ void Q1D2::calculateNormalization(const size_t wavStart, const size_t specInd, const MantidVec::iterator norm, const MantidVec::iterator normETo2) const { double detectorAdj, detAdjErr; - pixelWeight(pixelAdj, specInd, detectorAdj, detAdjErr); + pixelWeight(pixelAdj, wsIndex, detectorAdj, detAdjErr); // use that the normalization array ends at the start of the error array for (MantidVec::iterator n = norm, e = normETo2; n != normETo2; ++n, ++e) { *n = detectorAdj; @@ -386,32 +386,32 @@ void Q1D2::calculateNormalization(const size_t wavStart, const size_t specInd, if (wavePixelAdj) // pass the iterator for the wave pixel Adj dependent addWaveAdj(binNorms + wavStart, binNormEs + wavStart, norm, normETo2, - wavePixelAdj->readY(specInd).begin() + wavStart, - wavePixelAdj->readE(specInd).begin() + wavStart); + wavePixelAdj->readY(wsIndex).begin() + wavStart, + wavePixelAdj->readE(wsIndex).begin() + wavStart); else addWaveAdj(binNorms + wavStart, binNormEs + wavStart, norm, normETo2); } - normToMask(wavStart, specInd, norm, normETo2); + normToMask(wavStart, wsIndex, norm, normETo2); } /** Calculates the normalisation for the spectrum specified by the index number * that was passed -* as the solid anlge multiplied by the pixelAdj that was passed +* as the solid angle multiplied by the pixelAdj that was passed * @param[in] pixelAdj if not NULL this is workspace contains single bins with -* the adjustments, e.g. detector efficencies, for the given spectrum index -* @param[in] specIndex the spectrum index to return the data from -* @param[out] weight the solid angle or if pixelAdj the solid anlge times the +* the adjustments, e.g. detector efficiencies, for the given ws index +* @param[in] wsIndex the workspace index to return the data from +* @param[out] weight the solid angle or if pixelAdj the solid angle times the * pixel adjustment for this spectrum * @param[out] error the error on the weight, only non-zero if pixelAdj * @throw LogicError if the solid angle is tiny or negative */ void Q1D2::pixelWeight(API::MatrixWorkspace_const_sptr pixelAdj, - const size_t specIndex, double &weight, + const size_t wsIndex, double &weight, double &error) const { const V3D samplePos = m_dataWS->getInstrument()->getSample()->getPos(); if (m_doSolidAngle) - weight = m_dataWS->getDetector(specIndex)->solidAngle(samplePos); + weight = m_dataWS->getDetector(wsIndex)->solidAngle(samplePos); else weight = 1.0; @@ -421,8 +421,8 @@ void Q1D2::pixelWeight(API::MatrixWorkspace_const_sptr pixelAdj, } // this input multiplies up the adjustment if it exists if (pixelAdj) { - weight *= pixelAdj->readY(specIndex)[0]; - error = weight * pixelAdj->readE(specIndex)[0]; + weight *= pixelAdj->readY(wsIndex)[0]; + error = weight * pixelAdj->readE(wsIndex)[0]; } else { error = 0.0; } diff --git a/Framework/Algorithms/src/Q1DWeighted.cpp b/Framework/Algorithms/src/Q1DWeighted.cpp index e97c2069439695aa13ae4a699e850995fdfac83b..465bfb6b0725e1a74038e84fba18f2285883c271 100644 --- a/Framework/Algorithms/src/Q1DWeighted.cpp +++ b/Framework/Algorithms/src/Q1DWeighted.cpp @@ -184,7 +184,7 @@ void Q1DWeighted::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; // Catch if no detector. Next line tests whether this happened - test diff --git a/Framework/Algorithms/src/Qxy.cpp b/Framework/Algorithms/src/Qxy.cpp index d7a605245b6bd7441ee146fdb2cfd36dd3ad40cb..43ca61fde12f61cecb25ab5199c8bdf94278eeb7 100644 --- a/Framework/Algorithms/src/Qxy.cpp +++ b/Framework/Algorithms/src/Qxy.cpp @@ -131,7 +131,7 @@ void Qxy::exec() { try { det = inputWorkspace->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; // Catch if no detector. Next line tests whether this happened - test diff --git a/Framework/Algorithms/src/RemoveBins.cpp b/Framework/Algorithms/src/RemoveBins.cpp index c901b7afe8eeaad3a2af5e429de74be4cb8344f8..7361a836f6b1d6f2e5bcbdaa89961a54a8d4667b 100644 --- a/Framework/Algorithms/src/RemoveBins.cpp +++ b/Framework/Algorithms/src/RemoveBins.cpp @@ -227,7 +227,7 @@ void RemoveBins::crop(const double &start, const double &end) { } /** Convert the X range given into the unit of the input workspace - * @param index :: The current spectrum index + * @param index :: The current workspace index * @param startX :: Returns the start of the range in the workspace's unit * @param endX :: Returns the end of the range in the workspace's unit */ diff --git a/Framework/Algorithms/src/SANSDirectBeamScaling.cpp b/Framework/Algorithms/src/SANSDirectBeamScaling.cpp index 6d96768ea28087146e758e9e17af4c7a38c4d83a..03a99b714c9b6889fb9a9d557cef7df475c7c9e9 100644 --- a/Framework/Algorithms/src/SANSDirectBeamScaling.cpp +++ b/Framework/Algorithms/src/SANSDirectBeamScaling.cpp @@ -106,7 +106,7 @@ void SANSDirectBeamScaling::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; diff --git a/Framework/Algorithms/src/TOFSANSResolution.cpp b/Framework/Algorithms/src/TOFSANSResolution.cpp index 835295274b83fc9c23a6ab1367e490a0f6c125b5..660015397667e3b9841ff5e4735ff6520d9e82d5 100644 --- a/Framework/Algorithms/src/TOFSANSResolution.cpp +++ b/Framework/Algorithms/src/TOFSANSResolution.cpp @@ -130,7 +130,7 @@ void TOFSANSResolution::exec() { try { det = reducedWS->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; // Catch if no detector. Next line tests whether this happened - test diff --git a/Framework/Algorithms/src/TOFSANSResolutionByPixel.cpp b/Framework/Algorithms/src/TOFSANSResolutionByPixel.cpp index 232fbc75d69a276291d753e188e3859900e76c45..4d8f5e6e05cf2ed2e3d7d54ab7e52948b31042f9 100644 --- a/Framework/Algorithms/src/TOFSANSResolutionByPixel.cpp +++ b/Framework/Algorithms/src/TOFSANSResolutionByPixel.cpp @@ -142,7 +142,7 @@ void TOFSANSResolutionByPixel::exec() { try { det = inWS->getDetector(i); } catch (Exception::NotFoundError &) { - g_log.information() << "Spectrum index " << i + g_log.information() << "Workspace index " << i << " has no detector assigned to it - discarding" << std::endl; } diff --git a/Framework/DataHandling/inc/MantidDataHandling/SaveAscii.h b/Framework/DataHandling/inc/MantidDataHandling/SaveAscii.h index 2127facda26c5822773a73b0a845fab1f08ab9e9..66c53bc541b1abc23a845fe21a43f385f30625ec 100644 --- a/Framework/DataHandling/inc/MantidDataHandling/SaveAscii.h +++ b/Framework/DataHandling/inc/MantidDataHandling/SaveAscii.h @@ -12,18 +12,6 @@ namespace DataHandling { Saves a workspace or selected spectra in a coma-separated ascii file. Spectra are saved in columns. -Properties: -<ul> - <li>Filename - the name of the file to write to. </li> - <li>Workspace - the workspace name to be saved.</li> - <li>SpectrumMin - the starting spectrum index to save (optional) </li> - <li>SpectrumMax - the ending spectrum index to save (optional) </li> - <li>SpectrumList - a list of comma-separated spectra indeces to save -(optional) </li> - <li>Precision - the numeric precision - the number of significant digits -for the saved data (optional) </li> -</ul> - @author Roman Tolchenov, Tessella plc @date 3/07/09 diff --git a/Framework/DataHandling/inc/MantidDataHandling/SaveAscii2.h b/Framework/DataHandling/inc/MantidDataHandling/SaveAscii2.h index eb8f63b1992f4c6920c3bdf9b0448a3fc88373b9..dfc64ed8fed872d58b680ffc130d653d882f45af 100644 --- a/Framework/DataHandling/inc/MantidDataHandling/SaveAscii2.h +++ b/Framework/DataHandling/inc/MantidDataHandling/SaveAscii2.h @@ -13,18 +13,6 @@ namespace DataHandling { Saves a workspace or selected spectra in a coma-separated ascii file. Spectra are saved in columns. -Properties: -<ul> -<li>Filename - the name of the file to write to. </li> -<li>Workspace - the workspace name to be saved.</li> -<li>SpectrumMin - the starting spectrum index to save (optional) </li> -<li>SpectrumMax - the ending spectrum index to save (optional) </li> -<li>SpectrumList - a list of comma-separated spectra indeces to save (optional) -</li> -<li>Precision - the numeric precision - the number of significant digits for the -saved data (optional) </li> -</ul> - @author Keith Brown, ISIS, Placement student from the University of Derby @date 10/10/13 diff --git a/Framework/DataHandling/src/LoadMuonNexus1.cpp b/Framework/DataHandling/src/LoadMuonNexus1.cpp index aae4ccfda33ed1153c317e126616be5a44d6319a..c85961c7e3d2e86482f77ea8e44258835cc92a33 100644 --- a/Framework/DataHandling/src/LoadMuonNexus1.cpp +++ b/Framework/DataHandling/src/LoadMuonNexus1.cpp @@ -590,7 +590,7 @@ LoadMuonNexus1::createDetectorGroupingTable(std::vector<int> specToLoad, /** Load in a single spectrum taken from a NeXus file * @param hist :: The workspace index -* @param i :: The spectrum index +* @param i :: The spectrum number * @param specNo :: The spectrum number * @param nxload :: A reference to the MuonNeXusReader object * @param lengthIn :: The number of elements in a spectrum diff --git a/Framework/DataHandling/src/SaveISISNexus.cpp b/Framework/DataHandling/src/SaveISISNexus.cpp index 57cfb8e667237dd8cf98b7db6ad31f3eacbe6b82..dc81b48ceeb97d91118f5ca77c7ca98cc77b8277 100644 --- a/Framework/DataHandling/src/SaveISISNexus.cpp +++ b/Framework/DataHandling/src/SaveISISNexus.cpp @@ -641,7 +641,7 @@ void SaveISISNexus::monitor_i(int i) { NXmakegroup(handle, ostr.str().c_str(), "NXmonitor"); NXopengroup(handle, ostr.str().c_str(), "NXmonitor"); - // int imon = m_isisRaw->mdet[i]; // spectrum index + // int imon = m_isisRaw->mdet[i]; // spectrum number NXmakedata(handle, "data", NX_INT32, 3, dim); NXopendata(handle, "data"); for (int p = 0; p < nper; ++p) { diff --git a/Framework/LiveData/src/ISISHistoDataListener.cpp b/Framework/LiveData/src/ISISHistoDataListener.cpp index 86d80efb25a2d55f02f96b30bd9da70c3fc5c32c..f84dfdb6355aa25d1a6abf9e6722ce3531626b80 100644 --- a/Framework/LiveData/src/ISISHistoDataListener.cpp +++ b/Framework/LiveData/src/ISISHistoDataListener.cpp @@ -405,7 +405,7 @@ void ISISHistoDataListener::calculateIndicesForReading( /** * Read spectra from the DAE * @param period :: Current period index - * @param index :: First spectrum index + * @param index :: First spectrum number * @param count :: Number of spectra to read * @param workspace :: Workspace to store the data * @param workspaceIndex :: index in workspace to store data diff --git a/Framework/MDAlgorithms/src/ConvertCWPDMDToSpectra.cpp b/Framework/MDAlgorithms/src/ConvertCWPDMDToSpectra.cpp index ef2f4dd8a2dbf4b224eecc02ce2cba830eccfa42..d9037b8f621d3ee056de0205e88a4b00cdac805b 100644 --- a/Framework/MDAlgorithms/src/ConvertCWPDMDToSpectra.cpp +++ b/Framework/MDAlgorithms/src/ConvertCWPDMDToSpectra.cpp @@ -640,7 +640,7 @@ void ConvertCWPDMDToSpectra::linearInterpolation( } g_log.debug() << "iMinNonZero = " << minNonZeroIndex << ", iMaxNonZero = " << maxNonZeroIndex - << " Spectrum index = " << i + << " Workspace index = " << i << ", Y size = " << matrixws->readY(i).size() << "\n"; if (minNonZeroIndex >= maxNonZeroIndex) throw std::runtime_error("It is not right!"); diff --git a/Framework/WorkflowAlgorithms/src/EQSANSMonitorTOF.cpp b/Framework/WorkflowAlgorithms/src/EQSANSMonitorTOF.cpp index a3fdd83bd01f391e68521b8456b5bb946bd21291..7a3349740d10ca98f115a8a0a10973eed0f1c073 100644 --- a/Framework/WorkflowAlgorithms/src/EQSANSMonitorTOF.cpp +++ b/Framework/WorkflowAlgorithms/src/EQSANSMonitorTOF.cpp @@ -62,7 +62,7 @@ void EQSANSMonitorTOF::exec() { try { mon = inputWS->getInstrument()->getDetector(monitor_list[0]); } catch (Exception::NotFoundError &) { - g_log.error() << "Spectrum index " << monitor_list[0] + g_log.error() << "Spectrum number " << monitor_list[0] << " has no detector assigned to it - discarding" << std::endl; return; diff --git a/Framework/WorkflowAlgorithms/src/SANSSolidAngleCorrection.cpp b/Framework/WorkflowAlgorithms/src/SANSSolidAngleCorrection.cpp index 7fb9cee5d5e04c9ee33e75f1678b973ca40486cf..6b6460afaed0a701671e442206067b07312c1cb5 100644 --- a/Framework/WorkflowAlgorithms/src/SANSSolidAngleCorrection.cpp +++ b/Framework/WorkflowAlgorithms/src/SANSSolidAngleCorrection.cpp @@ -121,7 +121,7 @@ void SANSSolidAngleCorrection::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; // Catch if no detector. Next line tests whether this happened - test @@ -192,7 +192,7 @@ void SANSSolidAngleCorrection::execEvent() { try { det = outputEventWS->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; // Catch if no detector. Next line tests whether this happened - test diff --git a/MantidPlot/src/Mantid/MantidUI.cpp b/MantidPlot/src/Mantid/MantidUI.cpp index ad0c59bf71bfa095769a03083652e6171ef0e2c5..e88755e8eb4e84f1c4645ccb30e870ea3c3901cb 100644 --- a/MantidPlot/src/Mantid/MantidUI.cpp +++ b/MantidPlot/src/Mantid/MantidUI.cpp @@ -2947,7 +2947,7 @@ y-values and errors (if errs is true) of the following spectra. If visible == tr the table is made visible in Qtiplot. The name of a Y column is "Y"+QString\:\:number(i), where i is the row in the MantidMatrix, -not the spectrum index in the workspace. +not the spectrum number in the workspace. */ Table* MantidUI::createTableFromSelectedRows(MantidMatrix *m, bool errs, bool binCentres) @@ -3041,7 +3041,7 @@ MultiLayer *MantidUI::plot1D(const QStringList &ws_names, const QList<int> &inde { pairs.insert(workspace_name, spec_itr.previous()); } - //Reset spectrum index pointer + //Reset workspace index pointer spec_itr.toBack(); } diff --git a/MantidPlot/src/Mantid/PeakPickerTool.h b/MantidPlot/src/Mantid/PeakPickerTool.h index 1a9a540c268899618c8fbc9b6a3e01f5b6cf6d58..b752f405d8f44059f14e0fa79468602f7685606a 100644 --- a/MantidPlot/src/Mantid/PeakPickerTool.h +++ b/MantidPlot/src/Mantid/PeakPickerTool.h @@ -86,7 +86,7 @@ public: bool eventFilter(QObject *obj, QEvent *event) override; /// Workspace name const QString& workspaceName()const{return m_wsName;} - /// Spectrum index + /// workspace index int spec()const{return m_spec;} /// The parent graph Graph* graph()const{return d_graph;} @@ -194,7 +194,7 @@ private: /// Workspace name QString m_wsName; - /// Spectrum index + /// Workspace index int m_spec; /// Pointer to the workspace boost::shared_ptr<Mantid::API::MatrixWorkspace> m_ws; diff --git a/MantidQt/CustomInterfaces/inc/MantidQtCustomInterfaces/DataComparison.h b/MantidQt/CustomInterfaces/inc/MantidQtCustomInterfaces/DataComparison.h index 004dfa9cbf0dc20ced4fbbad9233ca7b71f3a2e4..d4bc6ce9b13c1179821471f1c39ec5282bf594d5 100644 --- a/MantidQt/CustomInterfaces/inc/MantidQtCustomInterfaces/DataComparison.h +++ b/MantidQt/CustomInterfaces/inc/MantidQtCustomInterfaces/DataComparison.h @@ -53,7 +53,7 @@ namespace CustomInterfaces /// Handles updating the plot void updatePlot(); /// Handles updating th eplot after a spectum index is changed - void spectrumIndexChanged(); + void workspaceIndexChanged(); /// Handles creating and plotting a diff worksapce void plotDiffWorkspace(); /// Toggle the pan plot tool diff --git a/MantidQt/CustomInterfaces/inc/MantidQtCustomInterfaces/Indirect/IndirectTab.h b/MantidQt/CustomInterfaces/inc/MantidQtCustomInterfaces/Indirect/IndirectTab.h index 639cd0dede31de13e33c3b444214cd6f1d553319..d5ddd8eb716c87c3c8bb558cdb84461479ebf9a9 100644 --- a/MantidQt/CustomInterfaces/inc/MantidQtCustomInterfaces/Indirect/IndirectTab.h +++ b/MantidQt/CustomInterfaces/inc/MantidQtCustomInterfaces/Indirect/IndirectTab.h @@ -100,8 +100,8 @@ protected: /// Gets the base name of a workspace QString getWorkspaceBasename(const QString &wsName); - /// Plot a spectrum plot with a given spectrum index - void plotSpectrum(const QStringList &workspaceNames, int specIndex = 0); + /// Plot a spectrum plot with a given ws index + void plotSpectrum(const QStringList &workspaceNames, int wsIndex = 0); /// Plot a spectrum plot of a given workspace void plotSpectrum(const QString &workspaceName, int specIndex = 0); diff --git a/MantidQt/CustomInterfaces/src/DataComparison.cpp b/MantidQt/CustomInterfaces/src/DataComparison.cpp index 214f4dc7cef53de93ce2c399f8aca5a60ba3a708..409786ad797ed0e10ca8669242b66ac684befb13 100644 --- a/MantidQt/CustomInterfaces/src/DataComparison.cpp +++ b/MantidQt/CustomInterfaces/src/DataComparison.cpp @@ -77,8 +77,8 @@ void DataComparison::initLayout() connect(m_uiForm.pbZoom, SIGNAL(toggled(bool)), this, SLOT(toggleZoom(bool))); connect(m_uiForm.pbResetView, SIGNAL(clicked()), this, SLOT(resetView())); - // Replot spectra when the spectrum index is changed - connect(m_uiForm.sbSpectrum, SIGNAL(valueChanged(int)), this, SLOT(spectrumIndexChanged())); + // Replot spectra when the workspace index is changed + connect(m_uiForm.sbSpectrum, SIGNAL(valueChanged(int)), this, SLOT(workspaceIndexChanged())); // Add headers to data table QStringList headerLabels; @@ -323,7 +323,7 @@ void DataComparison::removeAllData() } // Replot the workspaces - spectrumIndexChanged(); + workspaceIndexChanged(); } @@ -347,20 +347,20 @@ void DataComparison::plotWorkspaces() // Calculate spectrum number QSpinBox *specOffsetSpin = dynamic_cast<QSpinBox *>(m_uiForm.twCurrentData->cellWidget(row, SPEC_OFFSET)); int specOffset = specOffsetSpin->value(); - int specIndex = globalSpecIndex - specOffset; - g_log.debug() << "Spectrum index for workspace " << workspaceName.toStdString() - << " is " << specIndex << ", with offset " << specOffset << std::endl; + int wsIndex = globalSpecIndex - specOffset; + g_log.debug() << "Workspace index for workspace " << workspaceName.toStdString() + << " is " << wsIndex << ", with offset " << specOffset << std::endl; // See if this workspace extends the reach of the global spectrum selector int maxGlobalSpecIndexForWs = numSpec + specOffset - 1; if(maxGlobalSpecIndexForWs > maxGlobalSpecIndex) maxGlobalSpecIndex = maxGlobalSpecIndexForWs; - // Check the spectrum index is in range - if(specIndex >= numSpec || specIndex < 0) + // Check the workspace index is in range + if(wsIndex >= numSpec || wsIndex < 0) { g_log.debug() << "Workspace " << workspaceName.toStdString() - << ", spectrum index out of range." << std::endl;; + << ", workspace index out of range." << std::endl;; // Give "n/a" in current spectrum display m_uiForm.twCurrentData->item(row, CURRENT_SPEC)->setText(tr("n/a")); @@ -373,11 +373,11 @@ void DataComparison::plotWorkspaces() } // Update current spectrum display - m_uiForm.twCurrentData->item(row, CURRENT_SPEC)->setText(tr(QString::number(specIndex))); + m_uiForm.twCurrentData->item(row, CURRENT_SPEC)->setText(tr(QString::number(wsIndex))); // Create the curve data const bool logScale(false), distribution(false); - QwtWorkspaceSpectrumData wsData(*workspace, static_cast<int>(specIndex), logScale, distribution); + QwtWorkspaceSpectrumData wsData(*workspace, static_cast<int>(wsIndex), logScale, distribution); // Detach the old curve from the plot if it exists if(m_curves.contains(workspaceName)) @@ -407,7 +407,7 @@ void DataComparison::plotWorkspaces() /** - * Normalises the spectrum index offsets in the data table to zero. + * Normalises the workspace index offsets in the data table to zero. */ void DataComparison::normaliseSpectraOffsets() { @@ -425,7 +425,7 @@ void DataComparison::normaliseSpectraOffsets() lowestOffset = specOffset; } - // Subtract the loest offset from all offsets to ensure at least one offset is zero + // Subtract the lowest offset from all offsets to ensure at least one offset is zero for(int row = 0; row < numRows; row++) { QSpinBox *specOffsetSpin = dynamic_cast<QSpinBox *>(m_uiForm.twCurrentData->cellWidget(row, SPEC_OFFSET)); @@ -449,9 +449,9 @@ void DataComparison::updatePlot() /** - * Handles a spectrum index or offset being modified. + * Handles a workspace index or offset being modified. */ -void DataComparison::spectrumIndexChanged() +void DataComparison::workspaceIndexChanged() { normaliseSpectraOffsets(); plotWorkspaces(); diff --git a/MantidQt/CustomInterfaces/src/Indirect/IndirectTab.cpp b/MantidQt/CustomInterfaces/src/Indirect/IndirectTab.cpp index 73574e6efc1d3e5466396a6c11260067042c446c..eb6cbefd95f96aacc58c4075f6fcf8cd2a64bacb 100644 --- a/MantidQt/CustomInterfaces/src/Indirect/IndirectTab.cpp +++ b/MantidQt/CustomInterfaces/src/Indirect/IndirectTab.cpp @@ -215,10 +215,10 @@ QString IndirectTab::getWorkspaceBasename(const QString &wsName) { * This uses the plotSpectrum function from the Python API. * * @param workspaceNames List of names of workspaces to plot - * @param specIndex Index of spectrum from each workspace to plot + * @param wsIndex Index of spectrum from each workspace to plot */ void IndirectTab::plotSpectrum(const QStringList &workspaceNames, - int specIndex) { + int wsIndex) { if (workspaceNames.isEmpty()) return; @@ -227,7 +227,7 @@ void IndirectTab::plotSpectrum(const QStringList &workspaceNames, pyInput += "plotSpectrum(['"; pyInput += workspaceNames.join("','"); pyInput += "'], "; - pyInput += QString::number(specIndex); + pyInput += QString::number(wsIndex); pyInput += ")\n"; m_pythonRunner.runPythonCode(pyInput); diff --git a/MantidQt/CustomInterfaces/src/Indirect/Quasi.cpp b/MantidQt/CustomInterfaces/src/Indirect/Quasi.cpp index d128157e2559dcee2bd9b0eff079310b9666b5a7..b5683d94a89196a2b034ad8a06acef125cc85656 100644 --- a/MantidQt/CustomInterfaces/src/Indirect/Quasi.cpp +++ b/MantidQt/CustomInterfaces/src/Indirect/Quasi.cpp @@ -404,7 +404,7 @@ void Quasi::handleProgramChange(int index) { /** * Handles setting a new preview spectrum on the preview plot. * - * @param value Spectrum index + * @param value workspace index */ void Quasi::previewSpecChanged(int value) { m_previewSpec = value; diff --git a/MantidQt/CustomInterfaces/src/Indirect/ResNorm.cpp b/MantidQt/CustomInterfaces/src/Indirect/ResNorm.cpp index 644c206d71e7a1440a19213230e09263810e9876..3cb9706dcf1414a56da09c274aee277ac4a81412 100644 --- a/MantidQt/CustomInterfaces/src/Indirect/ResNorm.cpp +++ b/MantidQt/CustomInterfaces/src/Indirect/ResNorm.cpp @@ -278,7 +278,7 @@ void ResNorm::updateProperties(QtProperty *prop, double val) { /** * Sets a new preview spectrum for the mini plot. * - * @param value Spectrum index + * @param value workspace index */ void ResNorm::previewSpecChanged(int value) { m_previewSpec = value; diff --git a/MantidQt/CustomInterfaces/src/SANSDiagnostics.cpp b/MantidQt/CustomInterfaces/src/SANSDiagnostics.cpp index a8abf5f7ac065bbd333bd9dbb244c7646c0f98e0..48789ff9b0063be8176d564792a19835ececcbfe 100644 --- a/MantidQt/CustomInterfaces/src/SANSDiagnostics.cpp +++ b/MantidQt/CustomInterfaces/src/SANSDiagnostics.cpp @@ -473,7 +473,7 @@ namespace MantidQt if ( min_spec_index == ULONG_MAX || max_spec_index == 0){ g_log.error()<<"Error : The instrument does not have data associated to the RectangularDetector " << rectDet->getDetectorName().toStdString()<<std::endl; } - // as long the spectrum index is the workspace index + 1 + // as long the spectrum number is the workspace index + 1 specList.clear(); // it is not really required, it could stay with the workspace id, just for compatibility specList.push_back(mws_sptr->getSpectrum(min_spec_index)->getSpectrumNo()); @@ -515,7 +515,7 @@ namespace MantidQt } - /** This method returns workspace Indexes for the given spectrum indexes + /** This method returns workspace Indexes for the given spectrum numbers * @param mws_sptr - shared pointer to workspace * @param specList - list of spectra * @param startWSIndex - start index of workspace @@ -797,8 +797,8 @@ namespace MantidQt * executes LoadRaw and SumRowColumn algorithm. * @param range string entered by user * @param orientation orientation - * @param specMin- minimum spectrum index - * @param specMax - maximum spectrum index + * @param specMin- minimum spectrum number + * @param specMax - maximum spectrum number * @param detectorName - name of the detector. * @param integrationType - the type of the integration, i.e. H, V or T * @param bMask boolean used for masking @@ -936,8 +936,8 @@ namespace MantidQt /**This method gets called from the handler of TimeIntegral Clicked button click. * executes SumSpectra algorithm. * @param range string entered by user - * @param minSpec- minimum spectrum index used to separate the Front/Rear Detectors data. - * @param maxSpec - maximum spectrum index used to separate the Front/Read Detectors data. + * @param minSpec- minimum spectrum number used to separate the Front/Rear Detectors data. + * @param maxSpec - maximum spectrum number used to separate the Front/Read Detectors data. * @param opws - output workspace. * @param pixel_mask boolean used for masking */ diff --git a/MantidQt/MantidWidgets/src/PreviewPlot.cpp b/MantidQt/MantidWidgets/src/PreviewPlot.cpp index 70647142c5fc280a0308c7710fe61b9e88b575b6..edb36053062bdf32375112831e27bb71e4dc5ff4 100644 --- a/MantidQt/MantidWidgets/src/PreviewPlot.cpp +++ b/MantidQt/MantidWidgets/src/PreviewPlot.cpp @@ -236,12 +236,12 @@ QPair<double, double> PreviewPlot::getCurveRange(const QString &curveName) { * * @param curveName Name of curve * @param ws Pointer to the workspace - * @param specIndex Spectrum index to plot + * @param wsIndex workspace index to plot * @param curveColour Colour of curve to plot */ void PreviewPlot::addSpectrum(const QString &curveName, const MatrixWorkspace_sptr ws, - const size_t specIndex, + const size_t wsIndex, const QColor &curveColour) { if (curveName.isEmpty()) { g_log.warning("Cannot plot with empty curve name"); @@ -269,7 +269,7 @@ void PreviewPlot::addSpectrum(const QString &curveName, m_showErrorsMenu->addAction(m_curves[curveName].showErrorsAction); // Create the curve - addCurve(m_curves[curveName], ws, specIndex, curveColour); + addCurve(m_curves[curveName], ws, wsIndex, curveColour); // Create the curve label QLabel *label = new QLabel(curveName); @@ -283,7 +283,7 @@ void PreviewPlot::addSpectrum(const QString &curveName, m_curves[curveName].ws = ws; m_curves[curveName].label = label; m_curves[curveName].colour = curveColour; - m_curves[curveName].wsIndex = specIndex; + m_curves[curveName].wsIndex = wsIndex; // Replot emit needToReplot(); @@ -294,11 +294,11 @@ void PreviewPlot::addSpectrum(const QString &curveName, * * @param curveName Name of curve * @param wsName Name of workspace in ADS - * @param specIndex Spectrum index to plot + * @param wsIndex workspace index to plot * @param curveColour Colour of curve to plot */ void PreviewPlot::addSpectrum(const QString &curveName, const QString &wsName, - const size_t specIndex, + const size_t wsIndex, const QColor &curveColour) { if (wsName.isEmpty()) { g_log.error("Cannot plot with empty workspace name"); @@ -314,7 +314,7 @@ void PreviewPlot::addSpectrum(const QString &curveName, const QString &wsName, throw std::runtime_error( wsNameStr + " is not a MatrixWorkspace, not supported by PreviewPlot."); - addSpectrum(curveName, ws, specIndex, curveColour); + addSpectrum(curveName, ws, wsIndex, curveColour); } /** @@ -613,15 +613,15 @@ PreviewPlot::handleReplaceEvent(WorkspaceAfterReplaceNotification_ptr pNf) { * Creates a new curve and adds it to the plot. * * @param curveConfig Curve configuration to add to - * @param ws Worksapce pointer - * @param specIndex Index of histogram to plot + * @param ws Workspace pointer + * @param wsIndex Index of histogram to plot * @param curveColour Colour of curve */ void PreviewPlot::addCurve(PlotCurveConfiguration &curveConfig, - MatrixWorkspace_sptr ws, const size_t specIndex, + MatrixWorkspace_sptr ws, const size_t wsIndex, const QColor &curveColour) { - // Check the spectrum index is in range - if (specIndex >= ws->getNumberHistograms()) + // Check the workspace index is in range + if (wsIndex >= ws->getNumberHistograms()) throw std::runtime_error("Workspace index is out of range, cannot plot."); // Check the X axis is large enough @@ -645,7 +645,7 @@ void PreviewPlot::addCurve(PlotCurveConfiguration &curveConfig, ws = convertXAlg->getProperty("OutputWorkspace"); } - std::vector<double> wsDataY = ws->readY(specIndex); + std::vector<double> wsDataY = ws->readY(wsIndex); // If using log scale need to remove all negative Y values bool logYScale = getAxisType(QwtPlot::yLeft) == "Logarithmic"; @@ -664,7 +664,7 @@ void PreviewPlot::addCurve(PlotCurveConfiguration &curveConfig, } // Create the Qwt data - QwtArray<double> dataX = QVector<double>::fromStdVector(ws->readX(specIndex)); + QwtArray<double> dataX = QVector<double>::fromStdVector(ws->readX(wsIndex)); QwtArray<double> dataY = QVector<double>::fromStdVector(wsDataY); QwtArrayData wsData(dataX, dataY); @@ -677,7 +677,7 @@ void PreviewPlot::addCurve(PlotCurveConfiguration &curveConfig, // Create error bars if needed if (curveConfig.showErrorsAction->isChecked()) { curveConfig.errorCurve = - new ErrorCurve(curveConfig.curve, ws->readE(specIndex)); + new ErrorCurve(curveConfig.curve, ws->readE(wsIndex)); curveConfig.errorCurve->attach(m_uiForm.plot); } else { curveConfig.errorCurve = NULL; diff --git a/MantidQt/SpectrumViewer/src/MatrixWSDataSource.cpp b/MantidQt/SpectrumViewer/src/MatrixWSDataSource.cpp index 894333a90197ca7c2506aa84335fde70107b2909..322b8121be3b13c52669f5ab48221bca1f40338b 100644 --- a/MantidQt/SpectrumViewer/src/MatrixWSDataSource.cpp +++ b/MantidQt/SpectrumViewer/src/MatrixWSDataSource.cpp @@ -52,7 +52,7 @@ MatrixWSDataSource::MatrixWSDataSource( MatrixWorkspace_const_sptr matWs ) : m_totalXMin = matWs->getXMin(); m_totalXMax = matWs->getXMax(); - m_totalYMin = 0; // Y direction is spectrum index + m_totalYMin = 0; // Y direction is workspace index m_totalYMax = (double)matWs->getNumberHistograms(); m_totalRows = matWs->getNumberHistograms(); @@ -192,7 +192,7 @@ DataArray_const_sptr MatrixWSDataSource::getDataArray( double xMin, double x } } - // Choose spectra from required range of spectrum indexes + // Choose spectra from required range of workspace indexes double yStep = (yMax - yMin) / (double)numRows; double dYIndex;