diff --git a/Code/Mantid/scripts/Interface/reduction_gui/reduction/inelastic/dgs_diagnose_detectors_script.py b/Code/Mantid/scripts/Interface/reduction_gui/reduction/inelastic/dgs_diagnose_detectors_script.py index dd118a506c7fa022b81493b3855328ed3e35aee4..8a874f3840210e3202e403e0e15554b1df23f328 100644 --- a/Code/Mantid/scripts/Interface/reduction_gui/reduction/inelastic/dgs_diagnose_detectors_script.py +++ b/Code/Mantid/scripts/Interface/reduction_gui/reduction/inelastic/dgs_diagnose_detectors_script.py @@ -14,6 +14,8 @@ class DiagnoseDetectorsScript(BaseScriptElement): output_mask_file = '' high_counts = 1.0e+10 low_counts = 1.0e-10 + median_test_out_high = 100 + median_test_out_low = 0.01 median_test_high = 3 median_test_low = 0.1 errorbar_criterion = 0.0 @@ -30,10 +32,33 @@ class DiagnoseDetectorsScript(BaseScriptElement): max_framerate = '' ignored_pixels = '' - def __init__(self): + def __init__(self, inst_name): super(DiagnoseDetectorsScript, self).__init__() + self.set_default_pars(inst_name) self.reset() + def set_default_pars(self, inst_name): + import dgs_utils + ip = dgs_utils.InstrumentParameters(inst_name) + DiagnoseDetectorsScript.high_counts = ip.get_parameter("diag_huge") + DiagnoseDetectorsScript.low_counts = ip.get_parameter("diag_tiny") + DiagnoseDetectorsScript.median_test_out_high = ip.get_parameter("diag_van_out_hi") + DiagnoseDetectorsScript.median_test_out_low = ip.get_parameter("diag_van_out_lo") + DiagnoseDetectorsScript.median_test_high = ip.get_parameter("diag_van_hi") + DiagnoseDetectorsScript.median_test_low = ip.get_parameter("diag_van_lo") + DiagnoseDetectorsScript.errorbar_criterion = ip.get_parameter("diag_van_sig") + DiagnoseDetectorsScript.detvan_ratio_var = ip.get_parameter("diag_variation") + DiagnoseDetectorsScript.background_check = ip.get_bool_param("check_background") + DiagnoseDetectorsScript.sambkg_median_test_high = ip.get_parameter("diag_samp_hi") + DiagnoseDetectorsScript.sambkg_median_test_low = ip.get_parameter("diag_samp_lo") + DiagnoseDetectorsScript.sambkg_errorbar_criterion = ip.get_parameter("diag_samp_sig") + DiagnoseDetectorsScript.tof_start = ip.get_parameter("bkgd-range-min") + DiagnoseDetectorsScript.tof_end = ip.get_parameter("bkgd-range-max") + DiagnoseDetectorsScript.reject_zero_bkg = ip.get_bool_param("diag_samp_zero") + DiagnoseDetectorsScript.psd_bleed = ip.get_bool_param("diag_bleed_test") + DiagnoseDetectorsScript.max_framerate = ip.get_parameter("diag_bleed_maxrate") + DiagnoseDetectorsScript.ignored_pixels = ip.get_parameter("diag_bleed_pixels") + def to_script(self): script = "" if self.output_mask_file != DiagnoseDetectorsScript.output_mask_file: @@ -42,6 +67,10 @@ class DiagnoseDetectorsScript(BaseScriptElement): script += "HighCounts=%s,\n" % str(self.high_counts) if self.low_counts != DiagnoseDetectorsScript.low_counts: script += "LowCounts=%s,\n" % str(self.low_counts) + if self.median_test_out_low != DiagnoseDetectorsScript.median_test_out_low: + script += "LowOutlier=%s,\n" %str(self.median_test_out_low) + if self.median_test_out_high != DiagnoseDetectorsScript.median_test_out_high: + script += "HighOutlier=%s,\n" %str(self.median_test_out_high) if self.median_test_high != DiagnoseDetectorsScript.median_test_high: script += "MedianTestHigh=%s,\n" % str(self.median_test_high) if self.median_test_low != DiagnoseDetectorsScript.median_test_low: @@ -82,6 +111,8 @@ class DiagnoseDetectorsScript(BaseScriptElement): xml += " <output_mask_file>%s</output_mask_file>\n" % self.output_mask_file xml += " <high_counts>%s</high_counts>\n" % str(self.high_counts) xml += " <low_counts>%s</low_counts>\n" % str(self.low_counts) + xml += " <median_test_outlier_low>%s</median_test_outlier_low>\n" % str(self.median_test_out_low) + xml += " <median_test_outlier_high>%s</median_test_outlier_high>\n" % str(self.median_test_out_high) xml += " <median_test_low>%s</median_test_low>\n" % str(self.median_test_low) xml += " <median_test_high>%s</median_test_high>\n" % str(self.median_test_high) xml += " <errorbar_criterion>%s</errorbar_criterion>\n" % str(self.errorbar_criterion) @@ -118,6 +149,12 @@ class DiagnoseDetectorsScript(BaseScriptElement): self.low_counts = BaseScriptElement.getFloatElement(instrument_dom, "low_counts", default=DiagnoseDetectorsScript.low_counts) + self.median_test_out_low = BaseScriptElement.getFloatElement(instrument_dom, + "median_test_out_low", + default=DiagnoseDetectorsScript.median_test_out_low) + self.median_test_out_high = BaseScriptElement.getFloatElement(instrument_dom, + "median_test_out_high", + default=DiagnoseDetectorsScript.median_test_out_high) self.median_test_low = BaseScriptElement.getFloatElement(instrument_dom, "median_test_low", default=DiagnoseDetectorsScript.median_test_low) @@ -171,6 +208,8 @@ class DiagnoseDetectorsScript(BaseScriptElement): self.output_mask_file = DiagnoseDetectorsScript.output_mask_file self.high_counts = DiagnoseDetectorsScript.high_counts self.low_counts = DiagnoseDetectorsScript.low_counts + self.median_test_out_low = DiagnoseDetectorsScript.median_test_out_low + self.median_test_out_high = DiagnoseDetectorsScript.median_test_out_high self.median_test_low = DiagnoseDetectorsScript.median_test_low self.median_test_high = DiagnoseDetectorsScript.median_test_high self.errorbar_criterion = DiagnoseDetectorsScript.errorbar_criterion diff --git a/Code/Mantid/scripts/Interface/reduction_gui/reduction/inelastic/dgs_utils.py b/Code/Mantid/scripts/Interface/reduction_gui/reduction/inelastic/dgs_utils.py new file mode 100644 index 0000000000000000000000000000000000000000..cc76471c1b627fab47694028bfc3e6a0340ed875 --- /dev/null +++ b/Code/Mantid/scripts/Interface/reduction_gui/reduction/inelastic/dgs_utils.py @@ -0,0 +1,66 @@ +# Forced to use version 1 API. +IS_IN_MANTIDPLOT = False +try: + import mantidplot + from MantidFramework import * + mtd.initialise(False) + from mantidsimple import * + import mantidplot + + IS_IN_MANTIDPLOT = True +except: + pass + +import os + +class InstrumentParameters(object): + instrument_name = None + _instrument = None + + def __init__(self, inst_name): + if self.instrument_name is None: + self._load_param_file(inst_name) + else: + if self.instrument_name != inst_name: + self._load_param_file(inst_name) + + def _load_param_file(self, inst_name): + InstrumentParameters.instrument_name = inst_name + ws_name = "__emptyInst_" + inst_name + if IS_IN_MANTIDPLOT: + idf_loc = ConfigService().getInstrumentDirectory() + idf_pattern = os.path.join(idf_loc, "%s*_Definition.xml") % inst_name + import glob + idf_files = glob.glob(idf_pattern) + output = LoadEmptyInstrument(Filename=idf_files[0], + OutputWorkspace=ws_name) + InstrumentParameters._instrument = output.workspace().getInstrument() + + def _self_check(self): + if self._instrument is None: + raise ValueError("Instrument was not loaded, cannot retrieve parameters.") + + def get_parameter(self, parname): + default = '' + try: + self._self_check() + except ValueError: + return default + values = self._instrument.getNumberParameter(parname) + try: + return values[0] + except IndexError: + return default + + def get_bool_param(self, parname): + default = False + try: + self._self_check() + except ValueError: + return default + values = self._instrument.getNumberParameter(parname) + try: + return bool(values[0]) + except IndexError: + return default + \ No newline at end of file diff --git a/Code/Mantid/scripts/Interface/reduction_gui/widgets/inelastic/dgs_diagnose_detectors.py b/Code/Mantid/scripts/Interface/reduction_gui/widgets/inelastic/dgs_diagnose_detectors.py index fa7fd590efccaa6ce03c20120847c6abb9565143..5b3457b3ad66863d76297b5fce8f791229885beb 100644 --- a/Code/Mantid/scripts/Interface/reduction_gui/widgets/inelastic/dgs_diagnose_detectors.py +++ b/Code/Mantid/scripts/Interface/reduction_gui/widgets/inelastic/dgs_diagnose_detectors.py @@ -23,17 +23,20 @@ class DiagnoseDetectorsWidget(BaseWidget): self._content = DiagDetsFrame(self) self._layout.addWidget(self._content) self.initialize_content() + self._instrument_name = settings.instrument_name if state is not None: self.set_state(state) else: - self.set_state(DiagnoseDetectorsScript()) + self.set_state(DiagnoseDetectorsScript(self._instrument_name)) def initialize_content(self): # Constraints for widget in [ self._content.median_test_high_edit, self._content.median_test_low_edit, + self._content.median_test_out_high_edit, + self._content.median_test_out_low_edit, self._content.errorbar_crit_edit, self._content.ratio_var_crit_edit, self._content.sambkg_median_test_high_edit, @@ -77,6 +80,8 @@ class DiagnoseDetectorsWidget(BaseWidget): self._content.low_counts_edit.setText(QtCore.QString(str(state.low_counts))) self._content.median_test_high_edit.setText(QtCore.QString(str(state.median_test_high))) self._content.median_test_low_edit.setText(QtCore.QString(str(state.median_test_low))) + self._content.median_test_out_high_edit.setText(QtCore.QString(str(state.median_test_out_high))) + self._content.median_test_out_low_edit.setText(QtCore.QString(str(state.median_test_out_low))) self._content.errorbar_crit_edit.setText(QtCore.QString(str(state.errorbar_criterion))) self._content.det_van2_edit.setText(state.det_van2) self._content.ratio_var_crit_edit.setText(QtCore.QString(str(state.detvan_ratio_var))) @@ -88,19 +93,21 @@ class DiagnoseDetectorsWidget(BaseWidget): self._content.tof_end_edit.setText(QtCore.QString(str(state.tof_end))) self._content.reject_zero_bg_cb.setChecked(state.reject_zero_bkg) self._content.psd_bleed_gb.setChecked(state.psd_bleed) - self._content.max_framerate_edit.setText(state.max_framerate) - self._content.ignored_pixels_edit.setText(state.ignored_pixels) + self._content.max_framerate_edit.setText(str(state.max_framerate)) + self._content.ignored_pixels_edit.setText(str(state.ignored_pixels)) def get_state(self): """ Returns an object with the state of the interface """ - d = DiagnoseDetectorsScript() + d = DiagnoseDetectorsScript(self._instrument_name) d.output_mask_file = self._content.output_mask_edit.text() d.high_counts = util._check_and_get_float_line_edit(self._content.high_counts_edit) d.low_counts = util._check_and_get_float_line_edit(self._content.low_counts_edit) d.median_test_high = util._check_and_get_float_line_edit(self._content.median_test_high_edit) d.median_test_low = util._check_and_get_float_line_edit(self._content.median_test_low_edit) + d.median_test_out_high = util._check_and_get_float_line_edit(self._content.median_test_out_high_edit) + d.median_test_out_low = util._check_and_get_float_line_edit(self._content.median_test_out_low_edit) d.errorbar_criterion = util._check_and_get_float_line_edit(self._content.errorbar_crit_edit) d.det_van2 = self._content.det_van2_edit.text() d.detvan_ratio_var = util._check_and_get_float_line_edit(self._content.ratio_var_crit_edit) diff --git a/Code/Mantid/scripts/Interface/ui/inelastic/dgs_diagnose_detectors.ui b/Code/Mantid/scripts/Interface/ui/inelastic/dgs_diagnose_detectors.ui index f99be0fa68be7629e0dfc8e108d142412b29b851..ecb83bd34dae71f3e427698fe81b3597fff334e9 100644 --- a/Code/Mantid/scripts/Interface/ui/inelastic/dgs_diagnose_detectors.ui +++ b/Code/Mantid/scripts/Interface/ui/inelastic/dgs_diagnose_detectors.ui @@ -75,7 +75,7 @@ <widget class="QLabel" name="high_counts_label"> <property name="minimumSize"> <size> - <width>133</width> + <width>137</width> <height>0</height> </size> </property> @@ -98,12 +98,12 @@ <widget class="QLabel" name="low_counts_label"> <property name="minimumSize"> <size> - <width>110</width> + <width>135</width> <height>0</height> </size> </property> <property name="text"> - <string>Low counts</string> + <string> Low counts</string> </property> <property name="alignment"> <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set> @@ -141,7 +141,7 @@ <widget class="QLabel" name="median_test_high_label"> <property name="minimumSize"> <size> - <width>133</width> + <width>137</width> <height>0</height> </size> </property> @@ -169,7 +169,7 @@ </size> </property> <property name="text"> - <string>Median test low</string> + <string> Median test low</string> </property> <property name="alignment"> <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set> @@ -201,6 +201,63 @@ </item> </layout> </item> + <item> + <layout class="QHBoxLayout" name="horizontalLayout_12"> + <item> + <widget class="QLabel" name="median_test_out_high_label"> + <property name="text"> + <string>Median high outliers</string> + </property> + </widget> + </item> + <item> + <widget class="QLineEdit" name="median_test_out_high_edit"> + <property name="sizePolicy"> + <sizepolicy hsizetype="Fixed" vsizetype="Fixed"> + <horstretch>0</horstretch> + <verstretch>0</verstretch> + </sizepolicy> + </property> + </widget> + </item> + <item> + <widget class="QLabel" name="median_test_out_low_label"> + <property name="minimumSize"> + <size> + <width>125</width> + <height>0</height> + </size> + </property> + <property name="text"> + <string> Median low outliers</string> + </property> + </widget> + </item> + <item> + <widget class="QLineEdit" name="median_test_out_low_edit"> + <property name="sizePolicy"> + <sizepolicy hsizetype="Fixed" vsizetype="Fixed"> + <horstretch>0</horstretch> + <verstretch>0</verstretch> + </sizepolicy> + </property> + </widget> + </item> + <item> + <spacer name="horizontalSpacer_12"> + <property name="orientation"> + <enum>Qt::Horizontal</enum> + </property> + <property name="sizeHint" stdset="0"> + <size> + <width>40</width> + <height>20</height> + </size> + </property> + </spacer> + </item> + </layout> + </item> <item> <layout class="QHBoxLayout" name="horizontalLayout_10"> <item> diff --git a/Code/Mantid/scripts/Interface/ui/inelastic/ui_dgs_diagnose_detectors.py b/Code/Mantid/scripts/Interface/ui/inelastic/ui_dgs_diagnose_detectors.py index 1c9d82572edcb02e5c47a961a14d6fc88dfa5ce0..3c5502da03fd656484d530ce57b0fb16b671dda3 100644 --- a/Code/Mantid/scripts/Interface/ui/inelastic/ui_dgs_diagnose_detectors.py +++ b/Code/Mantid/scripts/Interface/ui/inelastic/ui_dgs_diagnose_detectors.py @@ -2,7 +2,7 @@ # Form implementation generated from reading ui file 'ui/inelastic/dgs_diagnose_detectors.ui' # -# Created: Fri Sep 14 14:22:32 2012 +# Created: Wed Oct 3 14:00:39 2012 # by: PyQt4 UI code generator 4.9.1 # # WARNING! All changes made in this file will be lost! @@ -44,7 +44,7 @@ class Ui_DiagDetsFrame(object): self.horizontalLayout_4 = QtGui.QHBoxLayout() self.horizontalLayout_4.setObjectName(_fromUtf8("horizontalLayout_4")) self.high_counts_label = QtGui.QLabel(self.white_beam_tests_gb) - self.high_counts_label.setMinimumSize(QtCore.QSize(133, 0)) + self.high_counts_label.setMinimumSize(QtCore.QSize(137, 0)) self.high_counts_label.setObjectName(_fromUtf8("high_counts_label")) self.horizontalLayout_4.addWidget(self.high_counts_label) self.high_counts_edit = QtGui.QLineEdit(self.white_beam_tests_gb) @@ -56,7 +56,7 @@ class Ui_DiagDetsFrame(object): self.high_counts_edit.setObjectName(_fromUtf8("high_counts_edit")) self.horizontalLayout_4.addWidget(self.high_counts_edit) self.low_counts_label = QtGui.QLabel(self.white_beam_tests_gb) - self.low_counts_label.setMinimumSize(QtCore.QSize(110, 0)) + self.low_counts_label.setMinimumSize(QtCore.QSize(135, 0)) self.low_counts_label.setAlignment(QtCore.Qt.AlignRight|QtCore.Qt.AlignTrailing|QtCore.Qt.AlignVCenter) self.low_counts_label.setObjectName(_fromUtf8("low_counts_label")) self.horizontalLayout_4.addWidget(self.low_counts_label) @@ -74,7 +74,7 @@ class Ui_DiagDetsFrame(object): self.horizontalLayout_5 = QtGui.QHBoxLayout() self.horizontalLayout_5.setObjectName(_fromUtf8("horizontalLayout_5")) self.median_test_high_label = QtGui.QLabel(self.white_beam_tests_gb) - self.median_test_high_label.setMinimumSize(QtCore.QSize(133, 0)) + self.median_test_high_label.setMinimumSize(QtCore.QSize(137, 0)) self.median_test_high_label.setObjectName(_fromUtf8("median_test_high_label")) self.horizontalLayout_5.addWidget(self.median_test_high_label) self.median_test_high_edit = QtGui.QLineEdit(self.white_beam_tests_gb) @@ -101,6 +101,34 @@ class Ui_DiagDetsFrame(object): spacerItem2 = QtGui.QSpacerItem(40, 20, QtGui.QSizePolicy.Expanding, QtGui.QSizePolicy.Minimum) self.horizontalLayout_5.addItem(spacerItem2) self.verticalLayout.addLayout(self.horizontalLayout_5) + self.horizontalLayout_12 = QtGui.QHBoxLayout() + self.horizontalLayout_12.setObjectName(_fromUtf8("horizontalLayout_12")) + self.median_test_out_high_label = QtGui.QLabel(self.white_beam_tests_gb) + self.median_test_out_high_label.setObjectName(_fromUtf8("median_test_out_high_label")) + self.horizontalLayout_12.addWidget(self.median_test_out_high_label) + self.median_test_out_high_edit = QtGui.QLineEdit(self.white_beam_tests_gb) + sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Fixed, QtGui.QSizePolicy.Fixed) + sizePolicy.setHorizontalStretch(0) + sizePolicy.setVerticalStretch(0) + sizePolicy.setHeightForWidth(self.median_test_out_high_edit.sizePolicy().hasHeightForWidth()) + self.median_test_out_high_edit.setSizePolicy(sizePolicy) + self.median_test_out_high_edit.setObjectName(_fromUtf8("median_test_out_high_edit")) + self.horizontalLayout_12.addWidget(self.median_test_out_high_edit) + self.median_test_out_low_label = QtGui.QLabel(self.white_beam_tests_gb) + self.median_test_out_low_label.setMinimumSize(QtCore.QSize(125, 0)) + self.median_test_out_low_label.setObjectName(_fromUtf8("median_test_out_low_label")) + self.horizontalLayout_12.addWidget(self.median_test_out_low_label) + self.median_test_out_low_edit = QtGui.QLineEdit(self.white_beam_tests_gb) + sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Fixed, QtGui.QSizePolicy.Fixed) + sizePolicy.setHorizontalStretch(0) + sizePolicy.setVerticalStretch(0) + sizePolicy.setHeightForWidth(self.median_test_out_low_edit.sizePolicy().hasHeightForWidth()) + self.median_test_out_low_edit.setSizePolicy(sizePolicy) + self.median_test_out_low_edit.setObjectName(_fromUtf8("median_test_out_low_edit")) + self.horizontalLayout_12.addWidget(self.median_test_out_low_edit) + spacerItem3 = QtGui.QSpacerItem(40, 20, QtGui.QSizePolicy.Expanding, QtGui.QSizePolicy.Minimum) + self.horizontalLayout_12.addItem(spacerItem3) + self.verticalLayout.addLayout(self.horizontalLayout_12) self.horizontalLayout_10 = QtGui.QHBoxLayout() self.horizontalLayout_10.setObjectName(_fromUtf8("horizontalLayout_10")) self.errorbar_crit_label = QtGui.QLabel(self.white_beam_tests_gb) @@ -115,8 +143,8 @@ class Ui_DiagDetsFrame(object): self.errorbar_crit_edit.setSizePolicy(sizePolicy) self.errorbar_crit_edit.setObjectName(_fromUtf8("errorbar_crit_edit")) self.horizontalLayout_10.addWidget(self.errorbar_crit_edit) - spacerItem3 = QtGui.QSpacerItem(40, 20, QtGui.QSizePolicy.Expanding, QtGui.QSizePolicy.Minimum) - self.horizontalLayout_10.addItem(spacerItem3) + spacerItem4 = QtGui.QSpacerItem(40, 20, QtGui.QSizePolicy.Expanding, QtGui.QSizePolicy.Minimum) + self.horizontalLayout_10.addItem(spacerItem4) self.verticalLayout.addLayout(self.horizontalLayout_10) self.verticalLayout_4.addWidget(self.white_beam_tests_gb) self.eff_var_test_gb = QtGui.QGroupBox(DiagDetsFrame) @@ -135,8 +163,8 @@ class Ui_DiagDetsFrame(object): self.det_van2_browse = QtGui.QPushButton(self.eff_var_test_gb) self.det_van2_browse.setObjectName(_fromUtf8("det_van2_browse")) self.horizontalLayout_6.addWidget(self.det_van2_browse) - spacerItem4 = QtGui.QSpacerItem(31, 20, QtGui.QSizePolicy.Fixed, QtGui.QSizePolicy.Minimum) - self.horizontalLayout_6.addItem(spacerItem4) + spacerItem5 = QtGui.QSpacerItem(31, 20, QtGui.QSizePolicy.Fixed, QtGui.QSizePolicy.Minimum) + self.horizontalLayout_6.addItem(spacerItem5) self.verticalLayout_3.addLayout(self.horizontalLayout_6) self.horizontalLayout_7 = QtGui.QHBoxLayout() self.horizontalLayout_7.setObjectName(_fromUtf8("horizontalLayout_7")) @@ -152,8 +180,8 @@ class Ui_DiagDetsFrame(object): self.ratio_var_crit_edit.setSizePolicy(sizePolicy) self.ratio_var_crit_edit.setObjectName(_fromUtf8("ratio_var_crit_edit")) self.horizontalLayout_7.addWidget(self.ratio_var_crit_edit) - spacerItem5 = QtGui.QSpacerItem(40, 20, QtGui.QSizePolicy.Expanding, QtGui.QSizePolicy.Minimum) - self.horizontalLayout_7.addItem(spacerItem5) + spacerItem6 = QtGui.QSpacerItem(40, 20, QtGui.QSizePolicy.Expanding, QtGui.QSizePolicy.Minimum) + self.horizontalLayout_7.addItem(spacerItem6) self.verticalLayout_3.addLayout(self.horizontalLayout_7) self.verticalLayout_4.addWidget(self.eff_var_test_gb) self.background_check_gb = QtGui.QGroupBox(DiagDetsFrame) @@ -189,8 +217,8 @@ class Ui_DiagDetsFrame(object): self.sambkg_median_test_low_edit.setSizePolicy(sizePolicy) self.sambkg_median_test_low_edit.setObjectName(_fromUtf8("sambkg_median_test_low_edit")) self.horizontalLayout_8.addWidget(self.sambkg_median_test_low_edit) - spacerItem6 = QtGui.QSpacerItem(40, 20, QtGui.QSizePolicy.Expanding, QtGui.QSizePolicy.Minimum) - self.horizontalLayout_8.addItem(spacerItem6) + spacerItem7 = QtGui.QSpacerItem(40, 20, QtGui.QSizePolicy.Expanding, QtGui.QSizePolicy.Minimum) + self.horizontalLayout_8.addItem(spacerItem7) self.verticalLayout_2.addLayout(self.horizontalLayout_8) self.horizontalLayout_2 = QtGui.QHBoxLayout() self.horizontalLayout_2.setObjectName(_fromUtf8("horizontalLayout_2")) @@ -207,8 +235,8 @@ class Ui_DiagDetsFrame(object): self.sambkg_errorbar_crit_edit.setMaximumSize(QtCore.QSize(16777215, 16777215)) self.sambkg_errorbar_crit_edit.setObjectName(_fromUtf8("sambkg_errorbar_crit_edit")) self.horizontalLayout_2.addWidget(self.sambkg_errorbar_crit_edit) - spacerItem7 = QtGui.QSpacerItem(40, 20, QtGui.QSizePolicy.Expanding, QtGui.QSizePolicy.Minimum) - self.horizontalLayout_2.addItem(spacerItem7) + spacerItem8 = QtGui.QSpacerItem(40, 20, QtGui.QSizePolicy.Expanding, QtGui.QSizePolicy.Minimum) + self.horizontalLayout_2.addItem(spacerItem8) self.verticalLayout_2.addLayout(self.horizontalLayout_2) self.horizontalLayout_9 = QtGui.QHBoxLayout() self.horizontalLayout_9.setObjectName(_fromUtf8("horizontalLayout_9")) @@ -237,8 +265,8 @@ class Ui_DiagDetsFrame(object): self.tof_end_edit.setSizePolicy(sizePolicy) self.tof_end_edit.setObjectName(_fromUtf8("tof_end_edit")) self.horizontalLayout_9.addWidget(self.tof_end_edit) - spacerItem8 = QtGui.QSpacerItem(40, 20, QtGui.QSizePolicy.Expanding, QtGui.QSizePolicy.Minimum) - self.horizontalLayout_9.addItem(spacerItem8) + spacerItem9 = QtGui.QSpacerItem(40, 20, QtGui.QSizePolicy.Expanding, QtGui.QSizePolicy.Minimum) + self.horizontalLayout_9.addItem(spacerItem9) self.verticalLayout_2.addLayout(self.horizontalLayout_9) self.verticalLayout_4.addWidget(self.background_check_gb) self.horizontalLayout_3 = QtGui.QHBoxLayout() @@ -248,8 +276,8 @@ class Ui_DiagDetsFrame(object): self.reject_zero_bg_cb.setChecked(False) self.reject_zero_bg_cb.setObjectName(_fromUtf8("reject_zero_bg_cb")) self.horizontalLayout_3.addWidget(self.reject_zero_bg_cb) - spacerItem9 = QtGui.QSpacerItem(40, 20, QtGui.QSizePolicy.Expanding, QtGui.QSizePolicy.Minimum) - self.horizontalLayout_3.addItem(spacerItem9) + spacerItem10 = QtGui.QSpacerItem(40, 20, QtGui.QSizePolicy.Expanding, QtGui.QSizePolicy.Minimum) + self.horizontalLayout_3.addItem(spacerItem10) self.verticalLayout_4.addLayout(self.horizontalLayout_3) self.psd_bleed_gb = QtGui.QGroupBox(DiagDetsFrame) self.psd_bleed_gb.setCheckable(True) @@ -284,12 +312,12 @@ class Ui_DiagDetsFrame(object): self.ignored_pixels_edit.setSizePolicy(sizePolicy) self.ignored_pixels_edit.setObjectName(_fromUtf8("ignored_pixels_edit")) self.horizontalLayout_11.addWidget(self.ignored_pixels_edit) - spacerItem10 = QtGui.QSpacerItem(40, 20, QtGui.QSizePolicy.Expanding, QtGui.QSizePolicy.Minimum) - self.horizontalLayout_11.addItem(spacerItem10) + spacerItem11 = QtGui.QSpacerItem(40, 20, QtGui.QSizePolicy.Expanding, QtGui.QSizePolicy.Minimum) + self.horizontalLayout_11.addItem(spacerItem11) self.verticalLayout_5.addLayout(self.horizontalLayout_11) self.verticalLayout_4.addWidget(self.psd_bleed_gb) - spacerItem11 = QtGui.QSpacerItem(17, 453, QtGui.QSizePolicy.Minimum, QtGui.QSizePolicy.Expanding) - self.verticalLayout_4.addItem(spacerItem11) + spacerItem12 = QtGui.QSpacerItem(17, 453, QtGui.QSizePolicy.Minimum, QtGui.QSizePolicy.Expanding) + self.verticalLayout_4.addItem(spacerItem12) self.retranslateUi(DiagDetsFrame) QtCore.QMetaObject.connectSlotsByName(DiagDetsFrame) @@ -300,9 +328,11 @@ class Ui_DiagDetsFrame(object): self.output_mask_browse.setText(QtGui.QApplication.translate("DiagDetsFrame", "Browse", None, QtGui.QApplication.UnicodeUTF8)) self.white_beam_tests_gb.setTitle(QtGui.QApplication.translate("DiagDetsFrame", "Detector Vanadium Tests", None, QtGui.QApplication.UnicodeUTF8)) self.high_counts_label.setText(QtGui.QApplication.translate("DiagDetsFrame", "High counts", None, QtGui.QApplication.UnicodeUTF8)) - self.low_counts_label.setText(QtGui.QApplication.translate("DiagDetsFrame", "Low counts", None, QtGui.QApplication.UnicodeUTF8)) + self.low_counts_label.setText(QtGui.QApplication.translate("DiagDetsFrame", " Low counts", None, QtGui.QApplication.UnicodeUTF8)) self.median_test_high_label.setText(QtGui.QApplication.translate("DiagDetsFrame", "Median test high", None, QtGui.QApplication.UnicodeUTF8)) - self.median_test_low_label.setText(QtGui.QApplication.translate("DiagDetsFrame", "Median test low", None, QtGui.QApplication.UnicodeUTF8)) + self.median_test_low_label.setText(QtGui.QApplication.translate("DiagDetsFrame", " Median test low", None, QtGui.QApplication.UnicodeUTF8)) + self.median_test_out_high_label.setText(QtGui.QApplication.translate("DiagDetsFrame", "Median high outliers", None, QtGui.QApplication.UnicodeUTF8)) + self.median_test_out_low_label.setText(QtGui.QApplication.translate("DiagDetsFrame", " Median low outliers", None, QtGui.QApplication.UnicodeUTF8)) self.errorbar_crit_label.setText(QtGui.QApplication.translate("DiagDetsFrame", "Errorbar Criterion", None, QtGui.QApplication.UnicodeUTF8)) self.eff_var_test_gb.setTitle(QtGui.QApplication.translate("DiagDetsFrame", "Efficiency Variation Test", None, QtGui.QApplication.UnicodeUTF8)) self.det_van2_label.setText(QtGui.QApplication.translate("DiagDetsFrame", "Detector Van 2", None, QtGui.QApplication.UnicodeUTF8))