Skip to content
Snippets Groups Projects
Commit 6e875d82 authored by Federico Montesino Pouzols's avatar Federico Montesino Pouzols Committed by GitHub
Browse files

Merge pull request #16640 from mantidproject/16007_Ungroup_Elwin_output

Indirect Data Analysis - Ungroup Elwin output option
parents be0b3cc5 45b55f97
No related branches found
No related tags found
No related merge requests found
...@@ -30,6 +30,7 @@ private slots: ...@@ -30,6 +30,7 @@ private slots:
void minChanged(double val); void minChanged(double val);
void maxChanged(double val); void maxChanged(double val);
void updateRS(QtProperty *prop, double val); void updateRS(QtProperty *prop, double val);
void unGroupInput(bool error);
private: private:
void addSaveAlgorithm(QString workspaceName, QString filename = ""); void addSaveAlgorithm(QString workspaceName, QString filename = "");
......
...@@ -45,6 +45,16 @@ ...@@ -45,6 +45,16 @@
</property> </property>
</widget> </widget>
</item> </item>
<item>
<widget class="QCheckBox" name="ckGroupInput">
<property name="text">
<string>Group Input</string>
</property>
<property name="checked">
<bool>true</bool>
</property>
</widget>
</item>
</layout> </layout>
</widget> </widget>
</item> </item>
......
...@@ -201,12 +201,31 @@ void Elwin::run() { ...@@ -201,12 +201,31 @@ void Elwin::run() {
addSaveAlgorithm(eltWorkspace); addSaveAlgorithm(eltWorkspace);
} }
connect(m_batchAlgoRunner, SIGNAL(batchComplete(bool)), this,
SLOT(unGroupInput(bool)));
m_batchAlgoRunner->executeBatchAsync(); m_batchAlgoRunner->executeBatchAsync();
// Set the result workspace for Python script export // Set the result workspace for Python script export
m_pythonExportWsName = qSquaredWorkspace.toStdString(); m_pythonExportWsName = qSquaredWorkspace.toStdString();
} }
/**
* Ungroups the output after the execution of the algorithm
*/
void Elwin::unGroupInput(bool error) {
disconnect(m_batchAlgoRunner, SIGNAL(batchComplete(bool)), this,
SLOT(unGroupInput(bool)));
if (error)
return;
if (!m_uiForm.ckGroupInput->isChecked()) {
IAlgorithm_sptr ungroupAlg =
AlgorithmManager::Instance().create("UnGroupWorkspace");
ungroupAlg->initialize();
ungroupAlg->setProperty("InputWorkspace", "IDA_Elwin_Input");
ungroupAlg->execute();
}
}
/** /**
* Configures and adds a SaveNexus algorithm to the batch runner. * Configures and adds a SaveNexus algorithm to the batch runner.
* *
...@@ -385,14 +404,8 @@ void Elwin::plotInput() { ...@@ -385,14 +404,8 @@ void Elwin::plotInput() {
try { try {
QPair<double, double> range = m_uiForm.ppPlot->getCurveRange("Sample"); QPair<double, double> range = m_uiForm.ppPlot->getCurveRange("Sample");
// Set maximum range of Integration
m_uiForm.ppPlot->getRangeSelector("ElwinIntegrationRange") m_uiForm.ppPlot->getRangeSelector("ElwinIntegrationRange")
->setRange(range.first, range.second); ->setRange(range.first, range.second);
// Set initial values
m_uiForm.ppPlot->getRangeSelector("ElwinIntegrationRange")
->setMinimum(range.first);
m_uiForm.ppPlot->getRangeSelector("ElwinIntegrationRange")
->setMaximum(range.second);
} catch (std::invalid_argument &exc) { } catch (std::invalid_argument &exc) {
showMessageBox(exc.what()); showMessageBox(exc.what());
} }
......
...@@ -16,6 +16,11 @@ Algorithms ...@@ -16,6 +16,11 @@ Algorithms
Data Analysis Data Analysis
############# #############
Elwin
~~~~~
- Additional option to ungroup Elwin output
Jump Fit Jump Fit
~~~~~~~~ ~~~~~~~~
......
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