From e6148fdfc8cd905debe717c369262e5d8379b99b Mon Sep 17 00:00:00 2001 From: Vickie Lynch <vlynch@ornl.gov> Date: Fri, 2 Aug 2013 21:58:24 -0400 Subject: [PATCH] Refs #7553 preserveEvents=False agrees with True --- .../Framework/Algorithms/src/ResampleX.cpp | 2 +- .../AlignAndFocusPowder.h | 2 +- .../src/AlignAndFocusPowder.cpp | 16 +++++++++------- 3 files changed, 11 insertions(+), 9 deletions(-) diff --git a/Code/Mantid/Framework/Algorithms/src/ResampleX.cpp b/Code/Mantid/Framework/Algorithms/src/ResampleX.cpp index 1134192a2ea..f3f9937ad07 100644 --- a/Code/Mantid/Framework/Algorithms/src/ResampleX.cpp +++ b/Code/Mantid/Framework/Algorithms/src/ResampleX.cpp @@ -430,7 +430,7 @@ namespace Algorithms API::MatrixWorkspace_sptr outputWS; // make output Workspace the same type is the input, but with new length of signal array - outputWS = API::WorkspaceFactory::Instance().create(inputWS,numSpectra,m_numBins,m_numBins); + outputWS = API::WorkspaceFactory::Instance().create(inputWS,numSpectra,m_numBins+1,m_numBins); // Copy over the 'vertical' axis diff --git a/Code/Mantid/Framework/WorkflowAlgorithms/inc/MantidWorkflowAlgorithms/AlignAndFocusPowder.h b/Code/Mantid/Framework/WorkflowAlgorithms/inc/MantidWorkflowAlgorithms/AlignAndFocusPowder.h index 8381ab69d7b..eeed812c9ab 100644 --- a/Code/Mantid/Framework/WorkflowAlgorithms/inc/MantidWorkflowAlgorithms/AlignAndFocusPowder.h +++ b/Code/Mantid/Framework/WorkflowAlgorithms/inc/MantidWorkflowAlgorithms/AlignAndFocusPowder.h @@ -75,7 +75,7 @@ namespace Mantid void init(); void exec(); void loadCalFile(const std::string &calFileName); - void rebin(API::MatrixWorkspace_sptr matrixws); + API::MatrixWorkspace_sptr rebin(API::MatrixWorkspace_sptr matrixws); API::MatrixWorkspace_sptr conjoinWorkspaces(API::MatrixWorkspace_sptr ws1, API::MatrixWorkspace_sptr ws2, size_t offset); diff --git a/Code/Mantid/Framework/WorkflowAlgorithms/src/AlignAndFocusPowder.cpp b/Code/Mantid/Framework/WorkflowAlgorithms/src/AlignAndFocusPowder.cpp index 1956896a9e1..b264cb5e2d2 100644 --- a/Code/Mantid/Framework/WorkflowAlgorithms/src/AlignAndFocusPowder.cpp +++ b/Code/Mantid/Framework/WorkflowAlgorithms/src/AlignAndFocusPowder.cpp @@ -348,7 +348,7 @@ namespace WorkflowAlgorithms m_outputW = maskAlg->getProperty("Workspace"); if(!dspace) - this->rebin(m_outputW); + m_outputW = rebin(m_outputW); g_log.information() << "running AlignDetectors\n"; API::IAlgorithm_sptr alignAlg = createChildAlgorithm("AlignDetectors"); @@ -450,9 +450,9 @@ namespace WorkflowAlgorithms if(dspace) { - this->rebin(m_outputW); + m_outputW = rebin(m_outputW); if (m_processLowResTOF) - rebin(m_lowResW); + m_lowResW = rebin(m_lowResW); } doSortEvents(m_outputW); @@ -472,9 +472,9 @@ namespace WorkflowAlgorithms // but it changes the system tests if (dspace && m_resampleX != 0) { - this->rebin(m_outputW); + m_outputW = rebin(m_outputW); if (m_processLowResTOF) - rebin(m_lowResW); + m_lowResW = rebin(m_lowResW); } if (l1 > 0) @@ -584,7 +584,7 @@ namespace WorkflowAlgorithms if (!m_dmaxs.empty()) m_dmaxs.clear(); - this->rebin(m_outputW); + m_outputW = rebin(m_outputW); // return the output workspace setProperty("OutputWorkspace",m_outputW); @@ -655,7 +655,7 @@ namespace WorkflowAlgorithms //---------------------------------------------------------------------------------------------- /** Rebin */ - void AlignAndFocusPowder::rebin(API::MatrixWorkspace_sptr matrixws) + API::MatrixWorkspace_sptr AlignAndFocusPowder::rebin(API::MatrixWorkspace_sptr matrixws) { if (m_resampleX != 0) { @@ -684,6 +684,7 @@ namespace WorkflowAlgorithms alg->setProperty("LogBinning", (m_resampleX < 0)); alg->executeAsChildAlg(); matrixws = alg->getProperty("OutputWorkspace"); + return matrixws; } else { @@ -697,6 +698,7 @@ namespace WorkflowAlgorithms rebin3Alg->setProperty("Params",m_params); rebin3Alg->executeAsChildAlg(); matrixws = rebin3Alg->getProperty("OutputWorkspace"); + return matrixws; } } -- GitLab