Skip to content
Snippets Groups Projects
Commit 051b744c authored by Elliot Oram's avatar Elliot Oram
Browse files

Relocation RebinToWorkspace algorithm

Refs #13993
parent 0869969b
No related branches found
No related tags found
No related merge requests found
...@@ -248,7 +248,7 @@ class ApplyPaalmanPingsCorrection(PythonAlgorithm): ...@@ -248,7 +248,7 @@ class ApplyPaalmanPingsCorrection(PythonAlgorithm):
""" """
logger.information('Rebining can to ensure Minus') logger.information('Rebining container to ensure Minus')
RebinToWorkspace(WorkspaceToRebin=self._can_ws_name, RebinToWorkspace(WorkspaceToRebin=self._can_ws_name,
WorkspaceToMatch=self._sample_ws_name, WorkspaceToMatch=self._sample_ws_name,
OutputWorkspace=self._can_ws_name) OutputWorkspace=self._can_ws_name)
......
...@@ -59,13 +59,6 @@ void ContainerSubtraction::run() { ...@@ -59,13 +59,6 @@ void ContainerSubtraction::run() {
scaleX->setProperty("Factor", m_uiForm.spShift->value()); scaleX->setProperty("Factor", m_uiForm.spShift->value());
scaleX->setProperty("Operation", "Add"); scaleX->setProperty("Operation", "Add");
scaleX->execute(); scaleX->execute();
IAlgorithm_sptr rebinAlg =
AlgorithmManager::Instance().create("RebinToWorkspace");
rebinAlg->initialize();
rebinAlg->setProperty("WorkspaceToRebin", canWs);
rebinAlg->setProperty("WorkspaceToMatch", sampleWs);
rebinAlg->setProperty("OutputWorkspace", canWsName.toStdString());
rebinAlg->execute();
} }
// If not in wavelength then do conversion // If not in wavelength then do conversion
...@@ -93,7 +86,15 @@ void ContainerSubtraction::run() { ...@@ -93,7 +86,15 @@ void ContainerSubtraction::run() {
QMessageBox::Yes, QMessageBox::No, QMessageBox::Yes, QMessageBox::No,
QMessageBox::NoButton); QMessageBox::NoButton);
if (result != QMessageBox::Yes) { if (result == QMessageBox::Yes) {
IAlgorithm_sptr rebinAlg =
AlgorithmManager::Instance().create("RebinToWorkspace");
rebinAlg->initialize();
rebinAlg->setProperty("WorkspaceToRebin", canWs);
rebinAlg->setProperty("WorkspaceToMatch", sampleWs);
rebinAlg->setProperty("OutputWorkspace", canWsName.toStdString());
rebinAlg->execute();
} else {
m_batchAlgoRunner->clearQueue(); m_batchAlgoRunner->clearQueue();
g_log.error("Cannot apply absorption corrections using a sample and " g_log.error("Cannot apply absorption corrections using a sample and "
"container with different binning."); "container with different binning.");
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment