Skip to content

Commit

Permalink
Refs #4472. Fixed calculation of final bin boundary in GSAS/SLOG.
Browse files Browse the repository at this point in the history
  • Loading branch information
peterfpeterson committed Apr 12, 2012
1 parent 9ea7624 commit 37a1d39
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Code/Mantid/Framework/DataHandling/src/SaveGSS.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -462,12 +462,12 @@ namespace Mantid
g_log.debug() << "SaveGSS(): MultipyByBinwidth = " << MultiplyByBinWidth << std::endl;

const size_t datasize = Y.size();
double bc1 = *(X.begin()); // minimum TOF in microseconds
double bc1 = X.front(); // minimum TOF in microseconds
if (bc1 <= 0.)
{
throw std::runtime_error("Cannot write out logarithmic data starting at zero");
}
double bc2 = *(X.rbegin() + 1); // maximum TOF (in microseconds?)
double bc2 = 0.5 * (*(X.rbegin()) + *(X.rbegin()+ 1)); // maximum TOF (in microseconds?)
double bc3 = (*(X.begin() + 1) - bc1) / bc1; // deltaT/T

g_log.debug() << "SaveGSS(): Min TOF = " << bc1 << std::endl;
Expand Down

0 comments on commit 37a1d39

Please sign in to comment.