diff --git a/MantidQt/CustomInterfaces/inc/MantidQtCustomInterfaces/Indirect/Elwin.h b/MantidQt/CustomInterfaces/inc/MantidQtCustomInterfaces/Indirect/Elwin.h index 93cce53e5b2f0646353af70464380630b64654bd..ca203d47165c6d5592156d8b931ea3d294faa4d3 100644 --- a/MantidQt/CustomInterfaces/inc/MantidQtCustomInterfaces/Indirect/Elwin.h +++ b/MantidQt/CustomInterfaces/inc/MantidQtCustomInterfaces/Indirect/Elwin.h @@ -30,6 +30,7 @@ private slots: void minChanged(double val); void maxChanged(double val); void updateRS(QtProperty *prop, double val); + void unGroupInput(bool error); private: void addSaveAlgorithm(QString workspaceName, QString filename = ""); diff --git a/MantidQt/CustomInterfaces/inc/MantidQtCustomInterfaces/Indirect/Elwin.ui b/MantidQt/CustomInterfaces/inc/MantidQtCustomInterfaces/Indirect/Elwin.ui index af30980cac5e5d295e41cb0812e9f83ad3494b05..80b8d69a4b51d93eeb6a336d6d44add03a48c839 100644 --- a/MantidQt/CustomInterfaces/inc/MantidQtCustomInterfaces/Indirect/Elwin.ui +++ b/MantidQt/CustomInterfaces/inc/MantidQtCustomInterfaces/Indirect/Elwin.ui @@ -45,6 +45,16 @@ </property> </widget> </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> </widget> </item> diff --git a/MantidQt/CustomInterfaces/src/Indirect/Elwin.cpp b/MantidQt/CustomInterfaces/src/Indirect/Elwin.cpp index 4ed79ce1a2ffcdc112f390a7f6baca3b5e21f7a6..8af559cceb72914714448052bc3f8d3a405a53b4 100644 --- a/MantidQt/CustomInterfaces/src/Indirect/Elwin.cpp +++ b/MantidQt/CustomInterfaces/src/Indirect/Elwin.cpp @@ -201,12 +201,31 @@ void Elwin::run() { addSaveAlgorithm(eltWorkspace); } + connect(m_batchAlgoRunner, SIGNAL(batchComplete(bool)), this, + SLOT(unGroupInput(bool))); m_batchAlgoRunner->executeBatchAsync(); // Set the result workspace for Python script export 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. * @@ -385,14 +404,8 @@ void Elwin::plotInput() { try { QPair<double, double> range = m_uiForm.ppPlot->getCurveRange("Sample"); - // Set maximum range of Integration m_uiForm.ppPlot->getRangeSelector("ElwinIntegrationRange") ->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) { showMessageBox(exc.what()); } diff --git a/docs/source/release/v3.8.0/indirect_inelastic.rst b/docs/source/release/v3.8.0/indirect_inelastic.rst index 41571437a9e5a2be653cecc695779969885ec3ce..ec367b1f38f4b248b61c20de8c43c392abf5a39f 100644 --- a/docs/source/release/v3.8.0/indirect_inelastic.rst +++ b/docs/source/release/v3.8.0/indirect_inelastic.rst @@ -16,6 +16,11 @@ Algorithms Data Analysis ############# +Elwin +~~~~~ + +- Additional option to ungroup Elwin output + Jump Fit ~~~~~~~~