Index: guiframe/state_reader.py
===================================================================
--- guiframe/state_reader.py	(revision a07e72f8fb8281178797bf691b36e56274d8580b)
+++ guiframe/state_reader.py	(revision 5c4b6743f7da312106d80c6bed8f5384071df146)
@@ -39,5 +39,5 @@
 from lxml import etree
 import xml.dom.minidom
-from DataLoader.readers.cansas_reader import Reader as CansasReader
+
 has_converter = True
 try:
@@ -46,5 +46,5 @@
     has_converter = False
 
-CANSAS_NS = "cansas1d/1.0"
+STATE_NS = "State/1.0"
 
 def write_node(doc, parent, name, value, attr={}):
@@ -76,5 +76,5 @@
     :return: Element, or None
     """
-    nodes = node.xpath(location, namespaces={'ns': CANSAS_NS})
+    nodes = node.xpath(location, namespaces={'ns': STATE_NODE})
     
     if len(nodes)>0:
@@ -90,5 +90,5 @@
     :param node: node to start at
     """
-    nodes = node.xpath(location, namespaces={'ns': CANSAS_NS})
+    nodes = node.xpath(location, namespaces={'ns': STATE_NODE})
     
     value = None
@@ -99,5 +99,5 @@
         except:
             # Could not pass, skip and return None
-            msg = "cansas_reader.get_float: could not "
+            msg = "state_reader.get_float: could not "
             msg += " convert '%s' to float" % nodes[0].text
             logging.error(msg)
@@ -107,7 +107,7 @@
 
             
-class Reader1D(CansasReader):
+class Reader1D:
     """
-    Class to load cansas 1D XML files
+    read state of a plugin  and available data 
     
     :Dependencies:
@@ -125,5 +125,4 @@
     
     def __init__(self):
-        CansasReader.__init__(self)
         ## List of errors
         self.errors = []
@@ -155,5 +154,5 @@
                 
                 entry_list = root.xpath('/ns:SASroot/ns:SASentry',
-                                         namespaces={'ns': CANSAS_NS})
+                                         namespaces={'ns': STATE_NODE})
                 
                 for entry in entry_list:
@@ -196,5 +195,5 @@
         
         # Look up run number   
-        nodes = dom.xpath('ns:Run', namespaces={'ns': CANSAS_NS})
+        nodes = dom.xpath('ns:Run', namespaces={'ns': STATE_NODE})
         for item in nodes:    
             if item.text is not None:
@@ -210,5 +209,5 @@
 
         # Notes
-        note_list = dom.xpath('ns:SASnote', namespaces={'ns': CANSAS_NS})
+        note_list = dom.xpath('ns:SASnote', namespaces={'ns': STATE_NODE})
         for note in note_list:
             try:
@@ -218,5 +217,5 @@
                         data_info.notes.append(note_value)
             except:
-                err_mess = "cansas_reader.read: error processing"
+                err_mess = "state_reader.read: error processing"
                 err_mess += " entry notes\n  %s" % sys.exc_value
                 self.errors.append(err_mess)
@@ -238,5 +237,5 @@
         
         nodes = dom.xpath('ns:SASsample/ns:details', 
-                          namespaces={'ns': CANSAS_NS})
+                          namespaces={'ns': STATE_NODE})
         for item in nodes:
             try:
@@ -246,5 +245,5 @@
                         data_info.sample.details.append(detail_value)
             except:
-                err_mess = "cansas_reader.read: error processing "
+                err_mess = "state_reader.read: error processing "
                 err_mess += " sample details\n  %s" % sys.exc_value
                 self.errors.append(err_mess)
@@ -299,5 +298,5 @@
         # Collimation info ###################
         nodes = dom.xpath('ns:SASinstrument/ns:SAScollimation', 
-                          namespaces={'ns': CANSAS_NS})
+                          namespaces={'ns': STATE_NODE})
         for item in nodes:
             collim = Collimation()
@@ -307,5 +306,5 @@
             
             # Look for apertures
-            apert_list = item.xpath('ns:aperture', namespaces={'ns': CANSAS_NS})
+            apert_list = item.xpath('ns:aperture', namespaces={'ns': STATE_NODE})
             for apert in apert_list:
                 aperture =  Aperture()
@@ -331,5 +330,5 @@
         # Detector info ######################
         nodes = dom.xpath('ns:SASinstrument/ns:SASdetector',
-                           namespaces={'ns': CANSAS_NS})
+                           namespaces={'ns': STATE_NODE})
         for item in nodes:
             
@@ -373,5 +372,5 @@
 
         # Processes info ######################
-        nodes = dom.xpath('ns:SASprocess', namespaces={'ns': CANSAS_NS})
+        nodes = dom.xpath('ns:SASprocess', namespaces={'ns': STATE_NODE})
         for item in nodes:
             process = Process()
@@ -380,5 +379,5 @@
             self._store_content('ns:description', item, 'description', process)
             
-            term_list = item.xpath('ns:term', namespaces={'ns': CANSAS_NS})
+            term_list = item.xpath('ns:term', namespaces={'ns': STATE_NODE})
             for term in term_list:
                 try:
@@ -390,5 +389,5 @@
                         process.term.append(term_attr)
                 except:
-                    err_mess = "cansas_reader.read: error processing "
+                    err_mess = "state_reader.read: error processing "
                     err_mess += " process term\n  %s" % sys.exc_value
                     self.errors.append(err_mess)
@@ -396,5 +395,5 @@
             
             note_list = item.xpath('ns:SASprocessnote', 
-                                   namespaces={'ns': CANSAS_NS})
+                                   namespaces={'ns': STATE_NODE})
             for note in note_list:
                 if note.text is not None:
@@ -405,5 +404,5 @@
             
         # Data info ######################
-        nodes = dom.xpath('ns:SASdata', namespaces={'ns': CANSAS_NS})
+        nodes = dom.xpath('ns:SASdata', namespaces={'ns': STATE_NODE})
         if len(nodes) > 1:
             msg = "CanSAS reader is not compatible with multiple"
@@ -411,5 +410,5 @@
             raise RuntimeError, msg
         
-        nodes = dom.xpath('ns:SASdata/ns:Idata', namespaces={'ns': CANSAS_NS})
+        nodes = dom.xpath('ns:SASdata/ns:Idata', namespaces={'ns': STATE_NODE})
 
         x  = numpy.zeros(0)
@@ -634,6 +633,20 @@
                 write_node(doc, pt, "Idev", datainfo.dy[i],
                             {'unit':datainfo.y_unit})
-
-        
+        #data gui info
+        gui_info = doc.createElement("DataInfoGui")
+        
+        write_node(doc, gui_info, "group_id", 'group_id')
+        for item in datainfo.group_id:
+            write_node(doc, gui_info, "group_id", str(item))
+        write_node(doc, gui_info, "name", datainfo.name)
+        write_node(doc, gui_info, "id", datainfo.id)
+        write_node(doc, gui_info, "group_id", datainfo.groud_id)
+        write_node(doc, gui_info, "name", datainfo.name)
+        write_node(doc, gui_info, "is_data", datainfo.is_data)
+        write_node(doc, gui_info, "xtransform", datainfo.xtransform)
+        write_node(doc, gui_info, "scale", datainfo.scale)
+        write_node(doc, gui_info, "ytransform", datainfo.ytransform)
+        write_node(doc, gui_info, "path", datainfo.path)
+        node.appendChild(gui_info)
         # Sample info
         sample = doc.createElement("SASsample")
@@ -922,7 +935,7 @@
            
 
-class Reader2D(CansasReader):
+class Reader2D:
     """
