diff --git a/RefRed/configuration/export_xml_config.py b/RefRed/configuration/export_xml_config.py
index 97f1cb2b..e5d320fe 100644
--- a/RefRed/configuration/export_xml_config.py
+++ b/RefRed/configuration/export_xml_config.py
@@ -209,6 +209,10 @@ def main_part(self):
)
str_array.append(' True\n')
+
+ # Dead time correction
+ dead_time = o_general_settings.dead_time
+ str_array.append(' ' + str(dead_time) + '\n')
str_array.append(' \n')
str_array.append(' \n')
diff --git a/RefRed/configuration/loading_configuration.py b/RefRed/configuration/loading_configuration.py
index 2bc97088..ee523faa 100644
--- a/RefRed/configuration/loading_configuration.py
+++ b/RefRed/configuration/loading_configuration.py
@@ -179,6 +179,9 @@ def populate_main_gui_general_settings(self):
o_scaling_factor_widget.checkbox(status=scaling_factor_flag)
o_scaling_factor_widget.set_enabled(status=scaling_factor_flag)
+ use_dead_time = str2bool(self.getNodeValue(node_0, 'dead_time_correction'))
+ self.parent.ui.deadtime_checkbox.setChecked(use_dead_time)
+
def getMetadataObject(self, node) -> LConfigDataset:
r"""Populate an instance of type LConfigDataset using the information contained in one of the
'RefLData XML blocks within a configuration file."""
diff --git a/RefRed/gui_handling/gui_utility.py b/RefRed/gui_handling/gui_utility.py
index 109256a0..b791f81a 100644
--- a/RefRed/gui_handling/gui_utility.py
+++ b/RefRed/gui_handling/gui_utility.py
@@ -34,7 +34,7 @@ def init_widgets_value(self):
_gui_metadata = self.parent.gui_metadata
# event tof bins
- _tof_bin = _gui_metadata['tof_bin']
+ _tof_bin = int(_gui_metadata['tof_bin'])
self.parent.ui.eventTofBins.setValue(_tof_bin)
# q bin
diff --git a/RefRed/initialization/gui.py b/RefRed/initialization/gui.py
index f059140d..5ee1eebb 100644
--- a/RefRed/initialization/gui.py
+++ b/RefRed/initialization/gui.py
@@ -108,8 +108,8 @@ def set_gui_size(self):
self.parent.setGeometry(
50,
50,
- self.gui_size_coeff * screen.width(),
- self.gui_size_coeff * screen.height(),
+ int(self.gui_size_coeff * screen.width()),
+ int(self.gui_size_coeff * screen.height()),
)
def set_statusbar(self):
diff --git a/RefRed/interfaces/mplwidgets.py b/RefRed/interfaces/mplwidgets.py
index ecadcd34..31bd7898 100644
--- a/RefRed/interfaces/mplwidgets.py
+++ b/RefRed/interfaces/mplwidgets.py
@@ -2,7 +2,6 @@
import os
import tempfile
from qtpy import QtCore, QtGui, QtWidgets
-import matplotlib.cm
import matplotlib.colors
from matplotlib.colors import LogNorm, Normalize
from RefRed.config import plotting
@@ -17,11 +16,6 @@ def _set_default_rc():
_set_default_rc()
-cmap = matplotlib.colors.LinearSegmentedColormap.from_list(
- "default", ["#0000ff", "#00ff00", "#ffff00", "#ff0000", "#bd7efc", "#000000"], N=256
-)
-matplotlib.cm.register_cmap("default", cmap=cmap)
-
# set the default backend to be compatible with Qt in case someone uses pylab from IPython console
def set_matplotlib_backend():
diff --git a/RefRed/interfaces/refred_main_interface.ui b/RefRed/interfaces/refred_main_interface.ui
index ed8651fe..0d3f370b 100644
--- a/RefRed/interfaces/refred_main_interface.ui
+++ b/RefRed/interfaces/refred_main_interface.ui
@@ -38,8 +38,8 @@
0
0
- 1540
- 1319
+ 1544
+ 1317
@@ -603,15 +603,6 @@
-
-
-
- 0
- 0
- 0
-
-
-
@@ -749,15 +740,6 @@
-
-
-
- 0
- 0
- 0
-
-
-
@@ -895,15 +877,6 @@
-
-
-
- 0
- 0
- 0
-
-
-
@@ -1032,6 +1005,16 @@ p, li { white-space: pre-wrap; }
+ -
+
+
+ Use dead time correction
+
+
+ true
+
+
+
@@ -1040,6 +1023,9 @@ p, li { white-space: pre-wrap; }
+ -
+
+
-
@@ -1993,15 +1979,6 @@ p, li { white-space: pre-wrap; }
-
-
-
- 0
- 255
- 0
-
-
-
@@ -2013,15 +1990,6 @@ p, li { white-space: pre-wrap; }
-
-
-
- 0
- 255
- 0
-
-
-
@@ -2033,15 +2001,6 @@ p, li { white-space: pre-wrap; }
-
-
-
- 0
- 0
- 0
-
-
-
@@ -2064,15 +2023,6 @@ p, li { white-space: pre-wrap; }
-
-
-
- 0
- 255
- 0
-
-
-
@@ -2084,15 +2034,6 @@ p, li { white-space: pre-wrap; }
-
-
-
- 0
- 255
- 0
-
-
-
@@ -2104,15 +2045,6 @@ p, li { white-space: pre-wrap; }
-
-
-
- 0
- 0
- 0
-
-
-
@@ -2197,15 +2129,6 @@ p, li { white-space: pre-wrap; }
-
-
-
- 255
- 15
- 29
-
-
-
@@ -2217,15 +2140,6 @@ p, li { white-space: pre-wrap; }
-
-
-
- 255
- 15
- 29
-
-
-
@@ -2237,15 +2151,6 @@ p, li { white-space: pre-wrap; }
-
-
-
- 0
- 0
- 0
-
-
-
@@ -2268,15 +2173,6 @@ p, li { white-space: pre-wrap; }
-
-
-
- 255
- 15
- 29
-
-
-
@@ -2288,15 +2184,6 @@ p, li { white-space: pre-wrap; }
-
-
-
- 255
- 15
- 29
-
-
-
@@ -2308,15 +2195,6 @@ p, li { white-space: pre-wrap; }
-
-
-
- 0
- 0
- 0
-
-
-
@@ -2404,15 +2282,6 @@ p, li { white-space: pre-wrap; }
-
-
-
- 255
- 165
- 0
-
-
-
@@ -2424,15 +2293,6 @@ p, li { white-space: pre-wrap; }
-
-
-
- 255
- 165
- 0
-
-
-
@@ -2444,15 +2304,6 @@ p, li { white-space: pre-wrap; }
-
-
-
- 0
- 0
- 0
-
-
-
@@ -2478,15 +2329,6 @@ p, li { white-space: pre-wrap; }
-
-
-
- 255
- 120
- 0
-
-
-
@@ -2498,15 +2340,6 @@ p, li { white-space: pre-wrap; }
-
-
-
- 255
- 120
- 0
-
-
-
@@ -2518,15 +2351,6 @@ p, li { white-space: pre-wrap; }
-
-
-
- 0
- 0
- 0
-
-
-
@@ -2734,15 +2558,6 @@ p, li { white-space: pre-wrap; }
-
-
-
- 0
- 0
- 255
-
-
-
@@ -2754,15 +2569,6 @@ p, li { white-space: pre-wrap; }
-
-
-
- 0
- 0
- 255
-
-
-
@@ -2774,15 +2580,6 @@ p, li { white-space: pre-wrap; }
-
-
-
- 0
- 0
- 255
-
-
-
@@ -2834,15 +2631,6 @@ p, li { white-space: pre-wrap; }
-
-
-
- 0
- 0
- 255
-
-
-
@@ -2854,15 +2642,6 @@ p, li { white-space: pre-wrap; }
-
-
-
- 0
- 0
- 255
-
-
-
@@ -2874,15 +2653,6 @@ p, li { white-space: pre-wrap; }
-
-
-
- 0
- 0
- 255
-
-
-
@@ -3084,15 +2854,6 @@ p, li { white-space: pre-wrap; }
-
-
-
- 0
- 255
- 0
-
-
-
@@ -3104,15 +2865,6 @@ p, li { white-space: pre-wrap; }
-
-
-
- 0
- 255
- 0
-
-
-
@@ -3124,15 +2876,6 @@ p, li { white-space: pre-wrap; }
-
-
-
- 0
- 0
- 0
-
-
-
@@ -3173,15 +2916,6 @@ p, li { white-space: pre-wrap; }
-
-
-
- 0
- 255
- 0
-
-
-
@@ -3193,15 +2927,6 @@ p, li { white-space: pre-wrap; }
-
-
-
- 0
- 255
- 0
-
-
-
@@ -3213,15 +2938,6 @@ p, li { white-space: pre-wrap; }
-
-
-
- 0
- 0
- 0
-
-
-
@@ -3280,15 +2996,6 @@ p, li { white-space: pre-wrap; }
-
-
-
- 255
- 15
- 29
-
-
-
@@ -3300,15 +3007,6 @@ p, li { white-space: pre-wrap; }
-
-
-
- 255
- 15
- 29
-
-
-
@@ -3320,15 +3018,6 @@ p, li { white-space: pre-wrap; }
-
-
-
- 0
- 0
- 0
-
-
-
@@ -3369,15 +3058,6 @@ p, li { white-space: pre-wrap; }
-
-
-
- 255
- 15
- 29
-
-
-
@@ -3389,15 +3069,6 @@ p, li { white-space: pre-wrap; }
-
-
-
- 255
- 15
- 29
-
-
-
@@ -3409,15 +3080,6 @@ p, li { white-space: pre-wrap; }
-
-
-
- 0
- 0
- 0
-
-
-
@@ -3476,15 +3138,6 @@ p, li { white-space: pre-wrap; }
-
-
-
- 255
- 120
- 0
-
-
-
@@ -3496,15 +3149,6 @@ p, li { white-space: pre-wrap; }
-
-
-
- 255
- 120
- 0
-
-
-
@@ -3516,15 +3160,6 @@ p, li { white-space: pre-wrap; }
-
-
-
- 0
- 0
- 0
-
-
-
@@ -3565,15 +3200,6 @@ p, li { white-space: pre-wrap; }
-
-
-
- 255
- 120
- 0
-
-
-
@@ -3585,15 +3211,6 @@ p, li { white-space: pre-wrap; }
-
-
-
- 255
- 120
- 0
-
-
-
@@ -3605,15 +3222,6 @@ p, li { white-space: pre-wrap; }
-
-
-
- 0
- 0
- 0
-
-
-
@@ -3809,15 +3417,6 @@ p, li { white-space: pre-wrap; }
-
-
-
- 0
- 0
- 255
-
-
-
@@ -3829,15 +3428,6 @@ p, li { white-space: pre-wrap; }
-
-
-
- 0
- 0
- 255
-
-
-
@@ -3849,15 +3439,6 @@ p, li { white-space: pre-wrap; }
-
-
-
- 0
- 0
- 255
-
-
-
@@ -3909,15 +3490,6 @@ p, li { white-space: pre-wrap; }
-
-
-
- 0
- 0
- 255
-
-
-
@@ -3929,15 +3501,6 @@ p, li { white-space: pre-wrap; }
-
-
-
- 0
- 0
- 255
-
-
-
@@ -3949,15 +3512,6 @@ p, li { white-space: pre-wrap; }
-
-
-
- 0
- 0
- 255
-
-
-
@@ -4296,12 +3850,12 @@ p, li { white-space: pre-wrap; }
true
-
- 25
-
50
+
+ 25
+
false
@@ -5328,7 +4882,7 @@ p, li { white-space: pre-wrap; }
0
0
1560
- 22
+ 28