Skip to content

Commit

Permalink
refs #9502 Returning to previous (incorrect) behavior
Browse files Browse the repository at this point in the history
for event workspace bin boundaries, which should fix live listener test though
  • Loading branch information
abuts committed Jun 4, 2014
1 parent 23d7e98 commit 32ad087
Showing 1 changed file with 9 additions and 5 deletions.
14 changes: 9 additions & 5 deletions Code/Mantid/Framework/MDAlgorithms/src/ConvertToMD.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -273,15 +273,19 @@ namespace Mantid
{

if(dynamic_cast<DataObjects::EventWorkspace *>(m_InWS2D.get()))
{
g_log.warning()<<"Bin boundaries retrieved from event workspace are ignored by ConvertToMD transformation so the resolution estimates obtained from these boundaries are incorrect\n";
}
else
{
g_log.information()<<" ConvertToMD converts input workspace units, but the bin boundaries are copied from the first workspace spectra. The resolution estimates can be incorrect if unit conversion depends on spectra number\n";

UnitsConversionHelper &unitConv = m_Convertor->getUnitConversionHelper();
unitConv.updateConversion(spectra_index);
for(size_t i=0;i<binBoundaries.size();i++)
{
binBoundaries[i] =unitConv.convertUnits(binBoundaries[i]);
UnitsConversionHelper &unitConv = m_Convertor->getUnitConversionHelper();
unitConv.updateConversion(spectra_index);
for(size_t i=0;i<binBoundaries.size();i++)
{
binBoundaries[i] =unitConv.convertUnits(binBoundaries[i]);
}
}
//
if (binBoundaries[0]>binBoundaries[binBoundaries.size()-1])
Expand Down

0 comments on commit 32ad087

Please sign in to comment.