Index: src/sas/qtgui/Perspectives/Invariant/InvariantDetails.py
===================================================================
--- src/sas/qtgui/Perspectives/Invariant/InvariantDetails.py	(revision f721030e66e61dc6279aa8e024da03b25f8e0d42)
+++ src/sas/qtgui/Perspectives/Invariant/InvariantDetails.py	(revision f721030e66e61dc6279aa8e024da03b25f8e0d42)
@@ -0,0 +1,61 @@
+import sys
+import os
+from PyQt4 import QtCore
+from PyQt4 import QtGui
+
+# local
+from UI.InvariantDetailsUI import Dialog
+from InvariantUtils import WIDGETS
+
+class DetailsDialog(Dialog):
+    """
+    """
+    def __init__(self, parent):
+        Dialog.__init__(self, parent)
+
+        self.progressBar.setMinimum(0)
+        self.progressBar.setMaximum(100)
+
+        self.progressBar_2.setMinimum(0)
+        self.progressBar_2.setMaximum(100)
+
+        self.progressBar_3.setMinimum(0)
+        self.progressBar_3.setMaximum(100)
+
+    def setModel(self, model):
+        """
+        """
+        self._model = model
+
+    def showDialog(self):
+        """
+        """
+        # Pull out data from the model
+        qstar_total = float(self._model.item(WIDGETS.W_INVARIANT).text())
+        self.lineEdit_3.setText(str(qstar_total))
+        self.lineEdit_4.setText(self._model.item(WIDGETS.W_INVARIANT_ERR).text())
+
+        progress_low_qstar = 0.0
+        progress_high_qstar = 0.0
+        progress_qstar = 100.0
+
+        if self._model.item(WIDGETS.W_ENABLE_LOWQ).text() == "true":
+            qlow = float(self._model.item(WIDGETS.D_LOW_QSTAR).text())
+            self.lineEdit.setText(str(qlow))
+            self.lineEdit_2.setText(self._model.item(WIDGETS.D_LOW_QSTAR_ERR).text())
+            progress_low_qstar = (qlow/qstar_total)*100.0
+
+        if self._model.item(WIDGETS.W_ENABLE_HIGHQ).text() == "true":
+            qhigh = float(self._model.item(WIDGETS.D_LOW_QSTAR).text())
+            self.lineEdit.setText(str(qhigh))
+            self.lineEdit_2.setText(self._model.item(WIDGETS.D_HIGH_QSTAR_ERR).text())
+            progress_high_qstar = (qhigh/qstar_total)*100.0
+
+
+        progress_qstar -= progress_low_qstar + progress_high_qstar
+
+        self.progressBar.setValue(progress_low_qstar)
+        self.progressBar_2.setValue(progress_qstar)           
+        self.progressBar_3.setValue(progress_high_qstar)           
+
+        self.show()
Index: src/sas/qtgui/Perspectives/Invariant/InvariantPerspective.py
===================================================================
--- src/sas/qtgui/Perspectives/Invariant/InvariantPerspective.py	(revision f721030e66e61dc6279aa8e024da03b25f8e0d42)
+++ src/sas/qtgui/Perspectives/Invariant/InvariantPerspective.py	(revision f721030e66e61dc6279aa8e024da03b25f8e0d42)
@@ -0,0 +1,550 @@
+# global
+import sys
+import os
+from PyQt4 import QtCore
+from PyQt4 import QtGui
+from PyQt4 import QtWebKit
+
+from twisted.internet import threads
+
+# sas-global
+from sas.sascalc.invariant import invariant
+from sas.sasgui.guiframe.dataFitting import Data1D
+
+# local
+from UI.TabbedInvariantUI import tabbedInvariantUI
+from InvariantDetails import DetailsDialog
+from Plotter import Plotter
+from InvariantUtils import WIDGETS
+
+# The minimum q-value to be used when extrapolating
+Q_MINIMUM = 1e-5
+# The maximum q-value to be used when extrapolating
+Q_MAXIMUM = 10
+# the ratio of maximum q value/(qmax of data) to plot the theory data
+Q_MAXIMUM_PLOT = 3
+
+
+class MyModel(object):
+    def __init__(self):
+        self._model = QtGui.QStandardItemModel(self)
+
+    def addItem(self, item):
+        item = QtGui.QStandardItem(str(item))
+        self._model.appendRow(item)
+
+# class InvariantWindow(InvariantUI):
+class InvariantWindow(tabbedInvariantUI):
+    # The controller which is responsible for managing signal slots connections
+    # for the gui and providing an interface to the data model.
+    def __init__(self, manager=None, parent=None):
+        super(InvariantWindow, self).__init__(parent)
+        # This controller contains the ui and doesn't inherit it directly!
+        # self.form = InvariantUI()
+        self.setWindowTitle("Invariant Perspective")
+        # initial input params
+        self._background = 0.0
+        self._scale = 1.0
+        self._contrast = 1.0
+        self._porod = 1.0
+        self._npoints_low = 10
+        self._npoints_high = 10
+        self._power_low = 4
+
+        self._manager = manager
+        self._reactor = self._manager.reactor()
+
+        self._helpView = QtWebKit.QWebView()
+        self.detailsDialog = DetailsDialog(self)
+        self._plotter = Plotter(self)
+
+        self._low_extrapolate = False
+        self._low_guinier  = True
+        self._low_fit  = True
+        self._high_extrapolate = False
+        self._high_power_value  = False
+
+
+        # Mask file selector
+        ###################################################
+        self._path = "cyl_400_20.txt"
+        from sas.sascalc.dataloader.loader import  Loader
+        loader = Loader()
+        try:
+            self._data = loader.load(self._path)
+        except:
+            raise
+        ###################################################
+
+        self.lineEdit_8.setText(str(Q_MINIMUM))
+        self.lineEdit_9.setText(str(Q_MAXIMUM))
+
+        # Let's choose the Standard Item Model.
+        self.model = QtGui.QStandardItemModel(self)
+
+        # Connect buttons to slots.
+        # Needs to be done early so default values propagate properly.
+        self.setupSlots()
+
+        # Set up the model.
+        self.setupModel()
+
+        # Set up the mapper
+        self.setupMapper()
+
+    def updateFromModel(self):
+        """
+        update the globals based on the data in the model
+        """
+        self._background = float(self.model.item(WIDGETS.W_BACKGROUND).text())
+        self._contrast   = float(self.model.item(WIDGETS.W_CONTRAST).text())
+        self._scale      = float(self.model.item(WIDGETS.W_SCALE).text())
+
+        # High extrapolate
+        self._low_extrapolate = ( str(self.model.item(WIDGETS.W_ENABLE_LOWQ).text()) == 'true')
+        self._low_points = float(self.model.item(WIDGETS.W_NPTS_LOWQ).text())
+        self._low_guinier  = ( str(self.model.item(WIDGETS.W_LOWQ_GUINIER).text()) == 'true')
+        self._low_fit  = ( str(self.model.item(WIDGETS.W_LOWQ_FIT).text()) == 'true')
+        self._low_power_value  = float(self.model.item(WIDGETS.W_LOWQ_POWER_VALUE).text())
+
+        # High extrapolating
+        self._high_extrapolate = ( str(self.model.item(WIDGETS.W_ENABLE_HIGHQ).text()) == 'true')
+        self._high_points  = float(self.model.item(WIDGETS.W_NPTS_HIGHQ).text())
+        self._high_fit  = ( str(self.model.item(WIDGETS.W_HIGHQ_FIT).text()) == 'true')
+        self._high_power_value  = float(self.model.item(WIDGETS.W_HIGHQ_POWER_VALUE).text())
+
+    def calculate(self):
+        """
+        Use twisted to thread the calculations away.
+        """
+        # Find out if extrapolation needs to be used.
+        extrapolation = None
+        if self._low_extrapolate  and not self._high_extrapolate:
+            extrapolation = "low"
+        elif not self._low_extrapolate  and self._high_extrapolate:
+            extrapolation = "high"
+        elif self._low_extrapolate and self._high_extrapolate:
+            extrapolation = "both"
+        try:
+            # modify the Calculate button to indicate background process
+            self.pushButton.setText("Calculating...")
+            self.pushButton.setEnabled(False)
+            self.style = self.pushButton.styleSheet()
+            self.pushButton.setStyleSheet("background-color: rgb(255, 255, 0); color: rgb(0, 0, 0)")
+            # Send the calculations to separate thread.
+            d = threads.deferToThread(self.calculateThread, extrapolation)
+            # Add deferred callback for call return
+            d.addCallback(self.plotResult)
+        except Exception as ex:
+            # Set the button back to available
+            self.pushButton.setEnabled(True)
+            self.pushButton.setText("Calculate")
+            self.pushButton.setStyleSheet(self.style)
+
+    def plotResult(self, model):
+        """
+        """
+        self._plotter.show()
+        self.model = model
+        self.mapper.toFirst()
+
+        # Set the button back to available
+        self.pushButton.setEnabled(True)
+        self.pushButton.setText("Calculate")
+        self.pushButton.setStyleSheet(self.style)
+
+
+    def calculateThread(self, extrapolation):
+        """
+        """
+        self.updateFromModel()
+
+        qstar_low = 0.0
+        qstar_low_err = 0.0
+        qstar_high = 0.0
+        qstar_high_err = 0.0
+        qstar_total = 0.0
+        qstar_total_low_err = 0.0
+
+        # Prepare the invariant object
+        inv = invariant.InvariantCalculator(data=self._data,
+                                            background = self._background,
+                                            scale = self._scale)
+
+        if self._low_extrapolate:
+            function_low = "power_law"
+            if self._low_guinier:
+                function_low = "guinier"
+            if self._low_fit:
+                self._low_power_value = None
+            inv.set_extrapolation(range="low",
+                                  npts=self._low_points,
+                                  function=function_low,
+                                  power=self._low_power_value)
+
+        if self._high_extrapolate:
+            function_low = "power_law"
+            inv.set_extrapolation(range="high",
+                                  npts=self._high_points,
+                                  function=function_low,
+                                  power=self._low_power_value)
+
+        #Compute invariant
+        # TODO: proper exception handling and logic -
+        # display info, update lineedits, don't run extrapolations etc.
+        calculation_failed = False
+        try:
+            qstar_total, qstar_total_error         = inv.get_qstar_with_error()
+        except Exception as ex:
+            calculation_failed = True
+            # Display relevant information
+            item = QtGui.QStandardItem("ERROR")
+            self.model.setItem(WIDGETS.W_INVARIANT, item)
+            item = QtGui.QStandardItem("ERROR")
+            self.model.setItem(WIDGETS.W_INVARIANT_ERR, item)
+        try:
+            volume_fraction, volume_fraction_error = \
+                inv.get_volume_fraction_with_error(self._contrast)
+        except Exception as ex:
+            calculation_failed = True
+            # Display relevant information
+            item = QtGui.QStandardItem("ERROR")
+            self.model.setItem(WIDGETS.W_VOLUME_FRACTION, item)
+            item = QtGui.QStandardItem("ERROR")
+            self.model.setItem(WIDGETS.W_VOLUME_FRACTION_ERR, item)
+        try:
+            surface, surface_error                 = \
+                inv.get_surface_with_error(self._contrast, self._porod)
+        except Exception as ex:
+            calculation_failed = True
+            # Display relevant information
+            item = QtGui.QStandardItem("ERROR")
+            self.model.setItem(WIDGETS.W_SPECIFIC_SURFACE, item)
+            item = QtGui.QStandardItem("ERROR")
+            self.model.setItem(WIDGETS.W_SPECIFIC_SURFACE_ERR, item)
+
+        if(calculation_failed):
+            # TODO: NOTIFY THE GUI MANAGER!!
+            self.mapper.toFirst()
+            return self.model
+
+        self._plotter.clean()
+        self._plotter.x_label("Q(A$^{-1}$)")
+        self._plotter.y_label("Intensity(cm$^{-1}$)")
+
+        if self._low_extrapolate:
+            # for presentation in InvariantDetails
+            qstar_low, qstar_low_err = inv.get_qstar_low()
+            extrapolated_data = inv.get_extra_data_low(self._low_points)
+            power_low = inv.get_extrapolation_power(range='low')
+
+            #inv.data = extrapolated_data
+            #qstar_total, qstar_total_error = inv.get_qstar_with_error()
+
+            # Plot the chart
+            self._plotter.data(extrapolated_data)
+            self._plotter.title("Low-Q extrapolation")
+            self._plotter.plot()
+
+
+        if self._high_extrapolate:
+            # for presentation in InvariantDetails
+            qmax_plot = Q_MAXIMUM_PLOT * max(self._data.x)
+            if qmax_plot > Q_MAXIMUM:
+                qmax_plot = Q_MAXIMUM
+            qstar_high, qstar_high_err = inv.get_qstar_high()
+            power_high = inv.get_extrapolation_power(range='high')
+            high_out_data = inv.get_extra_data_high(q_end=qmax_plot, npts=500)
+
+            # find how to add this plot to the existing plot for low_extrapolate
+            # Plot the chart
+            self._plotter.data(high_out_data)
+            self._plotter.title("High-Q extrapolation")
+            self._plotter.plot()
+
+
+        item = QtGui.QStandardItem(str(float('%.5g'% volume_fraction)))
+        self.model.setItem(WIDGETS.W_VOLUME_FRACTION, item)
+        item = QtGui.QStandardItem(str(float('%.5g'% volume_fraction_error)))
+        self.model.setItem(WIDGETS.W_VOLUME_FRACTION_ERR, item)
+        item = QtGui.QStandardItem(str(float('%.5g'% surface)))
+        self.model.setItem(WIDGETS.W_SPECIFIC_SURFACE, item)
+        item = QtGui.QStandardItem(str(float('%.5g'% surface_error)))
+        self.model.setItem(WIDGETS.W_SPECIFIC_SURFACE_ERR, item)
+        item = QtGui.QStandardItem(str(float('%.5g'% qstar_total)))
+        self.model.setItem(WIDGETS.W_INVARIANT, item)
+        item = QtGui.QStandardItem(str(float('%.5g'% qstar_total_error)))
+        self.model.setItem(WIDGETS.W_INVARIANT_ERR, item)
+
+        #item = QtGui.QStandardItem(str(float('%.5g'% qstar_total)))
+        #self.model.setItem(WIDGETS.D_TOTAL_QSTAR, item)
+        #item = QtGui.QStandardItem(str(float('%.5g'% qstar_total_err)))
+        #self.model.setItem(WIDGETS.D_TOTAL_QSTAR_ERR, item)
+        item = QtGui.QStandardItem(str(float('%.5g'% qstar_low)))
+        self.model.setItem(WIDGETS.D_LOW_QSTAR, item)
+        item = QtGui.QStandardItem(str(float('%.5g'% qstar_low_err)))
+        self.model.setItem(WIDGETS.D_LOW_QSTAR_ERR, item)
+        item = QtGui.QStandardItem(str(float('%.5g'% qstar_high)))
+        self.model.setItem(WIDGETS.D_HIGH_QSTAR, item)
+        item = QtGui.QStandardItem(str(float('%.5g'% qstar_high_err)))
+        self.model.setItem(WIDGETS.D_HIGH_QSTAR_ERR, item)
+
+        self.mapper.toFirst()
+
+        return self.model
+                
+
+    def status(self):
+        """
+        """
+        self.detailsDialog.setModel(self.model)
+        self.detailsDialog.showDialog()
+
+    def help(self):
+        """
+        """
+        _TreeLocation = "html/user/sasgui/perspectives/invariant/invariant_help.html"
+        self._helpView.load(QtCore.QUrl(_TreeLocation))
+        self._helpView.show()
+
+    def setupSlots(self):
+        self.pushButton.clicked.connect(self.calculate)
+        self.pushButton_2.clicked.connect(self.status)
+        self.pushButton_3.clicked.connect(self.help)
+
+        self.radioButton.toggled.connect(self.lowGuinierAndPowerToggle)
+        self.radioButton_8.toggled.connect(self.hiFitAndFixToggle)
+
+        self.radioButton_3.toggled.connect(self.lowFitAndFixToggle)
+
+        # Bug workaround for QDataWidgetMapper() not reacting to checkbox clicks.
+        # https://bugreports.qt.io/browse/QTBUG-1818
+        self.checkBox.clicked.connect(self.setFocus)
+        self.checkBox_2.clicked.connect(self.setFocus)
+
+        self.model.itemChanged.connect(self.modelChanged)
+
+    def modelChanged(self, item):
+        """
+        """
+        if item.row() == WIDGETS.W_ENABLE_LOWQ:
+            toggle = (str(item.text()) == 'true')
+            self._low_extrapolate = toggle
+            self.lowQToggle(toggle)
+        elif item.row() == WIDGETS.W_ENABLE_HIGHQ:
+            toggle = (str(item.text()) == 'true')
+            self._high_extrapolate = toggle
+            self.highQToggle(toggle)
+        
+    def lowGuinierAndPowerToggle(self, toggle):
+        """
+        """
+        self._low_guinier = toggle
+        toggle = not toggle
+        self.lineEdit_11.setEnabled(toggle)
+        self.radioButton_3.setEnabled(toggle)
+        self.radioButton_4.setEnabled(toggle)
+        self.lineEdit_11.setEnabled(toggle and (not self._low_fit))
+
+    def lowFitAndFixToggle(self, toggle):
+        """
+        """
+        self._low_fit = toggle
+        toggle = not toggle
+        self.lineEdit_11.setEnabled(toggle)
+
+    def hiFitAndFixToggle(self, toggle):
+        """
+        """
+        self.lineEdit_13.setEnabled(toggle)
+
+    def highQToggle(self, clicked):
+        """
+        Disable/enable High Q extrapolation
+        """
+        self.radioButton_7.setEnabled(clicked)
+        self.radioButton_8.setEnabled(clicked)
+        self.lineEdit_12.setEnabled(clicked)
+        self.lineEdit_13.setEnabled(clicked)
+
+    def lowQToggle(self, clicked):
+        """
+        Disable/enable Low Q extrapolation
+        """
+        self.radioButton.setEnabled(clicked)
+        self.radioButton_2.setEnabled(clicked)
+        self.lineEdit_11.setEnabled(clicked and not self._low_fit)
+
+        # Enable subelements
+        self.radioButton_3.setEnabled(clicked and not self._low_guinier)
+        self.radioButton_4.setEnabled(clicked and not self._low_guinier)
+        self.lineEdit_10.setEnabled(clicked and not self._low_guinier)
+
+    def setupModel(self):
+
+        # filename
+        item = QtGui.QStandardItem(self._path)
+        self.model.setItem(WIDGETS.W_FILENAME, item)
+
+        # add Q parameters to the model
+        qmin = min(self._data.x)
+        item = QtGui.QStandardItem(str(qmin))
+        self.model.setItem(WIDGETS.W_QMIN, item)
+        item = QtGui.QStandardItem(str(max(self._data.x)))
+        self.model.setItem(WIDGETS.W_QMAX, item)
+
+        # add custom input params
+        item = QtGui.QStandardItem(str(self._background))
+        self.model.setItem(WIDGETS.W_BACKGROUND, item)
+        item = QtGui.QStandardItem(str(self._contrast))
+        self.model.setItem(WIDGETS.W_CONTRAST, item)
+        item = QtGui.QStandardItem(str(self._scale))
+        self.model.setItem(WIDGETS.W_SCALE, item)
+        
+        # Dialog elements
+        itemf = QtGui.QStandardItem("false")
+        self.model.setItem(WIDGETS.W_ENABLE_HIGHQ, itemf)
+        itemf = QtGui.QStandardItem("false")
+        self.model.setItem(WIDGETS.W_ENABLE_LOWQ, itemf)
+
+        item = QtGui.QStandardItem(str(self._npoints_low))
+        self.model.setItem(WIDGETS.W_NPTS_LOWQ, item)
+        item = QtGui.QStandardItem(str(self._npoints_high))
+        self.model.setItem(WIDGETS.W_NPTS_HIGHQ, item)
+
+        itemt = QtGui.QStandardItem("true")
+        self.model.setItem(WIDGETS.W_LOWQ_GUINIER, itemt)
+
+        itemt = QtGui.QStandardItem("true")
+        self.model.setItem(WIDGETS.W_LOWQ_FIT, itemt)
+        item = QtGui.QStandardItem(str(self._power_low))
+        self.model.setItem(WIDGETS.W_LOWQ_POWER_VALUE, item)
+
+        itemt = QtGui.QStandardItem("true")
+        self.model.setItem(WIDGETS.W_HIGHQ_FIT, itemt)
+        item = QtGui.QStandardItem(str(self._power_low))
+        self.model.setItem(WIDGETS.W_HIGHQ_POWER_VALUE, item)
+
+
+    def setupMapper(self):
+        # Set up the mapper.
+        self.mapper = QtGui.QDataWidgetMapper(self)
+        self.mapper.setOrientation(QtCore.Qt.Vertical)
+        self.mapper.setModel(self.model)
+
+        # Set up the view on the model for testing
+        # self.tableView.setModel(self.model)
+
+        # Filename
+        self.mapper.addMapping(self.lineEdit, WIDGETS.W_FILENAME)
+        # Qmin/Qmax
+        self.mapper.addMapping(self.lineEdit_2, WIDGETS.W_QMIN)
+        self.mapper.addMapping(self.lineEdit_3, WIDGETS.W_QMAX)
+
+        # Background
+        self.mapper.addMapping(self.lineEdit_4, WIDGETS.W_BACKGROUND)
+        # Scale
+        self.mapper.addMapping(self.lineEdit_5, WIDGETS.W_SCALE)
+        # Contrast
+        self.mapper.addMapping(self.lineEdit_6, WIDGETS.W_CONTRAST)
+
+        # Lowq/Highq items
+        self.mapper.addMapping(self.checkBox, WIDGETS.W_ENABLE_LOWQ)
+        self.mapper.addMapping(self.checkBox_2, WIDGETS.W_ENABLE_HIGHQ)
+
+        self.mapper.addMapping(self.lineEdit_10, WIDGETS.W_NPTS_LOWQ)
+        self.mapper.addMapping(self.radioButton, WIDGETS.W_LOWQ_GUINIER)
+
+        self.mapper.addMapping(self.radioButton_3, WIDGETS.W_LOWQ_FIT)
+        self.mapper.addMapping(self.lineEdit_11, WIDGETS.W_LOWQ_POWER_VALUE)
+
+        self.mapper.addMapping(self.radioButton_7, WIDGETS.W_HIGHQ_FIT)
+        self.mapper.addMapping(self.lineEdit_13, WIDGETS.W_HIGHQ_POWER_VALUE)
+    
+        # Output
+        self.mapper.addMapping(self.lineEdit_14, WIDGETS.W_VOLUME_FRACTION)
+        self.mapper.addMapping(self.lineEdit_15, WIDGETS.W_VOLUME_FRACTION_ERR)
+        self.mapper.addMapping(self.lineEdit_16, WIDGETS.W_SPECIFIC_SURFACE)
+        self.mapper.addMapping(self.lineEdit_17, WIDGETS.W_SPECIFIC_SURFACE_ERR)
+        self.mapper.addMapping(self.lineEdit_19, WIDGETS.W_INVARIANT)
+        self.mapper.addMapping(self.lineEdit_18, WIDGETS.W_INVARIANT_ERR)
+
+        self.mapper.toFirst()
+
+    def setData(self, data_list=None):
+        """
+        receive a list of data and compute invariant
+        """
+        msg = ""
+        data = None
+        if data_list is None:
+            data_list = []
+        if len(data_list) >= 1:
+            if len(data_list) == 1:
+                data = data_list[0]
+            else:
+                data_1d_list = []
+                data_2d_list = []
+                error_msg = ""
+                # separate data into data1d and data2d list
+                for data in data_list:
+                    if data is not None:
+                        if issubclass(data.__class__, Data1D):
+                            data_1d_list.append(data)
+                        else:
+                            error_msg += " %s  type %s \n" % (str(data.name),
+                                                              str(data.__class__.__name__))
+                            data_2d_list.append(data)
+                if len(data_2d_list) > 0:
+                    msg = "Invariant does not support the following data types:\n"
+                    msg += error_msg
+                if len(data_1d_list) == 0:
+                    # remake this as a qt event
+                    #wx.PostEvent(self.parent, StatusEvent(status=msg, info='error'))
+                    return
+                msg += "Invariant panel does not allow multiple data!\n"
+                msg += "Please select one.\n"
+                #if len(data_list) > 1:
+                    #from invariant_widgets import DataDialog
+                    #dlg = DataDialog(data_list=data_1d_list, text=msg)
+                    #if dlg.ShowModal() == wx.ID_OK:
+                    #    data = dlg.get_data()
+                    #else:
+                    #    data = None
+                    #dlg.Destroy()
+
+            if data is None:
+                msg += "invariant receives no data. \n"
+                #wx.PostEvent(self.parent, StatusEvent(status=msg, info='error'))
+                return
+            if not issubclass(data.__class__, Data1D):
+                msg += "invariant cannot be computed for data of "
+                msg += "type %s\n" % (data.__class__.__name__)
+                #wx.PostEvent(self.parent, StatusEvent(status=msg, info='error'))
+                return
+            else:
+                #wx.PostEvent(self.parent, NewPlotEvent(plot=data, title=data.title))
+                try:
+                    self._data = data
+                    self._path = "unique path"
+                    self.calculate()
+                except:
+                    msg = "Invariant Set_data: " + str(sys.exc_value)
+                    #wx.PostEvent(self.parent, StatusEvent(status=msg, info="error"))
+        else:
+            msg = "invariant cannot be computed for data of "
+            msg += "type %s" % (data.__class__.__name__)
+            #wx.PostEvent(self.parent, StatusEvent(status=msg, info='error'))
+
+
+
+if __name__ == "__main__":
+    app = QtGui.QApplication([])
+    import qt4reactor
+    qt4reactor.install()
+    # DO NOT move the following import to the top!
+    # (unless you know what you're doing)
+    from twisted.internet import reactor
+    dlg = InvariantWindow(reactor)
+    dlg.show()
+    reactor.run()
Index: src/sas/qtgui/Perspectives/Invariant/InvariantUtils.py
===================================================================
--- src/sas/qtgui/Perspectives/Invariant/InvariantUtils.py	(revision f721030e66e61dc6279aa8e024da03b25f8e0d42)
+++ src/sas/qtgui/Perspectives/Invariant/InvariantUtils.py	(revision f721030e66e61dc6279aa8e024da03b25f8e0d42)
@@ -0,0 +1,39 @@
+def enum(*sequential, **named):
+    enums = dict(zip(sequential, range(len(sequential))), **named)
+    return type('Enum', (), enums)
+
+WIDGETS = enum( 'W_FILENAME',           #0
+                'W_QMIN',               #1
+                'W_QMAX',               #2
+                'W_BACKGROUND',         #3
+                'W_SCALE',              #4
+                'W_CONTRAST',           #5
+                'W_EX_QMIN',            #6
+                'W_EX_QMAX',            #7
+                'W_ENABLE_LOWQ',        #8
+                'W_ENABLE_HIGHQ',       #9
+                'W_NPTS_LOWQ',          #10
+                'W_NPTS_HIGHQ',         #11
+                'W_LOWQ_GUINIER',       #12
+                'W_LOWQ_POWER',         #13
+                'W_LOWQ_FIT',           #14
+                'W_LOWQ_FIX',           #15
+                'W_LOWQ_POWER_VALUE',   #16
+                'W_HIGHQ_FIT',          #17
+                'W_HIGHQ_FIX',          #18
+                'W_HIGHQ_POWER_VALUE',  #19
+                # results
+                'W_VOLUME_FRACTION',
+                'W_VOLUME_FRACTION_ERR',
+                'W_SPECIFIC_SURFACE',
+                'W_SPECIFIC_SURFACE_ERR',
+                'W_INVARIANT',
+                'W_INVARIANT_ERR',
+                # for the details widget
+                'D_TOTAL_QSTAR',
+                'D_TOTAL_QSTAR_ERR',
+                'D_LOW_QSTAR',
+                'D_LOW_QSTAR_ERR',
+                'D_HIGH_QSTAR',
+                'D_HIGH_QSTAR_ERR',
+)
Index: src/sas/qtgui/Perspectives/Invariant/UI/InvariantDetailsUI.py
===================================================================
--- src/sas/qtgui/Perspectives/Invariant/UI/InvariantDetailsUI.py	(revision f721030e66e61dc6279aa8e024da03b25f8e0d42)
+++ src/sas/qtgui/Perspectives/Invariant/UI/InvariantDetailsUI.py	(revision f721030e66e61dc6279aa8e024da03b25f8e0d42)
@@ -0,0 +1,152 @@
+# -*- coding: utf-8 -*-
+
+# Form implementation generated from reading ui file 'InvariantDetails.ui'
+#
+# Created by: PyQt4 UI code generator 4.11.4
+#
+# WARNING! All changes made in this file will be lost!
+
+from PyQt4 import QtCore, QtGui
+
+try:
+    _fromUtf8 = QtCore.QString.fromUtf8
+except AttributeError:
+    def _fromUtf8(s):
+        return s
+
+try:
+    _encoding = QtGui.QApplication.UnicodeUTF8
+    def _translate(context, text, disambig):
+        return QtGui.QApplication.translate(context, text, disambig, _encoding)
+except AttributeError:
+    def _translate(context, text, disambig):
+        return QtGui.QApplication.translate(context, text, disambig)
+
+class Ui_Dialog(object):
+    def setupUi(self, Dialog):
+        Dialog.setObjectName(_fromUtf8("Dialog"))
+        Dialog.resize(449, 458)
+        self.gridLayout_4 = QtGui.QGridLayout(Dialog)
+        self.gridLayout_4.setObjectName(_fromUtf8("gridLayout_4"))
+        self.groupBox = QtGui.QGroupBox(Dialog)
+        self.groupBox.setObjectName(_fromUtf8("groupBox"))
+        self.gridLayout_2 = QtGui.QGridLayout(self.groupBox)
+        self.gridLayout_2.setObjectName(_fromUtf8("gridLayout_2"))
+        self.label_12 = QtGui.QLabel(self.groupBox)
+        self.label_12.setObjectName(_fromUtf8("label_12"))
+        self.gridLayout_2.addWidget(self.label_12, 0, 0, 1, 1)
+        self.progressBar = QtGui.QProgressBar(self.groupBox)
+        self.progressBar.setProperty("value", 24)
+        self.progressBar.setObjectName(_fromUtf8("progressBar"))
+        self.gridLayout_2.addWidget(self.progressBar, 0, 1, 1, 1)
+        self.label_10 = QtGui.QLabel(self.groupBox)
+        self.label_10.setObjectName(_fromUtf8("label_10"))
+        self.gridLayout_2.addWidget(self.label_10, 1, 0, 1, 1)
+        self.progressBar_2 = QtGui.QProgressBar(self.groupBox)
+        self.progressBar_2.setProperty("value", 24)
+        self.progressBar_2.setObjectName(_fromUtf8("progressBar_2"))
+        self.gridLayout_2.addWidget(self.progressBar_2, 1, 1, 1, 1)
+        self.label_11 = QtGui.QLabel(self.groupBox)
+        self.label_11.setObjectName(_fromUtf8("label_11"))
+        self.gridLayout_2.addWidget(self.label_11, 2, 0, 1, 1)
+        self.progressBar_3 = QtGui.QProgressBar(self.groupBox)
+        self.progressBar_3.setProperty("value", 24)
+        self.progressBar_3.setObjectName(_fromUtf8("progressBar_3"))
+        self.gridLayout_2.addWidget(self.progressBar_3, 2, 1, 1, 1)
+        self.gridLayout_4.addWidget(self.groupBox, 0, 0, 1, 1)
+        self.groupBox_2 = QtGui.QGroupBox(Dialog)
+        self.groupBox_2.setObjectName(_fromUtf8("groupBox_2"))
+        self.gridLayout = QtGui.QGridLayout(self.groupBox_2)
+        self.gridLayout.setObjectName(_fromUtf8("gridLayout"))
+        self.label = QtGui.QLabel(self.groupBox_2)
+        self.label.setObjectName(_fromUtf8("label"))
+        self.gridLayout.addWidget(self.label, 0, 0, 1, 1)
+        self.lineEdit = QtGui.QLineEdit(self.groupBox_2)
+        self.lineEdit.setObjectName(_fromUtf8("lineEdit"))
+        self.gridLayout.addWidget(self.lineEdit, 0, 1, 1, 1)
+        self.label_2 = QtGui.QLabel(self.groupBox_2)
+        self.label_2.setObjectName(_fromUtf8("label_2"))
+        self.gridLayout.addWidget(self.label_2, 0, 2, 1, 1)
+        self.lineEdit_2 = QtGui.QLineEdit(self.groupBox_2)
+        self.lineEdit_2.setObjectName(_fromUtf8("lineEdit_2"))
+        self.gridLayout.addWidget(self.lineEdit_2, 0, 3, 1, 1)
+        self.label_3 = QtGui.QLabel(self.groupBox_2)
+        self.label_3.setObjectName(_fromUtf8("label_3"))
+        self.gridLayout.addWidget(self.label_3, 0, 4, 1, 1)
+        self.label_5 = QtGui.QLabel(self.groupBox_2)
+        self.label_5.setObjectName(_fromUtf8("label_5"))
+        self.gridLayout.addWidget(self.label_5, 1, 0, 1, 1)
+        self.lineEdit_3 = QtGui.QLineEdit(self.groupBox_2)
+        self.lineEdit_3.setObjectName(_fromUtf8("lineEdit_3"))
+        self.gridLayout.addWidget(self.lineEdit_3, 1, 1, 1, 1)
+        self.label_6 = QtGui.QLabel(self.groupBox_2)
+        self.label_6.setObjectName(_fromUtf8("label_6"))
+        self.gridLayout.addWidget(self.label_6, 1, 2, 1, 1)
+        self.lineEdit_4 = QtGui.QLineEdit(self.groupBox_2)
+        self.lineEdit_4.setObjectName(_fromUtf8("lineEdit_4"))
+        self.gridLayout.addWidget(self.lineEdit_4, 1, 3, 1, 1)
+        self.label_4 = QtGui.QLabel(self.groupBox_2)
+        self.label_4.setObjectName(_fromUtf8("label_4"))
+        self.gridLayout.addWidget(self.label_4, 1, 4, 1, 1)
+        self.label_8 = QtGui.QLabel(self.groupBox_2)
+        self.label_8.setObjectName(_fromUtf8("label_8"))
+        self.gridLayout.addWidget(self.label_8, 2, 0, 1, 1)
+        self.lineEdit_5 = QtGui.QLineEdit(self.groupBox_2)
+        self.lineEdit_5.setObjectName(_fromUtf8("lineEdit_5"))
+        self.gridLayout.addWidget(self.lineEdit_5, 2, 1, 1, 1)
+        self.label_9 = QtGui.QLabel(self.groupBox_2)
+        self.label_9.setObjectName(_fromUtf8("label_9"))
+        self.gridLayout.addWidget(self.label_9, 2, 2, 1, 1)
+        self.lineEdit_6 = QtGui.QLineEdit(self.groupBox_2)
+        self.lineEdit_6.setObjectName(_fromUtf8("lineEdit_6"))
+        self.gridLayout.addWidget(self.lineEdit_6, 2, 3, 1, 1)
+        self.label_7 = QtGui.QLabel(self.groupBox_2)
+        self.label_7.setObjectName(_fromUtf8("label_7"))
+        self.gridLayout.addWidget(self.label_7, 2, 4, 1, 1)
+        self.gridLayout_4.addWidget(self.groupBox_2, 1, 0, 1, 1)
+        self.groupBox_3 = QtGui.QGroupBox(Dialog)
+        self.groupBox_3.setObjectName(_fromUtf8("groupBox_3"))
+        self.gridLayout_3 = QtGui.QGridLayout(self.groupBox_3)
+        self.gridLayout_3.setObjectName(_fromUtf8("gridLayout_3"))
+        self.lblWarning = QtGui.QLabel(self.groupBox_3)
+        self.lblWarning.setAlignment(QtCore.Qt.AlignLeading|QtCore.Qt.AlignLeft|QtCore.Qt.AlignTop)
+        self.lblWarning.setObjectName(_fromUtf8("lblWarning"))
+        self.gridLayout_3.addWidget(self.lblWarning, 0, 0, 1, 1)
+        self.gridLayout_4.addWidget(self.groupBox_3, 2, 0, 1, 1)
+        self.buttonBox = QtGui.QDialogButtonBox(Dialog)
+        self.buttonBox.setOrientation(QtCore.Qt.Horizontal)
+        self.buttonBox.setStandardButtons(QtGui.QDialogButtonBox.Ok)
+        self.buttonBox.setObjectName(_fromUtf8("buttonBox"))
+        self.gridLayout_4.addWidget(self.buttonBox, 3, 0, 1, 1)
+
+        self.retranslateUi(Dialog)
+        QtCore.QObject.connect(self.buttonBox, QtCore.SIGNAL(_fromUtf8("accepted()")), Dialog.accept)
+        QtCore.QObject.connect(self.buttonBox, QtCore.SIGNAL(_fromUtf8("rejected()")), Dialog.reject)
+        QtCore.QMetaObject.connectSlotsByName(Dialog)
+
+    def retranslateUi(self, Dialog):
+        Dialog.setWindowTitle(_translate("Dialog", "Dialog", None))
+        self.groupBox.setTitle(_translate("Dialog", "Invariant chart", None))
+        self.label_12.setText(_translate("Dialog", "Q* from Low-Q", None))
+        self.label_10.setText(_translate("Dialog", "Q* from Data", None))
+        self.label_11.setText(_translate("Dialog", "Q* from High-Q", None))
+        self.groupBox_2.setTitle(_translate("Dialog", "Numerical values", None))
+        self.label.setText(_translate("Dialog", "Q* from Low-Q", None))
+        self.label_2.setText(_translate("Dialog", "+/-", None))
+        self.label_3.setText(_translate("Dialog", "<html><head/><body><p>[1/(cm*A<span style=\" vertical-align:super;\">3</span>)]</p></body></html>", None))
+        self.label_5.setText(_translate("Dialog", "Q* from Data", None))
+        self.label_6.setText(_translate("Dialog", "+/-", None))
+        self.label_4.setText(_translate("Dialog", "<html><head/><body><p>[1/(cm*A<span style=\" vertical-align:super;\">3</span>)]</p></body></html>", None))
+        self.label_8.setText(_translate("Dialog", "Q* from High-Q", None))
+        self.label_9.setText(_translate("Dialog", "+/-", None))
+        self.label_7.setText(_translate("Dialog", "<html><head/><body><p>[1/(cm*A<span style=\" vertical-align:super;\">3</span>)]</p></body></html>", None))
+        self.groupBox_3.setTitle(_translate("Dialog", "Warnings", None))
+        self.lblWarning.setText(_translate("Dialog", "<html><head/><body><p>No Details on calculations available...</p></body></html>", None))
+
+
+class Dialog(QtGui.QDialog, Ui_Dialog):
+    def __init__(self, parent=None, f=QtCore.Qt.WindowFlags()):
+        QtGui.QDialog.__init__(self, parent, f)
+
+        self.setupUi(self)
+
Index: src/sas/qtgui/Perspectives/Invariant/UI/InvariantDetailsUI.ui
===================================================================
--- src/sas/qtgui/Perspectives/Invariant/UI/InvariantDetailsUI.ui	(revision f721030e66e61dc6279aa8e024da03b25f8e0d42)
+++ src/sas/qtgui/Perspectives/Invariant/UI/InvariantDetailsUI.ui	(revision f721030e66e61dc6279aa8e024da03b25f8e0d42)
@@ -0,0 +1,224 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<ui version="4.0">
+ <class>Dialog</class>
+ <widget class="QDialog" name="Dialog">
+  <property name="geometry">
+   <rect>
+    <x>0</x>
+    <y>0</y>
+    <width>449</width>
+    <height>458</height>
+   </rect>
+  </property>
+  <property name="windowTitle">
+   <string>Dialog</string>
+  </property>
+  <layout class="QGridLayout" name="gridLayout_4">
+   <item row="0" column="0">
+    <widget class="QGroupBox" name="groupBox">
+     <property name="title">
+      <string>Invariant chart</string>
+     </property>
+     <layout class="QGridLayout" name="gridLayout_2">
+      <item row="0" column="0">
+       <widget class="QLabel" name="label_12">
+        <property name="text">
+         <string>Q* from Low-Q</string>
+        </property>
+       </widget>
+      </item>
+      <item row="0" column="1">
+       <widget class="QProgressBar" name="progressBar">
+        <property name="value">
+         <number>24</number>
+        </property>
+       </widget>
+      </item>
+      <item row="1" column="0">
+       <widget class="QLabel" name="label_10">
+        <property name="text">
+         <string>Q* from Data</string>
+        </property>
+       </widget>
+      </item>
+      <item row="1" column="1">
+       <widget class="QProgressBar" name="progressBar_2">
+        <property name="value">
+         <number>24</number>
+        </property>
+       </widget>
+      </item>
+      <item row="2" column="0">
+       <widget class="QLabel" name="label_11">
+        <property name="text">
+         <string>Q* from High-Q</string>
+        </property>
+       </widget>
+      </item>
+      <item row="2" column="1">
+       <widget class="QProgressBar" name="progressBar_3">
+        <property name="value">
+         <number>24</number>
+        </property>
+       </widget>
+      </item>
+     </layout>
+    </widget>
+   </item>
+   <item row="1" column="0">
+    <widget class="QGroupBox" name="groupBox_2">
+     <property name="title">
+      <string>Numerical values</string>
+     </property>
+     <layout class="QGridLayout" name="gridLayout">
+      <item row="0" column="0">
+       <widget class="QLabel" name="label">
+        <property name="text">
+         <string>Q* from Low-Q</string>
+        </property>
+       </widget>
+      </item>
+      <item row="0" column="1">
+       <widget class="QLineEdit" name="lineEdit"/>
+      </item>
+      <item row="0" column="2">
+       <widget class="QLabel" name="label_2">
+        <property name="text">
+         <string>+/-</string>
+        </property>
+       </widget>
+      </item>
+      <item row="0" column="3">
+       <widget class="QLineEdit" name="lineEdit_2"/>
+      </item>
+      <item row="0" column="4">
+       <widget class="QLabel" name="label_3">
+        <property name="text">
+         <string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;[1/(cm*A&lt;span style=&quot; vertical-align:super;&quot;&gt;3&lt;/span&gt;)]&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
+        </property>
+       </widget>
+      </item>
+      <item row="1" column="0">
+       <widget class="QLabel" name="label_5">
+        <property name="text">
+         <string>Q* from Data</string>
+        </property>
+       </widget>
+      </item>
+      <item row="1" column="1">
+       <widget class="QLineEdit" name="lineEdit_3"/>
+      </item>
+      <item row="1" column="2">
+       <widget class="QLabel" name="label_6">
+        <property name="text">
+         <string>+/-</string>
+        </property>
+       </widget>
+      </item>
+      <item row="1" column="3">
+       <widget class="QLineEdit" name="lineEdit_4"/>
+      </item>
+      <item row="1" column="4">
+       <widget class="QLabel" name="label_4">
+        <property name="text">
+         <string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;[1/(cm*A&lt;span style=&quot; vertical-align:super;&quot;&gt;3&lt;/span&gt;)]&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
+        </property>
+       </widget>
+      </item>
+      <item row="2" column="0">
+       <widget class="QLabel" name="label_8">
+        <property name="text">
+         <string>Q* from High-Q</string>
+        </property>
+       </widget>
+      </item>
+      <item row="2" column="1">
+       <widget class="QLineEdit" name="lineEdit_5"/>
+      </item>
+      <item row="2" column="2">
+       <widget class="QLabel" name="label_9">
+        <property name="text">
+         <string>+/-</string>
+        </property>
+       </widget>
+      </item>
+      <item row="2" column="3">
+       <widget class="QLineEdit" name="lineEdit_6"/>
+      </item>
+      <item row="2" column="4">
+       <widget class="QLabel" name="label_7">
+        <property name="text">
+         <string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;[1/(cm*A&lt;span style=&quot; vertical-align:super;&quot;&gt;3&lt;/span&gt;)]&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
+        </property>
+       </widget>
+      </item>
+     </layout>
+    </widget>
+   </item>
+   <item row="2" column="0">
+    <widget class="QGroupBox" name="groupBox_3">
+     <property name="title">
+      <string>Warnings</string>
+     </property>
+     <layout class="QGridLayout" name="gridLayout_3">
+      <item row="0" column="0">
+       <widget class="QLabel" name="lblWarning">
+        <property name="text">
+         <string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;No Details on calculations available...&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
+        </property>
+        <property name="alignment">
+         <set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop</set>
+        </property>
+       </widget>
+      </item>
+     </layout>
+    </widget>
+   </item>
+   <item row="3" column="0">
+    <widget class="QDialogButtonBox" name="buttonBox">
+     <property name="orientation">
+      <enum>Qt::Horizontal</enum>
+     </property>
+     <property name="standardButtons">
+      <set>QDialogButtonBox::Ok</set>
+     </property>
+    </widget>
+   </item>
+  </layout>
+ </widget>
+ <resources/>
+ <connections>
+  <connection>
+   <sender>buttonBox</sender>
+   <signal>accepted()</signal>
+   <receiver>Dialog</receiver>
+   <slot>accept()</slot>
+   <hints>
+    <hint type="sourcelabel">
+     <x>248</x>
+     <y>254</y>
+    </hint>
+    <hint type="destinationlabel">
+     <x>157</x>
+     <y>274</y>
+    </hint>
+   </hints>
+  </connection>
+  <connection>
+   <sender>buttonBox</sender>
+   <signal>rejected()</signal>
+   <receiver>Dialog</receiver>
+   <slot>reject()</slot>
+   <hints>
+    <hint type="sourcelabel">
+     <x>316</x>
+     <y>260</y>
+    </hint>
+    <hint type="destinationlabel">
+     <x>286</x>
+     <y>274</y>
+    </hint>
+   </hints>
+  </connection>
+ </connections>
+</ui>
Index: src/sas/qtgui/Perspectives/Invariant/UI/TabbedInvariantUI.py
===================================================================
--- src/sas/qtgui/Perspectives/Invariant/UI/TabbedInvariantUI.py	(revision f721030e66e61dc6279aa8e024da03b25f8e0d42)
+++ src/sas/qtgui/Perspectives/Invariant/UI/TabbedInvariantUI.py	(revision f721030e66e61dc6279aa8e024da03b25f8e0d42)
@@ -0,0 +1,383 @@
+# -*- coding: utf-8 -*-
+
+# Form implementation generated from reading ui file 'TabbedInvariantUI.ui'
+#
+# Created by: PyQt4 UI code generator 4.11.4
+#
+# WARNING! All changes made in this file will be lost!
+
+from PyQt4 import QtCore, QtGui
+
+try:
+    _fromUtf8 = QtCore.QString.fromUtf8
+except AttributeError:
+    def _fromUtf8(s):
+        return s
+
+try:
+    _encoding = QtGui.QApplication.UnicodeUTF8
+    def _translate(context, text, disambig):
+        return QtGui.QApplication.translate(context, text, disambig, _encoding)
+except AttributeError:
+    def _translate(context, text, disambig):
+        return QtGui.QApplication.translate(context, text, disambig)
+
+class Ui_tabbedInvariantUI(object):
+    def setupUi(self, tabbedInvariantUI):
+        tabbedInvariantUI.setObjectName(_fromUtf8("tabbedInvariantUI"))
+        tabbedInvariantUI.resize(465, 408)
+        icon = QtGui.QIcon()
+        icon.addPixmap(QtGui.QPixmap(_fromUtf8(":/res/ball.ico")), QtGui.QIcon.Normal, QtGui.QIcon.Off)
+        tabbedInvariantUI.setWindowIcon(icon)
+        self.gridLayout_11 = QtGui.QGridLayout(tabbedInvariantUI)
+        self.gridLayout_11.setObjectName(_fromUtf8("gridLayout_11"))
+        self.tabWidget = QtGui.QTabWidget(tabbedInvariantUI)
+        self.tabWidget.setObjectName(_fromUtf8("tabWidget"))
+        self.tabMain = QtGui.QWidget()
+        self.tabMain.setObjectName(_fromUtf8("tabMain"))
+        self.gridLayout_9 = QtGui.QGridLayout(self.tabMain)
+        self.gridLayout_9.setObjectName(_fromUtf8("gridLayout_9"))
+        self.groupBox = QtGui.QGroupBox(self.tabMain)
+        self.groupBox.setObjectName(_fromUtf8("groupBox"))
+        self.gridLayout_2 = QtGui.QGridLayout(self.groupBox)
+        self.gridLayout_2.setObjectName(_fromUtf8("gridLayout_2"))
+        self.horizontalLayout_4 = QtGui.QHBoxLayout()
+        self.horizontalLayout_4.setObjectName(_fromUtf8("horizontalLayout_4"))
+        self.label = QtGui.QLabel(self.groupBox)
+        self.label.setObjectName(_fromUtf8("label"))
+        self.horizontalLayout_4.addWidget(self.label)
+        self.lineEdit = QtGui.QLineEdit(self.groupBox)
+        self.lineEdit.setEnabled(False)
+        self.lineEdit.setReadOnly(False)
+        self.lineEdit.setObjectName(_fromUtf8("lineEdit"))
+        self.horizontalLayout_4.addWidget(self.lineEdit)
+        self.gridLayout_2.addLayout(self.horizontalLayout_4, 0, 0, 1, 1)
+        self.groupBox_2 = QtGui.QGroupBox(self.groupBox)
+        self.groupBox_2.setObjectName(_fromUtf8("groupBox_2"))
+        self.gridLayout = QtGui.QGridLayout(self.groupBox_2)
+        self.gridLayout.setObjectName(_fromUtf8("gridLayout"))
+        self.horizontalLayout = QtGui.QHBoxLayout()
+        self.horizontalLayout.setObjectName(_fromUtf8("horizontalLayout"))
+        self.label_3 = QtGui.QLabel(self.groupBox_2)
+        self.label_3.setObjectName(_fromUtf8("label_3"))
+        self.horizontalLayout.addWidget(self.label_3)
+        self.lineEdit_2 = QtGui.QLineEdit(self.groupBox_2)
+        self.lineEdit_2.setEnabled(False)
+        self.lineEdit_2.setObjectName(_fromUtf8("lineEdit_2"))
+        self.horizontalLayout.addWidget(self.lineEdit_2)
+        self.label_4 = QtGui.QLabel(self.groupBox_2)
+        self.label_4.setObjectName(_fromUtf8("label_4"))
+        self.horizontalLayout.addWidget(self.label_4)
+        self.lineEdit_3 = QtGui.QLineEdit(self.groupBox_2)
+        self.lineEdit_3.setEnabled(False)
+        self.lineEdit_3.setObjectName(_fromUtf8("lineEdit_3"))
+        self.horizontalLayout.addWidget(self.lineEdit_3)
+        self.label_2 = QtGui.QLabel(self.groupBox_2)
+        self.label_2.setObjectName(_fromUtf8("label_2"))
+        self.horizontalLayout.addWidget(self.label_2)
+        self.gridLayout.addLayout(self.horizontalLayout, 0, 0, 1, 1)
+        self.gridLayout_2.addWidget(self.groupBox_2, 1, 0, 1, 1)
+        self.gridLayout_9.addWidget(self.groupBox, 0, 0, 1, 1)
+        self.groupBox_7 = QtGui.QGroupBox(self.tabMain)
+        self.groupBox_7.setObjectName(_fromUtf8("groupBox_7"))
+        self.gridLayout_5 = QtGui.QGridLayout(self.groupBox_7)
+        self.gridLayout_5.setObjectName(_fromUtf8("gridLayout_5"))
+        self.label_21 = QtGui.QLabel(self.groupBox_7)
+        self.label_21.setObjectName(_fromUtf8("label_21"))
+        self.gridLayout_5.addWidget(self.label_21, 0, 0, 1, 1)
+        self.lineEdit_14 = QtGui.QLineEdit(self.groupBox_7)
+        self.lineEdit_14.setEnabled(True)
+        self.lineEdit_14.setReadOnly(True)
+        self.lineEdit_14.setObjectName(_fromUtf8("lineEdit_14"))
+        self.gridLayout_5.addWidget(self.lineEdit_14, 0, 1, 1, 1)
+        self.label_20 = QtGui.QLabel(self.groupBox_7)
+        self.label_20.setObjectName(_fromUtf8("label_20"))
+        self.gridLayout_5.addWidget(self.label_20, 0, 2, 1, 1)
+        self.lineEdit_15 = QtGui.QLineEdit(self.groupBox_7)
+        self.lineEdit_15.setEnabled(True)
+        self.lineEdit_15.setReadOnly(True)
+        self.lineEdit_15.setObjectName(_fromUtf8("lineEdit_15"))
+        self.gridLayout_5.addWidget(self.lineEdit_15, 0, 3, 1, 1)
+        self.label_22 = QtGui.QLabel(self.groupBox_7)
+        self.label_22.setObjectName(_fromUtf8("label_22"))
+        self.gridLayout_5.addWidget(self.label_22, 1, 0, 1, 1)
+        self.lineEdit_17 = QtGui.QLineEdit(self.groupBox_7)
+        self.lineEdit_17.setEnabled(True)
+        self.lineEdit_17.setReadOnly(True)
+        self.lineEdit_17.setObjectName(_fromUtf8("lineEdit_17"))
+        self.gridLayout_5.addWidget(self.lineEdit_17, 1, 1, 1, 1)
+        self.label_23 = QtGui.QLabel(self.groupBox_7)
+        self.label_23.setObjectName(_fromUtf8("label_23"))
+        self.gridLayout_5.addWidget(self.label_23, 1, 2, 1, 1)
+        self.lineEdit_16 = QtGui.QLineEdit(self.groupBox_7)
+        self.lineEdit_16.setEnabled(True)
+        self.lineEdit_16.setReadOnly(True)
+        self.lineEdit_16.setObjectName(_fromUtf8("lineEdit_16"))
+        self.gridLayout_5.addWidget(self.lineEdit_16, 1, 3, 1, 1)
+        self.label_24 = QtGui.QLabel(self.groupBox_7)
+        self.label_24.setObjectName(_fromUtf8("label_24"))
+        self.gridLayout_5.addWidget(self.label_24, 1, 4, 1, 1)
+        self.line = QtGui.QFrame(self.groupBox_7)
+        self.line.setFrameShape(QtGui.QFrame.HLine)
+        self.line.setFrameShadow(QtGui.QFrame.Sunken)
+        self.line.setObjectName(_fromUtf8("line"))
+        self.gridLayout_5.addWidget(self.line, 2, 0, 1, 5)
+        self.label_25 = QtGui.QLabel(self.groupBox_7)
+        self.label_25.setObjectName(_fromUtf8("label_25"))
+        self.gridLayout_5.addWidget(self.label_25, 3, 0, 1, 1)
+        self.lineEdit_19 = QtGui.QLineEdit(self.groupBox_7)
+        self.lineEdit_19.setEnabled(True)
+        self.lineEdit_19.setStyleSheet(_fromUtf8("background-color: rgb(253, 253, 126);"))
+        self.lineEdit_19.setReadOnly(True)
+        self.lineEdit_19.setObjectName(_fromUtf8("lineEdit_19"))
+        self.gridLayout_5.addWidget(self.lineEdit_19, 3, 1, 1, 1)
+        self.label_26 = QtGui.QLabel(self.groupBox_7)
+        self.label_26.setObjectName(_fromUtf8("label_26"))
+        self.gridLayout_5.addWidget(self.label_26, 3, 2, 1, 1)
+        self.lineEdit_18 = QtGui.QLineEdit(self.groupBox_7)
+        self.lineEdit_18.setEnabled(True)
+        self.lineEdit_18.setStyleSheet(_fromUtf8("background-color: rgb(253, 253, 126);"))
+        self.lineEdit_18.setReadOnly(True)
+        self.lineEdit_18.setObjectName(_fromUtf8("lineEdit_18"))
+        self.gridLayout_5.addWidget(self.lineEdit_18, 3, 3, 1, 1)
+        self.label_27 = QtGui.QLabel(self.groupBox_7)
+        self.label_27.setObjectName(_fromUtf8("label_27"))
+        self.gridLayout_5.addWidget(self.label_27, 3, 4, 1, 1)
+        self.gridLayout_9.addWidget(self.groupBox_7, 1, 0, 1, 1)
+        self.tabWidget.addTab(self.tabMain, _fromUtf8(""))
+        self.tabOptions = QtGui.QWidget()
+        self.tabOptions.setObjectName(_fromUtf8("tabOptions"))
+        self.gridLayout_6 = QtGui.QGridLayout(self.tabOptions)
+        self.gridLayout_6.setObjectName(_fromUtf8("gridLayout_6"))
+        self.groupBox_3 = QtGui.QGroupBox(self.tabOptions)
+        self.groupBox_3.setObjectName(_fromUtf8("groupBox_3"))
+        self.gridLayout_4 = QtGui.QGridLayout(self.groupBox_3)
+        self.gridLayout_4.setObjectName(_fromUtf8("gridLayout_4"))
+        self.gridLayout_3 = QtGui.QGridLayout()
+        self.gridLayout_3.setObjectName(_fromUtf8("gridLayout_3"))
+        self.label_5 = QtGui.QLabel(self.groupBox_3)
+        self.label_5.setObjectName(_fromUtf8("label_5"))
+        self.gridLayout_3.addWidget(self.label_5, 0, 0, 1, 1)
+        self.lineEdit_4 = QtGui.QLineEdit(self.groupBox_3)
+        self.lineEdit_4.setObjectName(_fromUtf8("lineEdit_4"))
+        self.gridLayout_3.addWidget(self.lineEdit_4, 0, 1, 1, 1)
+        self.label_8 = QtGui.QLabel(self.groupBox_3)
+        self.label_8.setObjectName(_fromUtf8("label_8"))
+        self.gridLayout_3.addWidget(self.label_8, 0, 2, 1, 1)
+        self.label_9 = QtGui.QLabel(self.groupBox_3)
+        self.label_9.setObjectName(_fromUtf8("label_9"))
+        self.gridLayout_3.addWidget(self.label_9, 0, 3, 1, 1)
+        self.lineEdit_6 = QtGui.QLineEdit(self.groupBox_3)
+        self.lineEdit_6.setObjectName(_fromUtf8("lineEdit_6"))
+        self.gridLayout_3.addWidget(self.lineEdit_6, 0, 4, 1, 1)
+        self.label_6 = QtGui.QLabel(self.groupBox_3)
+        self.label_6.setObjectName(_fromUtf8("label_6"))
+        self.gridLayout_3.addWidget(self.label_6, 1, 0, 1, 1)
+        self.lineEdit_5 = QtGui.QLineEdit(self.groupBox_3)
+        self.lineEdit_5.setObjectName(_fromUtf8("lineEdit_5"))
+        self.gridLayout_3.addWidget(self.lineEdit_5, 1, 1, 1, 1)
+        self.label_7 = QtGui.QLabel(self.groupBox_3)
+        self.label_7.setObjectName(_fromUtf8("label_7"))
+        self.gridLayout_3.addWidget(self.label_7, 1, 2, 1, 1)
+        self.label_10 = QtGui.QLabel(self.groupBox_3)
+        self.label_10.setObjectName(_fromUtf8("label_10"))
+        self.gridLayout_3.addWidget(self.label_10, 1, 3, 1, 1)
+        self.lineEdit_7 = QtGui.QLineEdit(self.groupBox_3)
+        self.lineEdit_7.setObjectName(_fromUtf8("lineEdit_7"))
+        self.gridLayout_3.addWidget(self.lineEdit_7, 1, 4, 1, 1)
+        self.label_11 = QtGui.QLabel(self.groupBox_3)
+        self.label_11.setObjectName(_fromUtf8("label_11"))
+        self.gridLayout_3.addWidget(self.label_11, 1, 5, 1, 1)
+        self.gridLayout_4.addLayout(self.gridLayout_3, 0, 0, 1, 1)
+        self.gridLayout_6.addWidget(self.groupBox_3, 0, 0, 1, 1)
+        self.groupBox_4 = QtGui.QGroupBox(self.tabOptions)
+        self.groupBox_4.setObjectName(_fromUtf8("groupBox_4"))
+        self.gridLayout_10 = QtGui.QGridLayout(self.groupBox_4)
+        self.gridLayout_10.setObjectName(_fromUtf8("gridLayout_10"))
+        self.horizontalLayout_2 = QtGui.QHBoxLayout()
+        self.horizontalLayout_2.setObjectName(_fromUtf8("horizontalLayout_2"))
+        self.label_12 = QtGui.QLabel(self.groupBox_4)
+        self.label_12.setObjectName(_fromUtf8("label_12"))
+        self.horizontalLayout_2.addWidget(self.label_12)
+        self.label_14 = QtGui.QLabel(self.groupBox_4)
+        self.label_14.setObjectName(_fromUtf8("label_14"))
+        self.horizontalLayout_2.addWidget(self.label_14)
+        self.lineEdit_8 = QtGui.QLineEdit(self.groupBox_4)
+        self.lineEdit_8.setEnabled(False)
+        self.lineEdit_8.setObjectName(_fromUtf8("lineEdit_8"))
+        self.horizontalLayout_2.addWidget(self.lineEdit_8)
+        self.label_13 = QtGui.QLabel(self.groupBox_4)
+        self.label_13.setObjectName(_fromUtf8("label_13"))
+        self.horizontalLayout_2.addWidget(self.label_13)
+        self.lineEdit_9 = QtGui.QLineEdit(self.groupBox_4)
+        self.lineEdit_9.setEnabled(False)
+        self.lineEdit_9.setObjectName(_fromUtf8("lineEdit_9"))
+        self.horizontalLayout_2.addWidget(self.lineEdit_9)
+        self.label_15 = QtGui.QLabel(self.groupBox_4)
+        self.label_15.setObjectName(_fromUtf8("label_15"))
+        self.horizontalLayout_2.addWidget(self.label_15)
+        self.gridLayout_10.addLayout(self.horizontalLayout_2, 0, 0, 1, 2)
+        self.groupBox_5 = QtGui.QGroupBox(self.groupBox_4)
+        self.groupBox_5.setObjectName(_fromUtf8("groupBox_5"))
+        self.gridLayout_7 = QtGui.QGridLayout(self.groupBox_5)
+        self.gridLayout_7.setObjectName(_fromUtf8("gridLayout_7"))
+        self.checkBox = QtGui.QCheckBox(self.groupBox_5)
+        self.checkBox.setObjectName(_fromUtf8("checkBox"))
+        self.gridLayout_7.addWidget(self.checkBox, 0, 0, 1, 1)
+        self.horizontalLayout_3 = QtGui.QHBoxLayout()
+        self.horizontalLayout_3.setObjectName(_fromUtf8("horizontalLayout_3"))
+        self.label_16 = QtGui.QLabel(self.groupBox_5)
+        self.label_16.setObjectName(_fromUtf8("label_16"))
+        self.horizontalLayout_3.addWidget(self.label_16)
+        self.lineEdit_10 = QtGui.QLineEdit(self.groupBox_5)
+        self.lineEdit_10.setObjectName(_fromUtf8("lineEdit_10"))
+        self.horizontalLayout_3.addWidget(self.lineEdit_10)
+        self.gridLayout_7.addLayout(self.horizontalLayout_3, 1, 0, 1, 1)
+        self.formLayout = QtGui.QFormLayout()
+        self.formLayout.setObjectName(_fromUtf8("formLayout"))
+        self.radioButton = QtGui.QRadioButton(self.groupBox_5)
+        self.radioButton.setObjectName(_fromUtf8("radioButton"))
+        self.formLayout.setWidget(0, QtGui.QFormLayout.LabelRole, self.radioButton)
+        self.radioButton_3 = QtGui.QRadioButton(self.groupBox_5)
+        self.radioButton_3.setObjectName(_fromUtf8("radioButton_3"))
+        self.formLayout.setWidget(0, QtGui.QFormLayout.FieldRole, self.radioButton_3)
+        self.radioButton_2 = QtGui.QRadioButton(self.groupBox_5)
+        self.radioButton_2.setObjectName(_fromUtf8("radioButton_2"))
+        self.formLayout.setWidget(1, QtGui.QFormLayout.LabelRole, self.radioButton_2)
+        self.radioButton_4 = QtGui.QRadioButton(self.groupBox_5)
+        self.radioButton_4.setObjectName(_fromUtf8("radioButton_4"))
+        self.formLayout.setWidget(1, QtGui.QFormLayout.FieldRole, self.radioButton_4)
+        self.gridLayout_7.addLayout(self.formLayout, 2, 0, 1, 1)
+        self.horizontalLayout_6 = QtGui.QHBoxLayout()
+        self.horizontalLayout_6.setObjectName(_fromUtf8("horizontalLayout_6"))
+        self.label_17 = QtGui.QLabel(self.groupBox_5)
+        self.label_17.setObjectName(_fromUtf8("label_17"))
+        self.horizontalLayout_6.addWidget(self.label_17)
+        self.lineEdit_11 = QtGui.QLineEdit(self.groupBox_5)
+        self.lineEdit_11.setObjectName(_fromUtf8("lineEdit_11"))
+        self.horizontalLayout_6.addWidget(self.lineEdit_11)
+        self.gridLayout_7.addLayout(self.horizontalLayout_6, 3, 0, 1, 1)
+        self.gridLayout_10.addWidget(self.groupBox_5, 1, 0, 1, 1)
+        self.groupBox_6 = QtGui.QGroupBox(self.groupBox_4)
+        self.groupBox_6.setObjectName(_fromUtf8("groupBox_6"))
+        self.gridLayout_8 = QtGui.QGridLayout(self.groupBox_6)
+        self.gridLayout_8.setObjectName(_fromUtf8("gridLayout_8"))
+        self.checkBox_2 = QtGui.QCheckBox(self.groupBox_6)
+        self.checkBox_2.setObjectName(_fromUtf8("checkBox_2"))
+        self.gridLayout_8.addWidget(self.checkBox_2, 0, 0, 1, 1)
+        self.horizontalLayout_5 = QtGui.QHBoxLayout()
+        self.horizontalLayout_5.setObjectName(_fromUtf8("horizontalLayout_5"))
+        self.label_18 = QtGui.QLabel(self.groupBox_6)
+        self.label_18.setObjectName(_fromUtf8("label_18"))
+        self.horizontalLayout_5.addWidget(self.label_18)
+        self.lineEdit_12 = QtGui.QLineEdit(self.groupBox_6)
+        self.lineEdit_12.setObjectName(_fromUtf8("lineEdit_12"))
+        self.horizontalLayout_5.addWidget(self.lineEdit_12)
+        self.gridLayout_8.addLayout(self.horizontalLayout_5, 1, 0, 1, 1)
+        self.formLayout_2 = QtGui.QFormLayout()
+        self.formLayout_2.setObjectName(_fromUtf8("formLayout_2"))
+        self.radioButton_7 = QtGui.QRadioButton(self.groupBox_6)
+        self.radioButton_7.setObjectName(_fromUtf8("radioButton_7"))
+        self.formLayout_2.setWidget(0, QtGui.QFormLayout.LabelRole, self.radioButton_7)
+        self.radioButton_8 = QtGui.QRadioButton(self.groupBox_6)
+        self.radioButton_8.setObjectName(_fromUtf8("radioButton_8"))
+        self.formLayout_2.setWidget(1, QtGui.QFormLayout.LabelRole, self.radioButton_8)
+        self.gridLayout_8.addLayout(self.formLayout_2, 2, 0, 1, 1)
+        self.horizontalLayout_7 = QtGui.QHBoxLayout()
+        self.horizontalLayout_7.setObjectName(_fromUtf8("horizontalLayout_7"))
+        self.label_19 = QtGui.QLabel(self.groupBox_6)
+        self.label_19.setObjectName(_fromUtf8("label_19"))
+        self.horizontalLayout_7.addWidget(self.label_19)
+        self.lineEdit_13 = QtGui.QLineEdit(self.groupBox_6)
+        self.lineEdit_13.setObjectName(_fromUtf8("lineEdit_13"))
+        self.horizontalLayout_7.addWidget(self.lineEdit_13)
+        self.gridLayout_8.addLayout(self.horizontalLayout_7, 3, 0, 1, 1)
+        self.gridLayout_10.addWidget(self.groupBox_6, 1, 1, 1, 1)
+        self.gridLayout_6.addWidget(self.groupBox_4, 1, 0, 1, 1)
+        self.tabWidget.addTab(self.tabOptions, _fromUtf8(""))
+        self.gridLayout_11.addWidget(self.tabWidget, 0, 0, 1, 1)
+        spacerItem = QtGui.QSpacerItem(20, 2, QtGui.QSizePolicy.Minimum, QtGui.QSizePolicy.Expanding)
+        self.gridLayout_11.addItem(spacerItem, 1, 0, 1, 1)
+        self.horizontalLayout_8 = QtGui.QHBoxLayout()
+        self.horizontalLayout_8.setObjectName(_fromUtf8("horizontalLayout_8"))
+        self.pushButton = QtGui.QPushButton(tabbedInvariantUI)
+        self.pushButton.setObjectName(_fromUtf8("pushButton"))
+        self.horizontalLayout_8.addWidget(self.pushButton)
+        spacerItem1 = QtGui.QSpacerItem(40, 20, QtGui.QSizePolicy.Expanding, QtGui.QSizePolicy.Minimum)
+        self.horizontalLayout_8.addItem(spacerItem1)
+        self.pushButton_2 = QtGui.QPushButton(tabbedInvariantUI)
+        self.pushButton_2.setObjectName(_fromUtf8("pushButton_2"))
+        self.horizontalLayout_8.addWidget(self.pushButton_2)
+        self.pushButton_3 = QtGui.QPushButton(tabbedInvariantUI)
+        self.pushButton_3.setObjectName(_fromUtf8("pushButton_3"))
+        self.horizontalLayout_8.addWidget(self.pushButton_3)
+        self.gridLayout_11.addLayout(self.horizontalLayout_8, 2, 0, 1, 1)
+
+        self.retranslateUi(tabbedInvariantUI)
+        self.tabWidget.setCurrentIndex(1)
+        QtCore.QMetaObject.connectSlotsByName(tabbedInvariantUI)
+
+    def retranslateUi(self, tabbedInvariantUI):
+        tabbedInvariantUI.setWindowTitle(_translate("tabbedInvariantUI", "Dialog", None))
+        self.groupBox.setTitle(_translate("tabbedInvariantUI", "I(q) data source", None))
+        self.label.setText(_translate("tabbedInvariantUI", "Name:", None))
+        self.groupBox_2.setTitle(_translate("tabbedInvariantUI", "Total Q range", None))
+        self.label_3.setText(_translate("tabbedInvariantUI", "Min:", None))
+        self.label_4.setText(_translate("tabbedInvariantUI", "Max:", None))
+        self.label_2.setText(_translate("tabbedInvariantUI", "<html><head/><body><p>Ã
+<span style=\" vertical-align:super;\">-1</span></p></body></html>", None))
+        self.groupBox_7.setTitle(_translate("tabbedInvariantUI", "Output", None))
+        self.label_21.setText(_translate("tabbedInvariantUI", "Volume fraction:", None))
+        self.label_20.setText(_translate("tabbedInvariantUI", "+/-", None))
+        self.label_22.setText(_translate("tabbedInvariantUI", "Specific Surface:", None))
+        self.label_23.setText(_translate("tabbedInvariantUI", "+/-", None))
+        self.label_24.setText(_translate("tabbedInvariantUI", "<html><head/><body><p>Ã
+<span style=\" vertical-align:super;\">-1</span></p></body></html>", None))
+        self.label_25.setText(_translate("tabbedInvariantUI", "Invariant Total [Q]:", None))
+        self.label_26.setText(_translate("tabbedInvariantUI", "+/-", None))
+        self.label_27.setText(_translate("tabbedInvariantUI", "<html><head/><body><p>(cm Ã
+<span style=\" vertical-align:super;\">3</span>)<span style=\" vertical-align:super;\">-1</span></p></body></html>", None))
+        self.tabWidget.setTabText(self.tabWidget.indexOf(self.tabMain), _translate("tabbedInvariantUI", "Invariant", None))
+        self.groupBox_3.setTitle(_translate("tabbedInvariantUI", "Customized input", None))
+        self.label_5.setText(_translate("tabbedInvariantUI", "Background:", None))
+        self.label_8.setText(_translate("tabbedInvariantUI", "<html><head/><body><p>cm<span style=\" vertical-align:super;\">-1</span></p></body></html>", None))
+        self.label_9.setText(_translate("tabbedInvariantUI", "Scale:", None))
+        self.label_6.setText(_translate("tabbedInvariantUI", "Contrast:", None))
+        self.label_7.setText(_translate("tabbedInvariantUI", "<html><head/><body><p>Ã
+<span style=\" vertical-align:super;\">-2</span></p></body></html>", None))
+        self.label_10.setText(_translate("tabbedInvariantUI", "<html><head/><body><p>Porod<br/>constant:</p></body></html>", None))
+        self.label_11.setText(_translate("tabbedInvariantUI", "<html><head/><body><p>(cm Ã
+<span style=\" vertical-align:super;\">4</span>)<span style=\" vertical-align:super;\">-1</span></p></body></html>", None))
+        self.groupBox_4.setTitle(_translate("tabbedInvariantUI", "Extrapolation", None))
+        self.label_12.setText(_translate("tabbedInvariantUI", "Q Range:", None))
+        self.label_14.setText(_translate("tabbedInvariantUI", "Min", None))
+        self.label_13.setText(_translate("tabbedInvariantUI", "Max", None))
+        self.label_15.setText(_translate("tabbedInvariantUI", "<html><head/><body><p>Ã
+<span style=\" vertical-align:super;\">-1</span></p></body></html>", None))
+        self.groupBox_5.setTitle(_translate("tabbedInvariantUI", "Low Q", None))
+        self.checkBox.setText(_translate("tabbedInvariantUI", "Enable Low-Q extrapolation", None))
+        self.label_16.setText(_translate("tabbedInvariantUI", "Npts:", None))
+        self.radioButton.setText(_translate("tabbedInvariantUI", "Guinier", None))
+        self.radioButton_3.setText(_translate("tabbedInvariantUI", "Fit", None))
+        self.radioButton_2.setText(_translate("tabbedInvariantUI", "Power law", None))
+        self.radioButton_4.setText(_translate("tabbedInvariantUI", "Fix", None))
+        self.label_17.setText(_translate("tabbedInvariantUI", "Power:", None))
+        self.groupBox_6.setTitle(_translate("tabbedInvariantUI", "High Q", None))
+        self.checkBox_2.setText(_translate("tabbedInvariantUI", "Enable High-Q extrapolation", None))
+        self.label_18.setText(_translate("tabbedInvariantUI", "Npts:", None))
+        self.radioButton_7.setText(_translate("tabbedInvariantUI", "Fit", None))
+        self.radioButton_8.setText(_translate("tabbedInvariantUI", "Fix", None))
+        self.label_19.setText(_translate("tabbedInvariantUI", "Power:", None))
+        self.tabWidget.setTabText(self.tabWidget.indexOf(self.tabOptions), _translate("tabbedInvariantUI", "Options", None))
+        self.pushButton.setText(_translate("tabbedInvariantUI", "Calculate", None))
+        self.pushButton_2.setText(_translate("tabbedInvariantUI", "Status", None))
+        self.pushButton_3.setText(_translate("tabbedInvariantUI", "Help", None))
+
+import main_resources_rc
+
+class tabbedInvariantUI(QtGui.QDialog, Ui_tabbedInvariantUI):
+    def __init__(self, parent=None, f=QtCore.Qt.WindowFlags()):
+        QtGui.QDialog.__init__(self, parent, f)
+
+        self.setupUi(self)
+
Index: src/sas/qtgui/Perspectives/Invariant/UI/TabbedInvariantUI.ui
===================================================================
--- src/sas/qtgui/Perspectives/Invariant/UI/TabbedInvariantUI.ui	(revision f721030e66e61dc6279aa8e024da03b25f8e0d42)
+++ src/sas/qtgui/Perspectives/Invariant/UI/TabbedInvariantUI.ui	(revision f721030e66e61dc6279aa8e024da03b25f8e0d42)
@@ -0,0 +1,588 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<ui version="4.0">
+ <class>tabbedInvariantUI</class>
+ <widget class="QDialog" name="tabbedInvariantUI">
+  <property name="geometry">
+   <rect>
+    <x>0</x>
+    <y>0</y>
+    <width>465</width>
+    <height>408</height>
+   </rect>
+  </property>
+  <property name="windowTitle">
+   <string>Dialog</string>
+  </property>
+  <property name="windowIcon">
+   <iconset resource="main_resources.qrc">
+    <normaloff>:/res/ball.ico</normaloff>:/res/ball.ico</iconset>
+  </property>
+  <layout class="QGridLayout" name="gridLayout_11">
+   <item row="0" column="0">
+    <widget class="QTabWidget" name="tabWidget">
+     <property name="currentIndex">
+      <number>0</number>
+     </property>
+     <widget class="QWidget" name="tabMain">
+      <attribute name="title">
+       <string>Invariant</string>
+      </attribute>
+      <layout class="QGridLayout" name="gridLayout_9">
+       <item row="0" column="0">
+        <widget class="QGroupBox" name="groupBox">
+         <property name="title">
+          <string>I(q) data source</string>
+         </property>
+         <layout class="QGridLayout" name="gridLayout_2">
+          <item row="0" column="0">
+           <layout class="QHBoxLayout" name="horizontalLayout_4">
+            <item>
+             <widget class="QLabel" name="label">
+              <property name="text">
+               <string>Name:</string>
+              </property>
+             </widget>
+            </item>
+            <item>
+             <widget class="QLineEdit" name="lineEdit">
+              <property name="enabled">
+               <bool>false</bool>
+              </property>
+              <property name="readOnly">
+               <bool>false</bool>
+              </property>
+             </widget>
+            </item>
+           </layout>
+          </item>
+          <item row="1" column="0">
+           <widget class="QGroupBox" name="groupBox_2">
+            <property name="title">
+             <string>Total Q range</string>
+            </property>
+            <layout class="QGridLayout" name="gridLayout">
+             <item row="0" column="0">
+              <layout class="QHBoxLayout" name="horizontalLayout">
+               <item>
+                <widget class="QLabel" name="label_3">
+                 <property name="text">
+                  <string>Min:</string>
+                 </property>
+                </widget>
+               </item>
+               <item>
+                <widget class="QLineEdit" name="lineEdit_2">
+                 <property name="enabled">
+                  <bool>false</bool>
+                 </property>
+                </widget>
+               </item>
+               <item>
+                <widget class="QLabel" name="label_4">
+                 <property name="text">
+                  <string>Max:</string>
+                 </property>
+                </widget>
+               </item>
+               <item>
+                <widget class="QLineEdit" name="lineEdit_3">
+                 <property name="enabled">
+                  <bool>false</bool>
+                 </property>
+                </widget>
+               </item>
+               <item>
+                <widget class="QLabel" name="label_2">
+                 <property name="text">
+                  <string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Ã
+&lt;span style=&quot; vertical-align:super;&quot;&gt;-1&lt;/span&gt;&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
+                 </property>
+                </widget>
+               </item>
+              </layout>
+             </item>
+            </layout>
+           </widget>
+          </item>
+         </layout>
+        </widget>
+       </item>
+       <item row="1" column="0">
+        <widget class="QGroupBox" name="groupBox_7">
+         <property name="title">
+          <string>Output</string>
+         </property>
+         <layout class="QGridLayout" name="gridLayout_5">
+          <item row="0" column="0">
+           <widget class="QLabel" name="label_21">
+            <property name="text">
+             <string>Volume fraction:</string>
+            </property>
+           </widget>
+          </item>
+          <item row="0" column="1">
+           <widget class="QLineEdit" name="lineEdit_14">
+            <property name="enabled">
+             <bool>true</bool>
+            </property>
+            <property name="readOnly">
+             <bool>true</bool>
+            </property>
+           </widget>
+          </item>
+          <item row="0" column="2">
+           <widget class="QLabel" name="label_20">
+            <property name="text">
+             <string>+/-</string>
+            </property>
+           </widget>
+          </item>
+          <item row="0" column="3">
+           <widget class="QLineEdit" name="lineEdit_15">
+            <property name="enabled">
+             <bool>true</bool>
+            </property>
+            <property name="readOnly">
+             <bool>true</bool>
+            </property>
+           </widget>
+          </item>
+          <item row="1" column="0">
+           <widget class="QLabel" name="label_22">
+            <property name="text">
+             <string>Specific Surface:</string>
+            </property>
+           </widget>
+          </item>
+          <item row="1" column="1">
+           <widget class="QLineEdit" name="lineEdit_17">
+            <property name="enabled">
+             <bool>true</bool>
+            </property>
+            <property name="readOnly">
+             <bool>true</bool>
+            </property>
+           </widget>
+          </item>
+          <item row="1" column="2">
+           <widget class="QLabel" name="label_23">
+            <property name="text">
+             <string>+/-</string>
+            </property>
+           </widget>
+          </item>
+          <item row="1" column="3">
+           <widget class="QLineEdit" name="lineEdit_16">
+            <property name="enabled">
+             <bool>true</bool>
+            </property>
+            <property name="readOnly">
+             <bool>true</bool>
+            </property>
+           </widget>
+          </item>
+          <item row="1" column="4">
+           <widget class="QLabel" name="label_24">
+            <property name="text">
+             <string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Ã
+&lt;span style=&quot; vertical-align:super;&quot;&gt;-1&lt;/span&gt;&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
+            </property>
+           </widget>
+          </item>
+          <item row="2" column="0" colspan="5">
+           <widget class="Line" name="line">
+            <property name="orientation">
+             <enum>Qt::Horizontal</enum>
+            </property>
+           </widget>
+          </item>
+          <item row="3" column="0">
+           <widget class="QLabel" name="label_25">
+            <property name="text">
+             <string>Invariant Total [Q]:</string>
+            </property>
+           </widget>
+          </item>
+          <item row="3" column="1">
+           <widget class="QLineEdit" name="lineEdit_19">
+            <property name="enabled">
+             <bool>true</bool>
+            </property>
+            <property name="styleSheet">
+             <string notr="true">background-color: rgb(253, 253, 126);</string>
+            </property>
+            <property name="readOnly">
+             <bool>true</bool>
+            </property>
+           </widget>
+          </item>
+          <item row="3" column="2">
+           <widget class="QLabel" name="label_26">
+            <property name="text">
+             <string>+/-</string>
+            </property>
+           </widget>
+          </item>
+          <item row="3" column="3">
+           <widget class="QLineEdit" name="lineEdit_18">
+            <property name="enabled">
+             <bool>true</bool>
+            </property>
+            <property name="styleSheet">
+             <string notr="true">background-color: rgb(253, 253, 126);</string>
+            </property>
+            <property name="readOnly">
+             <bool>true</bool>
+            </property>
+           </widget>
+          </item>
+          <item row="3" column="4">
+           <widget class="QLabel" name="label_27">
+            <property name="text">
+             <string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;(cm Ã
+&lt;span style=&quot; vertical-align:super;&quot;&gt;3&lt;/span&gt;)&lt;span style=&quot; vertical-align:super;&quot;&gt;-1&lt;/span&gt;&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
+            </property>
+           </widget>
+          </item>
+         </layout>
+        </widget>
+       </item>
+      </layout>
+     </widget>
+     <widget class="QWidget" name="tabOptions">
+      <attribute name="title">
+       <string>Options</string>
+      </attribute>
+      <layout class="QGridLayout" name="gridLayout_6">
+       <item row="0" column="0">
+        <widget class="QGroupBox" name="groupBox_3">
+         <property name="title">
+          <string>Customized input</string>
+         </property>
+         <layout class="QGridLayout" name="gridLayout_4">
+          <item row="0" column="0">
+           <layout class="QGridLayout" name="gridLayout_3">
+            <item row="0" column="0">
+             <widget class="QLabel" name="label_5">
+              <property name="text">
+               <string>Background:</string>
+              </property>
+             </widget>
+            </item>
+            <item row="0" column="1">
+             <widget class="QLineEdit" name="lineEdit_4"/>
+            </item>
+            <item row="0" column="2">
+             <widget class="QLabel" name="label_8">
+              <property name="text">
+               <string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;cm&lt;span style=&quot; vertical-align:super;&quot;&gt;-1&lt;/span&gt;&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
+              </property>
+             </widget>
+            </item>
+            <item row="0" column="3">
+             <widget class="QLabel" name="label_9">
+              <property name="text">
+               <string>Scale:</string>
+              </property>
+             </widget>
+            </item>
+            <item row="0" column="4">
+             <widget class="QLineEdit" name="lineEdit_6"/>
+            </item>
+            <item row="1" column="0">
+             <widget class="QLabel" name="label_6">
+              <property name="text">
+               <string>Contrast:</string>
+              </property>
+             </widget>
+            </item>
+            <item row="1" column="1">
+             <widget class="QLineEdit" name="lineEdit_5"/>
+            </item>
+            <item row="1" column="2">
+             <widget class="QLabel" name="label_7">
+              <property name="text">
+               <string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Ã
+&lt;span style=&quot; vertical-align:super;&quot;&gt;-2&lt;/span&gt;&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
+              </property>
+             </widget>
+            </item>
+            <item row="1" column="3">
+             <widget class="QLabel" name="label_10">
+              <property name="text">
+               <string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Porod&lt;br/&gt;constant:&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
+              </property>
+             </widget>
+            </item>
+            <item row="1" column="4">
+             <widget class="QLineEdit" name="lineEdit_7"/>
+            </item>
+            <item row="1" column="5">
+             <widget class="QLabel" name="label_11">
+              <property name="text">
+               <string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;(cm Ã
+&lt;span style=&quot; vertical-align:super;&quot;&gt;4&lt;/span&gt;)&lt;span style=&quot; vertical-align:super;&quot;&gt;-1&lt;/span&gt;&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
+              </property>
+             </widget>
+            </item>
+           </layout>
+          </item>
+         </layout>
+        </widget>
+       </item>
+       <item row="1" column="0">
+        <widget class="QGroupBox" name="groupBox_4">
+         <property name="title">
+          <string>Extrapolation</string>
+         </property>
+         <layout class="QGridLayout" name="gridLayout_10">
+          <item row="0" column="0" colspan="2">
+           <layout class="QHBoxLayout" name="horizontalLayout_2">
+            <item>
+             <widget class="QLabel" name="label_12">
+              <property name="text">
+               <string>Q Range:</string>
+              </property>
+             </widget>
+            </item>
+            <item>
+             <widget class="QLabel" name="label_14">
+              <property name="text">
+               <string>Min</string>
+              </property>
+             </widget>
+            </item>
+            <item>
+             <widget class="QLineEdit" name="lineEdit_8">
+              <property name="enabled">
+               <bool>false</bool>
+              </property>
+             </widget>
+            </item>
+            <item>
+             <widget class="QLabel" name="label_13">
+              <property name="text">
+               <string>Max</string>
+              </property>
+             </widget>
+            </item>
+            <item>
+             <widget class="QLineEdit" name="lineEdit_9">
+              <property name="enabled">
+               <bool>false</bool>
+              </property>
+             </widget>
+            </item>
+            <item>
+             <widget class="QLabel" name="label_15">
+              <property name="text">
+               <string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Ã
+&lt;span style=&quot; vertical-align:super;&quot;&gt;-1&lt;/span&gt;&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
+              </property>
+             </widget>
+            </item>
+           </layout>
+          </item>
+          <item row="1" column="0">
+           <widget class="QGroupBox" name="groupBox_5">
+            <property name="title">
+             <string>Low Q</string>
+            </property>
+            <layout class="QGridLayout" name="gridLayout_7">
+             <item row="0" column="0">
+              <widget class="QCheckBox" name="checkBox">
+               <property name="text">
+                <string>Enable Low-Q extrapolation</string>
+               </property>
+              </widget>
+             </item>
+             <item row="1" column="0">
+              <layout class="QHBoxLayout" name="horizontalLayout_3">
+               <item>
+                <widget class="QLabel" name="label_16">
+                 <property name="text">
+                  <string>Npts:</string>
+                 </property>
+                </widget>
+               </item>
+               <item>
+                <widget class="QLineEdit" name="lineEdit_10"/>
+               </item>
+              </layout>
+             </item>
+             <item row="2" column="0">
+              <layout class="QFormLayout" name="formLayout">
+               <item row="0" column="0">
+                <widget class="QRadioButton" name="radioButton">
+                 <property name="text">
+                  <string>Guinier</string>
+                 </property>
+                </widget>
+               </item>
+               <item row="0" column="1">
+                <widget class="QRadioButton" name="radioButton_3">
+                 <property name="text">
+                  <string>Fit</string>
+                 </property>
+                </widget>
+               </item>
+               <item row="1" column="0">
+                <widget class="QRadioButton" name="radioButton_2">
+                 <property name="text">
+                  <string>Power law</string>
+                 </property>
+                </widget>
+               </item>
+               <item row="1" column="1">
+                <widget class="QRadioButton" name="radioButton_4">
+                 <property name="text">
+                  <string>Fix</string>
+                 </property>
+                </widget>
+               </item>
+              </layout>
+             </item>
+             <item row="3" column="0">
+              <layout class="QHBoxLayout" name="horizontalLayout_6">
+               <item>
+                <widget class="QLabel" name="label_17">
+                 <property name="text">
+                  <string>Power:</string>
+                 </property>
+                </widget>
+               </item>
+               <item>
+                <widget class="QLineEdit" name="lineEdit_11"/>
+               </item>
+              </layout>
+             </item>
+            </layout>
+           </widget>
+          </item>
+          <item row="1" column="1">
+           <widget class="QGroupBox" name="groupBox_6">
+            <property name="title">
+             <string>High Q</string>
+            </property>
+            <layout class="QGridLayout" name="gridLayout_8">
+             <item row="0" column="0">
+              <widget class="QCheckBox" name="checkBox_2">
+               <property name="text">
+                <string>Enable High-Q extrapolation</string>
+               </property>
+              </widget>
+             </item>
+             <item row="1" column="0">
+              <layout class="QHBoxLayout" name="horizontalLayout_5">
+               <item>
+                <widget class="QLabel" name="label_18">
+                 <property name="text">
+                  <string>Npts:</string>
+                 </property>
+                </widget>
+               </item>
+               <item>
+                <widget class="QLineEdit" name="lineEdit_12"/>
+               </item>
+              </layout>
+             </item>
+             <item row="2" column="0">
+              <layout class="QFormLayout" name="formLayout_2">
+               <item row="0" column="0">
+                <widget class="QRadioButton" name="radioButton_7">
+                 <property name="text">
+                  <string>Fit</string>
+                 </property>
+                </widget>
+               </item>
+               <item row="1" column="0">
+                <widget class="QRadioButton" name="radioButton_8">
+                 <property name="text">
+                  <string>Fix</string>
+                 </property>
+                </widget>
+               </item>
+              </layout>
+             </item>
+             <item row="3" column="0">
+              <layout class="QHBoxLayout" name="horizontalLayout_7">
+               <item>
+                <widget class="QLabel" name="label_19">
+                 <property name="text">
+                  <string>Power:</string>
+                 </property>
+                </widget>
+               </item>
+               <item>
+                <widget class="QLineEdit" name="lineEdit_13"/>
+               </item>
+              </layout>
+             </item>
+            </layout>
+           </widget>
+          </item>
+         </layout>
+        </widget>
+       </item>
+      </layout>
+     </widget>
+    </widget>
+   </item>
+   <item row="1" column="0">
+    <spacer name="verticalSpacer">
+     <property name="orientation">
+      <enum>Qt::Vertical</enum>
+     </property>
+     <property name="sizeHint" stdset="0">
+      <size>
+       <width>20</width>
+       <height>2</height>
+      </size>
+     </property>
+    </spacer>
+   </item>
+   <item row="2" column="0">
+    <layout class="QHBoxLayout" name="horizontalLayout_8">
+     <item>
+      <widget class="QPushButton" name="pushButton">
+       <property name="text">
+        <string>Calculate</string>
+       </property>
+      </widget>
+     </item>
+     <item>
+      <spacer name="horizontalSpacer">
+       <property name="orientation">
+        <enum>Qt::Horizontal</enum>
+       </property>
+       <property name="sizeHint" stdset="0">
+        <size>
+         <width>40</width>
+         <height>20</height>
+        </size>
+       </property>
+      </spacer>
+     </item>
+     <item>
+      <widget class="QPushButton" name="pushButton_2">
+       <property name="text">
+        <string>Status</string>
+       </property>
+      </widget>
+     </item>
+     <item>
+      <widget class="QPushButton" name="pushButton_3">
+       <property name="text">
+        <string>Help</string>
+       </property>
+      </widget>
+     </item>
+    </layout>
+   </item>
+  </layout>
+ </widget>
+ <resources>
+  <include location="main_resources.qrc"/>
+ </resources>
+ <connections/>
+</ui>
Index: src/sas/qtgui/Perspectives/Invariant/UI/convert_ui.sh
===================================================================
--- src/sas/qtgui/Perspectives/Invariant/UI/convert_ui.sh	(revision f721030e66e61dc6279aa8e024da03b25f8e0d42)
+++ src/sas/qtgui/Perspectives/Invariant/UI/convert_ui.sh	(revision f721030e66e61dc6279aa8e024da03b25f8e0d42)
@@ -0,0 +1,1 @@
+pyuic.bat -w $1.ui > $1.py
