Skip to content

Commit

Permalink
Refs #7553 preserveEvents=False agrees with True
Browse files Browse the repository at this point in the history
(cherry picked from commit e6148fd)
  • Loading branch information
Vickie Lynch authored and stuartcampbell committed Aug 12, 2013
1 parent 1c8a597 commit 78016a0
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 9 deletions.
2 changes: 1 addition & 1 deletion Code/Mantid/Framework/Algorithms/src/ResampleX.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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");
Expand Down Expand Up @@ -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);
Expand All @@ -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)
Expand Down Expand Up @@ -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);
Expand Down Expand Up @@ -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)
{
Expand Down Expand Up @@ -684,6 +684,7 @@ namespace WorkflowAlgorithms
alg->setProperty("LogBinning", (m_resampleX < 0));
alg->executeAsChildAlg();
matrixws = alg->getProperty("OutputWorkspace");
return matrixws;
}
else
{
Expand All @@ -697,6 +698,7 @@ namespace WorkflowAlgorithms
rebin3Alg->setProperty("Params",m_params);
rebin3Alg->executeAsChildAlg();
matrixws = rebin3Alg->getProperty("OutputWorkspace");
return matrixws;
}
}

Expand Down

0 comments on commit 78016a0

Please sign in to comment.