Skip to content

Commit

Permalink
Refs #5416 compare iReal to getNumberHistograms
Browse files Browse the repository at this point in the history
modified: FFT.cpp
  • Loading branch information
jmborr committed May 24, 2012
1 parent a03380e commit 6b03919
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions Code/Mantid/Framework/Algorithms/src/FFT.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -181,12 +181,14 @@ void FFT::exec()
const int ySize = static_cast<int>(inWS->blocksize());
const int xSize = static_cast<int>(X.size());

if(iReal >= ySize) throw std::invalid_argument("Property Real is out of range");
int nHist = static_cast<int>(inWS->getNumberHistograms());
if( iReal >= nHist ) throw std::invalid_argument("Property Real is out of range");
if( isComplex )
{
const int yImagSize = static_cast<int>(inImagWS->blocksize());
if( ySize != yImagSize ) throw std::length_error("Real and Imaginary sizes do not match");
if( iImag >= ySize ) throw std::invalid_argument("Property Imaginary is out of range");
nHist = static_cast<int>(inImagWS->getNumberHistograms());
if( iImag >= nHist ) throw std::invalid_argument("Property Imaginary is out of range");
}

//Check that the x values are evenly spaced
Expand Down

0 comments on commit 6b03919

Please sign in to comment.