Skip to content

Commit

Permalink
Refs #11362 Fix error in writing axes.
Browse files Browse the repository at this point in the history
  • Loading branch information
rosswhitfield committed Apr 23, 2015
1 parent a30558c commit 0813912
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Code/Mantid/Framework/MDAlgorithms/src/SaveMD2.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -137,10 +137,10 @@ void SaveMD2::doSaveHisto(Mantid::DataObjects::MDHistoWorkspace_sptr ws) {
for (size_t d = 0; d < numDims; d++) {
std::vector<double> axis;
IMDDimension_const_sptr dim = ws->getDimension(d);
for (size_t n = 0; n <= dim->getNBins(); n++)
for (size_t n = 0; n < dim->getNBins()+1; n++)
axis.push_back(dim->getX(n));
file->makeData(dim->getDimensionId(), ::NeXus::FLOAT64,
static_cast<int>(dim->getNBins()), true);
static_cast<int>(dim->getNBins()+1), true);
file->putData(axis);
file->putAttr("units", std::string(dim->getUnits()));
file->putAttr("long_name", std::string(dim->getName()));
Expand Down

0 comments on commit 0813912

Please sign in to comment.