Skip to content

Commit

Permalink
Re #6267. Minimum and maximum value can be the same.
Browse files Browse the repository at this point in the history
  • Loading branch information
RussellTaylor committed Dec 7, 2012
1 parent c965041 commit fa22af8
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 18 deletions.
20 changes: 6 additions & 14 deletions Code/Mantid/Framework/Algorithms/src/FilterByLogValue.cpp
Expand Up @@ -35,20 +35,12 @@ times of the pulses to be rejected. For example, this call will filter out veto
*WIKI*/

//----------------------------------------------------------------------
// Includes
//----------------------------------------------------------------------
#include "MantidAlgorithms/FilterByLogValue.h"
#include "MantidDataObjects/EventList.h"
#include "MantidDataObjects/EventWorkspace.h"
#include "MantidAPI/WorkspaceValidators.h"
#include "MantidAPI/SpectraDetectorMap.h"
#include "MantidKernel/UnitFactory.h"
#include "MantidKernel/TimeSeriesProperty.h"
#include "MantidKernel/PhysicalConstants.h"
#include "MantidKernel/DateAndTime.h"
#include "MantidAPI/FileProperty.h"

#include <fstream>
#include "MantidKernel/TimeSplitter.h"
#include "MantidKernel/BoundedValidator.h"
#include "MantidKernel/ITimeSeriesProperty.h"
#include "MantidKernel/ListValidator.h"

namespace Mantid
Expand Down Expand Up @@ -186,8 +178,8 @@ void FilterByLogValue::exec()
else
{
// ----- Filter by value ------
if (max <= min)
throw std::invalid_argument("MaximumValue should be > MinimumValue. Aborting.");
if (max < min)
throw std::invalid_argument("MaximumValue should be >= MinimumValue. Aborting.");

//This function creates the splitter vector we will use to filter out stuff.
const std::string logBoundary(this->getPropertyValue("LogBoundary"));
Expand Down
8 changes: 4 additions & 4 deletions Code/Mantid/Framework/Kernel/src/TimeSeriesProperty.cpp
Expand Up @@ -453,8 +453,8 @@ namespace Mantid
if ( max < min )
{
std::stringstream ss;
ss << "TimeSeriesProperty::makeFilterByValue: 'max' argument must be greater than 'min'"
<< "(got min=" << min << " max=" << max;
ss << "TimeSeriesProperty::makeFilterByValue: 'max' argument must be greater than 'min' "
<< "(got min=" << min << " max=" << max << ")";
throw std::invalid_argument(ss.str());
}

Expand Down Expand Up @@ -540,8 +540,8 @@ namespace Mantid
if ( max < min )
{
std::stringstream ss;
ss << "TimeSeriesProperty::expandFilterToRange: 'max' argument must be greater than 'min'"
<< "(got min=" << min << " max=" << max;
ss << "TimeSeriesProperty::expandFilterToRange: 'max' argument must be greater than 'min' "
<< "(got min=" << min << " max=" << max << ")";
throw std::invalid_argument(ss.str());
}

Expand Down

0 comments on commit fa22af8

Please sign in to comment.