-    Class to load a .fitv fitting file
+    Class to load a basic guiframe state
     """
     ## File type
@@ -1154,5 +1167,5 @@
         return doc, entry_node
    
-    def _parse_state(self, entry):
+    def _parse_state(self, entry, NODE_NAME= 'state'):
         """
         Read a fit result from an XML node
@@ -1166,5 +1179,5 @@
         # Locate the P(r) node
         try:
-            nodes = entry.xpath('ns:%s' % FITTING_NODE_NAME, namespaces={'ns': CANSAS_NS})
+            nodes = entry.xpath('ns:%s' % NODE_NAME, namespaces={'ns': STATE_NODE})
             if nodes !=[]:
                 # Create an empty state
@@ -1187,5 +1200,5 @@
         
         """
-        node = dom.xpath('ns:data_class', namespaces={'ns': CANSAS_NS})
+        node = dom.xpath('ns:data_class', namespaces={'ns': STATE_NODE})
         if not node or node[0].text.lstrip().rstrip() != "Data2D":
             return CansasReader._parse_entry(self, dom)
@@ -1198,5 +1211,5 @@
         
         # Look up run number   
-        nodes = dom.xpath('ns:Run', namespaces={'ns': CANSAS_NS})
+        nodes = dom.xpath('ns:Run', namespaces={'ns': STATE_NODE})
         for item in nodes:    
             if item.text is not None:
@@ -1211,5 +1224,5 @@
 
         # Notes
-        note_list = dom.xpath('ns:SASnote', namespaces={'ns': CANSAS_NS})
+        note_list = dom.xpath('ns:SASnote', namespaces={'ns': STATE_NODE})
         for note in note_list:
             try:
@@ -1219,5 +1232,5 @@
                         data_info.notes.append(note_value)
             except:
-                err_mess = "cansas_reader.read: error processing entry notes\n  %s" % sys.exc_value
+                err_mess = "state_reader.read: error processing entry notes\n  %s" % sys.exc_value
                 self.errors.append(err_mess)
                 logging.error(err_mess)
@@ -1237,5 +1250,5 @@
                      dom, 'temperature', data_info.sample)
         
-        nodes = dom.xpath('ns:SASsample/ns:details', namespaces={'ns': CANSAS_NS})
+        nodes = dom.xpath('ns:SASsample/ns:details', namespaces={'ns': STATE_NODE})
         for item in nodes:
             try:
@@ -1245,5 +1258,5 @@
                         data_info.sample.details.append(detail_value)
             except:
-                err_mess = "cansas_reader.read: error processing sample details\n  %s" % sys.exc_value
+                err_mess = "state_reader.read: error processing sample details\n  %s" % sys.exc_value
                 self.errors.append(err_mess)
                 logging.error(err_mess)
@@ -1296,5 +1309,5 @@
         
         # Collimation info ###################
-        nodes = dom.xpath('ns:SASinstrument/ns:SAScollimation', namespaces={'ns': CANSAS_NS})
+        nodes = dom.xpath('ns:SASinstrument/ns:SAScollimation', namespaces={'ns': STATE_NODE})
         for item in nodes:
             collim = Collimation()
@@ -1304,5 +1317,5 @@
             
             # Look for apertures
-            apert_list = item.xpath('ns:aperture', namespaces={'ns': CANSAS_NS})
+            apert_list = item.xpath('ns:aperture', namespaces={'ns': STATE_NODE})
             for apert in apert_list:
                 aperture =  Aperture()
@@ -1327,5 +1340,5 @@
         
         # Detector info ######################
-        nodes = dom.xpath('ns:SASinstrument/ns:SASdetector', namespaces={'ns': CANSAS_NS})
+        nodes = dom.xpath('ns:SASinstrument/ns:SASdetector', namespaces={'ns': STATE_NODE})
         for item in nodes:
             
@@ -1360,5 +1373,5 @@
 
         # Processes info ######################
-        nodes = dom.xpath('ns:SASprocess', namespaces={'ns': CANSAS_NS})
+        nodes = dom.xpath('ns:SASprocess', namespaces={'ns': STATE_NODE})
         for item in nodes:
             process = Process()
@@ -1367,5 +1380,5 @@
             self._store_content('ns:description', item, 'description', process)
             
-            term_list = item.xpath('ns:term', namespaces={'ns': CANSAS_NS})
+            term_list = item.xpath('ns:term', namespaces={'ns': STATE_NODE})
             for term in term_list:
                 try:
@@ -1377,9 +1390,9 @@
                         process.term.append(term_attr)
                 except:
-                    err_mess = "cansas_reader.read: error processing process term\n  %s" % sys.exc_value
+                    err_mess = "state_reader.read: error processing process term\n  %s" % sys.exc_value
                     self.errors.append(err_mess)
                     logging.error(err_mess)
             
-            note_list = item.xpath('ns:SASprocessnote', namespaces={'ns': CANSAS_NS})
+            note_list = item.xpath('ns:SASprocessnote', namespaces={'ns': STATE_NODE})
             for note in note_list:
                 if note.text is not None:
@@ -1390,5 +1403,5 @@
             
         # Data info ######################
-        nodes = dom.xpath('ns:SASdata', namespaces={'ns': CANSAS_NS})
+        nodes = dom.xpath('ns:SASdata', namespaces={'ns': STATE_NODE})
         if len(nodes)>1:
             raise RuntimeError, "CanSAS reader is not compatible with multiple SASdata entries"
@@ -1439,5 +1452,5 @@
                     # Specifying the namespace will take care of the file format version 
                     root = tree.getroot()
-                    entry_list = root.xpath('ns:SASentry', namespaces={'ns': CANSAS_NS})
+                    entry_list = root.xpath('ns:SASentry', namespaces={'ns': STATE_NODE})
                     for entry in entry_list:   
                         try:
@@ -1587,5 +1600,5 @@
     logging.basicConfig(level=logging.ERROR,
                         format='%(asctime)s %(levelname)s %(message)s',
-                        filename='cansas_reader.log',
+                        filename='state_reader.log',
                         filemode='w')
     reader = Reader()
