Skip to content

Commit

Permalink
Refs #10301 Scale IvsQ workspaces using scale column
Browse files Browse the repository at this point in the history
  • Loading branch information
Harry Jeffery committed Oct 16, 2014
1 parent 591827c commit 57ba427
Showing 1 changed file with 14 additions and 0 deletions.
Expand Up @@ -362,6 +362,20 @@ namespace MantidQt
if(!algReflOne->isExecuted())
throw std::runtime_error("Failed to run ReflectometryReductionOneAuto.");

const double scale = m_model->Double(rowNo, COL_SCALE);
if(scale != 1.0)
{
IAlgorithm_sptr algScale = AlgorithmManager::Instance().create("Scale");
algScale->initialize();
algScale->setProperty("InputWorkspace", "IvsQ_" + runNo);
algScale->setProperty("OutputWorkspace", "IvsQ_" + runNo);
algScale->setProperty("Factor", 1.0 / scale);
algScale->execute();

if(!algScale->isExecuted())
throw std::runtime_error("Failed to run Scale algorithm");
}

//Processing has completed. Put Qmin and Qmax into the table if needed, for stitching.
if(m_model->String(rowNo, COL_QMIN).empty() || m_model->String(rowNo, COL_QMAX).empty())
{
Expand Down

0 comments on commit 57ba427

Please sign in to comment.