Index: invariantview/src/sans/perspectives/invariant/invariant_details.py
===================================================================
--- invariantview/src/sans/perspectives/invariant/invariant_details.py	(revision 7f1499668a369d91e2dec4a4e5f0c808b4ce119f)
+++ invariantview/src/sans/perspectives/invariant/invariant_details.py	(revision f6518f817fa58210f637b43907dd82c6040fb98b)
@@ -2,4 +2,5 @@
 import wx
 import sys
+
 import numpy
 from sans.guiframe.utils import format_number
@@ -116,23 +117,40 @@
             self.existing_warning = True
             msg = 'Error occurred when computing invariant from data.\n '
-      
+        if self.qstar_percent > 1:
+            self.existing_warning = True
+            msg += "Invariant Q  contribution is greater "
+            msg += "than 100% .\n"
         if self.qstar_low_percent == 'error':
             self.existing_warning = True
             msg = "Error occurred when computing extrapolated invariant"
             msg += " at low-Q region.\n"
-        elif self.qstar_low_percent is not None and \
-             self.qstar_low_percent >= 0.05:
-            self.existing_warning = True
-            msg += "Extrapolated contribution at Low Q is higher "
-            msg += "than 5% of the invariant.\n"
+        elif self.qstar_low_percent is not None :
+            if self.qstar_low_percent >= 0.05:
+                self.existing_warning = True
+                msg += "Extrapolated contribution at Low Q is higher "
+                msg += "than 5% of the invariant.\n"
+            elif self.qstar_low_percent < 0:
+                self.existing_warning = True
+                msg += "Extrapolated contribution at Low Q < 0.\n"
+            elif self.qstar_low_percent > 1:
+                self.existing_warning = True
+                msg += "Extrapolated contribution at Low Q is greater "
+                msg += "than 100% .\n"
         if self.qstar_high_percent == 'error':
             self.existing_warning = True
             msg += 'Error occurred when computing extrapolated'
             msg += ' invariant at high-Q region.\n'
-        elif self.qstar_high_percent is not None and \
-            self.qstar_high_percent >= 0.05:
-            self.existing_warning = True
-            msg += "Extrapolated contribution at High Q is higher "
-            msg += "than 5% of the invariant.\n"
+        elif self.qstar_high_percent is not None:
+            if self.qstar_high_percent >= 0.05:
+                self.existing_warning = True
+                msg += "Extrapolated contribution at High Q is higher "
+                msg += "than 5% of the invariant.\n"
+            elif self.qstar_high_percent < 0:
+                self.existing_warning = True
+                msg += "Extrapolated contribution at High Q < 0.\n"
+            elif self.qstar_high_percent > 1:
+                self.existing_warning = True
+                msg += "Extrapolated contribution at High Q is greater "
+                msg += "than 100% .\n"
         if (self.qstar_low_percent not in [None, "error"]) and \
             (self.qstar_high_percent not in [None, "error"])\
@@ -181,4 +199,5 @@
         self.extrapolation_color_low = wx.Colour(169,  169, 168, 128)
         self.extrapolation_color_high = wx.Colour(169,  169, 168, 128)
+        self.invariant_color = wx.Colour(67,  208,  128, 128)
         #change color of high and low bar when necessary
         self.set_color_bar()
@@ -386,5 +405,8 @@
                  scale = RECTANGLE_SCALE
                  return scale
-            scale = float(percentage) 
+            elif percentage < 0:
+                scale = RECTANGLE_SCALE
+                return scale
+            scale = float(percentage)
         except:
             scale = RECTANGLE_SCALE
@@ -398,9 +420,12 @@
         Change the color for low and high bar when necessary
         """
+        ERROR_COLOR = wx.Colour(255,  0, 0, 128)
         #warning to the user when the extrapolated invariant is greater than %5
-        if self.low_scale >= 0.05:
-            self.extrapolation_color_low = wx.Colour(255,  0, 0, 128)
-        if self.high_scale >= 0.05:
-            self.extrapolation_color_high = wx.Colour(255,  0, 0, 128)
+        if self.low_scale >= 0.05 or self.low_scale > 1 or self.low_scale < 0:
+            self.extrapolation_color_low = ERROR_COLOR 
+        if self.high_scale >= 0.05 or self.high_scale > 1 or self.high_scale < 0:
+            self.extrapolation_color_high = ERROR_COLOR 
+        if self.inv_scale >= 0.05 or self.inv_scale > 1 or self.inv_scale < 0:
+            self.invariant_color = ERROR_COLOR  
             
     def on_close(self, event):
@@ -434,5 +459,5 @@
         #Draw low rectangle
         gc.PushState()        
-        label = "Q* from Low-Q"
+        label = "Q* from Low-Q "
         PathFunc = gc.DrawPath
         w, h = gc.GetTextExtent(label)
@@ -460,5 +485,5 @@
         gc.PushState()    # save it again
         y_origine += 20         
-        gc.DrawText("Q* from Data", x_origine, y_origine)
+        gc.DrawText("Q* from Data ", x_origine, y_origine)
         # offset to the lower part of the window
         x_center = x_origine + RECTANGLE_WIDTH * self.inv_scale/2 + w + 10
@@ -466,5 +491,5 @@
         gc.Translate(x_center, y_center)
         # 128 == half transparent
-        gc.SetBrush(wx.Brush(wx.Colour(67,  208,  128, 128))) 
+        gc.SetBrush(wx.Brush(self.invariant_color)) 
         # Increase width by self.inv_scale
         if self.inv_percent is None:
@@ -484,5 +509,5 @@
         gc.PushState() 
         y_origine += 20 
-        gc.DrawText("Q* from High-Q", x_origine, y_origine) 
+        gc.DrawText("Q* from High-Q ", x_origine, y_origine) 
         #define the position of the new rectangle
         x_center = x_origine + RECTANGLE_WIDTH * self.high_scale/2 + w + 10
