diff --git a/Framework/Crystal/src/FilterPeaks.cpp b/Framework/Crystal/src/FilterPeaks.cpp index 3fa0520ff9b3a8216bfb444bc72a2788dd22b1d5..dc182753bf5c681557c58f30dd1860ad2bab01ec 100644 --- a/Framework/Crystal/src/FilterPeaks.cpp +++ b/Framework/Crystal/src/FilterPeaks.cpp @@ -34,6 +34,10 @@ double QMOD(const Mantid::Geometry::IPeak &p) { double SN(const Mantid::Geometry::IPeak &p) { return p.getIntensity() / p.getSigmaIntensity(); } + +double RUN(const Mantid::Geometry::IPeak &p) { + return p.getRunNumber(); +} } // namespace namespace Mantid { @@ -66,7 +70,7 @@ void FilterPeaks::init() { std::vector<std::string> filters{"h+k+l", "h^2+k^2+l^2", "Intensity", "Signal/Noise", "QMod", "Wavelength", - "DSpacing", "TOF"}; + "DSpacing", "TOF", "RunNumber"}; declareProperty("FilterVariable", "", boost::make_shared<StringListValidator>(filters), "The variable on which to filter the peaks"); @@ -150,6 +154,8 @@ FilterPeaks::FilterFunction FilterPeaks::getFilterVariableFunction( filterFunction = &SN; else if (filterVariable == "QMod") filterFunction = &QMOD; + else if (filterVariable == "RunNumber") + filterFunction = &RUN; else throw std::invalid_argument("Unknown FilterVariable: " + filterVariable); return filterFunction;