Skip to content

Commit

Permalink
Initial addition of Symmetrise tab
Browse files Browse the repository at this point in the history
Refs #7860
  • Loading branch information
DanNixon committed Aug 19, 2014
1 parent 95b576f commit d4290a1
Show file tree
Hide file tree
Showing 7 changed files with 332 additions and 32 deletions.
Expand Up @@ -13,10 +13,10 @@ class Symmetrise(PythonAlgorithm):
def category(self):
return "Workflow\\MIDAS;PythonAlgorithms"

def PyInit(self):
self.setOptionalMessage("Takes an asymmetric S(Q,w) and makes it symmetric")
self.setWikiSummary("Takes an asymmetric S(Q,w) and makes it symmetric")
def summary(self):
return "Takes an asymmetric S(Q,w) and makes it symmetric"

def PyInit(self):
self.declareProperty(WorkspaceProperty("Sample", "", Direction.Input),
doc='Sample to run with')
self.declareProperty('XCut', 0.0, doc='X cut off value')
Expand Down
31 changes: 17 additions & 14 deletions Code/Mantid/MantidQt/CustomInterfaces/CMakeLists.txt
Expand Up @@ -4,7 +4,7 @@ set ( SRC_FILES
src/ConvFit.cpp
src/CreateMDWorkspace.cpp
src/CreateMDWorkspaceAlgDialog.cpp
src/DirectConvertToEnergy.cpp
src/DirectConvertToEnergy.cpp
src/Elwin.cpp
src/EventNexusFileMemento.cpp
src/Fury.cpp
Expand All @@ -13,12 +13,12 @@ set ( SRC_FILES
src/IDATab.cpp
src/IndirectBayes.cpp
src/IndirectBayesTab.cpp
src/IndirectCalibration.cpp
src/IndirectConvertToEnergy.cpp
src/IndirectCalibration.cpp
src/IndirectConvertToEnergy.cpp
src/IndirectDataAnalysis.cpp
src/IndirectDataReduction.cpp
src/IndirectDataReductionTab.cpp
src/IndirectDiagnostics.cpp
src/IndirectDataReduction.cpp
src/IndirectDataReductionTab.cpp
src/IndirectDiagnostics.cpp
src/IndirectDiffractionReduction.cpp
src/IndirectLoadAscii.cpp
src/IndirectLoadAsciiTab.cpp
Expand All @@ -27,8 +27,9 @@ set ( SRC_FILES
src/IndirectNeutron.cpp
src/IndirectSimulation.cpp
src/IndirectSimulationTab.cpp
src/IndirectSqw.cpp
src/IndirectTransmission.cpp
src/IndirectSqw.cpp
src/IndirectSymmetrise.cpp
src/IndirectTransmission.cpp
src/JumpFit.cpp
src/MSDFit.cpp
src/MantidEV.cpp
Expand Down Expand Up @@ -75,7 +76,7 @@ set ( INC_FILES
inc/MantidQtCustomInterfaces/ConvFit.h
inc/MantidQtCustomInterfaces/CreateMDWorkspace.h
inc/MantidQtCustomInterfaces/CreateMDWorkspaceAlgDialog.h
inc/MantidQtCustomInterfaces/DirectConvertToEnergy.h
inc/MantidQtCustomInterfaces/DirectConvertToEnergy.h
inc/MantidQtCustomInterfaces/DllConfig.h
inc/MantidQtCustomInterfaces/Elwin.h
inc/MantidQtCustomInterfaces/EventNexusFileMemento.h
Expand All @@ -85,11 +86,11 @@ set ( INC_FILES
inc/MantidQtCustomInterfaces/IDATab.h
inc/MantidQtCustomInterfaces/IndirectBayes.h
inc/MantidQtCustomInterfaces/IndirectBayesTab.h
inc/MantidQtCustomInterfaces/IndirectCalibration.h
inc/MantidQtCustomInterfaces/IndirectConvertToEnergy.h
inc/MantidQtCustomInterfaces/IndirectCalibration.h
inc/MantidQtCustomInterfaces/IndirectConvertToEnergy.h
inc/MantidQtCustomInterfaces/IndirectDataAnalysis.h
inc/MantidQtCustomInterfaces/IndirectDataReduction.h
inc/MantidQtCustomInterfaces/IndirectDataReductionTab.h
inc/MantidQtCustomInterfaces/IndirectDataReduction.h
inc/MantidQtCustomInterfaces/IndirectDataReductionTab.h
inc/MantidQtCustomInterfaces/IndirectDiagnostics.h
inc/MantidQtCustomInterfaces/IndirectDiffractionReduction.h
inc/MantidQtCustomInterfaces/IndirectLoadAscii.h
Expand All @@ -100,7 +101,8 @@ set ( INC_FILES
inc/MantidQtCustomInterfaces/IndirectSimulation.h
inc/MantidQtCustomInterfaces/IndirectSimulationTab.h
inc/MantidQtCustomInterfaces/IndirectSqw.h
inc/MantidQtCustomInterfaces/IndirectTransmission.h
inc/MantidQtCustomInterfaces/IndirectSymmetrise.h
inc/MantidQtCustomInterfaces/IndirectTransmission.h
inc/MantidQtCustomInterfaces/JumpFit.h
inc/MantidQtCustomInterfaces/MSDFit.h
inc/MantidQtCustomInterfaces/MantidEV.h
Expand Down Expand Up @@ -175,6 +177,7 @@ set ( MOC_FILES inc/MantidQtCustomInterfaces/Background.h
inc/MantidQtCustomInterfaces/IndirectSimulation.h
inc/MantidQtCustomInterfaces/IndirectSimulationTab.h
inc/MantidQtCustomInterfaces/IndirectSqw.h
inc/MantidQtCustomInterfaces/IndirectSymmetrise.h
inc/MantidQtCustomInterfaces/IndirectTransmission.h
inc/MantidQtCustomInterfaces/JumpFit.h
inc/MantidQtCustomInterfaces/MSDFit.h
Expand Down
Expand Up @@ -113,6 +113,7 @@ namespace MantidQt
IndirectDataReductionTab* m_tab_calibration;
IndirectDataReductionTab* m_tab_trans;
IndirectDataReductionTab* m_tab_moments;
IndirectDataReductionTab* m_tab_symmetrise;

Poco::NObserver<IndirectDataReduction, Mantid::Kernel::ConfigValChangeNotification> m_changeObserver; ///< Poco observer for changes in user directory settings
QString m_dataDir; ///< default data search directory
Expand Down
Expand Up @@ -6,7 +6,7 @@
<rect>
<x>0</x>
<y>0</y>
<width>621</width>
<width>672</width>
<height>761</height>
</rect>
</property>
Expand Down Expand Up @@ -1513,16 +1513,12 @@ Later steps in the process (saving, renaming) will not be done.</string>
<property name="title">
<string>Time Slice</string>
</property>
<layout class="QVBoxLayout" name="verticalLayout_26">
<layout class="QHBoxLayout" name="horizontalLayout_2">
<item>
<layout class="QHBoxLayout" name="loTimeSlice">
<item>
<layout class="QVBoxLayout" name="slice_properties"/>
</item>
<item>
<layout class="QHBoxLayout" name="slice_plot"/>
</item>
</layout>
<layout class="QVBoxLayout" name="slice_properties"/>
</item>
<item>
<layout class="QHBoxLayout" name="slice_plot"/>
</item>
</layout>
</widget>
Expand Down Expand Up @@ -1739,6 +1735,128 @@ Later steps in the process (saving, renaming) will not be done.</string>
</item>
</layout>
</widget>
<widget class="QWidget" name="tabSymmertrise">
<attribute name="title">
<string>Symmetrise</string>
</attribute>
<layout class="QVBoxLayout" name="verticalLayout_15">
<item>
<widget class="QGroupBox" name="gbSymmInput">
<property name="title">
<string>Input</string>
</property>
<layout class="QVBoxLayout" name="verticalLayout_21">
<item>
<widget class="MantidQt::MantidWidgets::DataSelector" name="symm_dsInput" native="true">
<property name="sizePolicy">
<sizepolicy hsizetype="Minimum" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="showLoad" stdset="0">
<bool>false</bool>
</property>
</widget>
</item>
</layout>
</widget>
</item>
<item>
<widget class="QGroupBox" name="symm_gbOptions">
<property name="title">
<string>Symmetrise</string>
</property>
<layout class="QHBoxLayout" name="horizontalLayout_3">
<property name="topMargin">
<number>6</number>
</property>
<item>
<layout class="QVBoxLayout" name="symm_properties"/>
</item>
<item>
<layout class="QVBoxLayout" name="symm_plot"/>
</item>
</layout>
</widget>
</item>
<item>
<spacer name="vsSymm">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>40</height>
</size>
</property>
</spacer>
</item>
<item>
<widget class="QGroupBox" name="gbSymmOutput">
<property name="title">
<string>Output</string>
</property>
<layout class="QHBoxLayout" name="horizontalLayout">
<property name="margin">
<number>6</number>
</property>
<item>
<widget class="QCheckBox" name="symm_ckVerbose">
<property name="enabled">
<bool>true</bool>
</property>
<property name="text">
<string>Verbose</string>
</property>
</widget>
</item>
<item>
<spacer name="horizontalSpacer_24">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>165</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
<item>
<widget class="QCheckBox" name="symm_ckPlot">
<property name="text">
<string>Plot Result</string>
</property>
</widget>
</item>
<item>
<spacer name="horizontalSpacer_22">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>164</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
<item>
<widget class="QCheckBox" name="symm_ckSave">
<property name="text">
<string>Save Result</string>
</property>
</widget>
</item>
</layout>
</widget>
</item>
</layout>
</widget>
<widget class="QWidget" name="tabSofQW">
<attribute name="title">
<string>S(Q, w)</string>
Expand Down
@@ -0,0 +1,76 @@
#ifndef MANTIDQTCUSTOMINTERFACES_INDIRECTSYMMETRISE_H_
#define MANTIDQTCUSTOMINTERFACES_INDIRECTSYMMETRISE_H_

#include "MantidQtCustomInterfaces/IndirectDataReductionTab.h"

#include "MantidAPI/MatrixWorkspace.h"
#include "MantidKernel/System.h"

// Suppress a warning coming out of code that isn't ours
#if defined(__INTEL_COMPILER)
#pragma warning disable 1125
#elif defined(__GNUC__)
#if (__GNUC__ >= 4 && __GNUC_MINOR__ >= 6 )
#pragma GCC diagnostic push
#endif
#pragma GCC diagnostic ignored "-Woverloaded-virtual"
#endif
#include <QtCheckBoxFactory>
#if defined(__INTEL_COMPILER)
#pragma warning enable 1125
#elif defined(__GNUC__)
#if (__GNUC__ >= 4 && __GNUC_MINOR__ >= 6 )
#pragma GCC diagnostic pop
#endif
#endif

namespace MantidQt
{
namespace CustomInterfaces
{
/** IndirectSymmetrise
@author Dan Nixon
@date 23/07/2014
Copyright &copy; 2013 ISIS Rutherford Appleton Laboratory & NScD Oak Ridge National Laboratory
This file is part of Mantid.
Mantid is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 3 of the License, or
(at your option) any later version.
Mantid is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
File change history is stored at: <https://github.com/mantidproject/mantid>
Code Documentation is available at: <http://doxygen.mantidproject.org>
*/
class DLLExport IndirectSymmetrise : public IndirectDataReductionTab
{
Q_OBJECT

public:
IndirectSymmetrise(Ui::IndirectDataReduction& uiForm, QWidget * parent = 0);
virtual ~IndirectSymmetrise();

virtual void setup();
virtual void run();
virtual bool validate();

private slots:
void plotRawInput();
void updateRangeSelector(QtProperty *prop, double value);

};
} // namespace CustomInterfaces
} // namespace Mantid

#endif //MANTIDQTCUSTOMINTERFACES_INDIRECTSYMMETRISE_H_

0 comments on commit d4290a1

Please sign in to comment.