Index: src/sas/sasgui/perspectives/fitting/pagestate.py
===================================================================
--- src/sas/sasgui/perspectives/fitting/pagestate.py	(revision 83c09af62d5011f226defc52e4715b83e6494e0f)
+++ src/sas/sasgui/perspectives/fitting/pagestate.py	(revision af08e55a12fe753ae7a904c4876a757795017deb)
@@ -1109,262 +1109,6 @@
         """
         node = dom.xpath('ns:data_class', namespaces={'ns': CANSAS_NS})
-        if not node or node[0].text.lstrip().rstrip() != "Data2D":
-            return_value, _ = self._parse_entry(dom)
-            numpy.trim_zeros(return_value.x)
-            numpy.trim_zeros(return_value.y)
-            numpy.trim_zeros(return_value.dy)
-            size_dx = return_value.dx.size
-            size_dxl = return_value.dxl.size
-            size_dxw = return_value.dxw.size
-            if size_dxl == 0 and size_dxw == 0:
-                return_value.dxl = None
-                return_value.dxw = None
-                numpy.trim_zeros(return_value.dx)
-            elif size_dx == 0:
-                return_value.dx = None
-                size_dx = size_dxl
-                numpy.trim_zeros(return_value.dxl)
-                numpy.trim_zeros(return_value.dxw)
-
-            return return_value, _
-
-        # Parse 2D
-        data_info = Data2D()
-
-        # Look up title
-        self._store_content('ns:Title', dom, 'title', data_info)
-
-        # Look up run number
-        nodes = dom.xpath('ns:Run', namespaces={'ns': CANSAS_NS})
-        for item in nodes:
-            if item.text is not None:
-                value = item.text.strip()
-                if len(value) > 0:
-                    data_info.run.append(value)
-                    if item.get('name') is not None:
-                        data_info.run_name[value] = item.get('name')
-
-        # Look up instrument name
-        self._store_content('ns:SASinstrument/ns:name', dom,
-                            'instrument', data_info)
-
-        # Notes
-        note_list = dom.xpath('ns:SASnote', namespaces={'ns': CANSAS_NS})
-        for note in note_list:
-            try:
-                if note.text is not None:
-                    note_value = note.text.strip()
-                    if len(note_value) > 0:
-                        data_info.notes.append(note_value)
-            except Exception:
-                err_mess = "cansas_reader.read: error processing entry notes\n"
-                err_mess += "  %s" % sys.exc_value
-                self.errors.append(err_mess)
-                logging.error(err_mess)
-
-        # Sample info ###################
-        entry = get_content('ns:SASsample', dom)
-        if entry is not None:
-            data_info.sample.name = entry.get('name')
-
-        self._store_content('ns:SASsample/ns:ID', dom, 'ID', data_info.sample)
-        self._store_float('ns:SASsample/ns:thickness', dom, 'thickness',
-                          data_info.sample)
-        self._store_float('ns:SASsample/ns:transmission', dom, 'transmission',
-                          data_info.sample)
-        self._store_float('ns:SASsample/ns:temperature', dom, 'temperature',
-                          data_info.sample)
-
-        nodes = dom.xpath('ns:SASsample/ns:details',
-                          namespaces={'ns': CANSAS_NS})
-        for item in nodes:
-            try:
-                if item.text is not None:
-                    detail_value = item.text.strip()
-                    if len(detail_value) > 0:
-                        data_info.sample.details.append(detail_value)
-            except Exception:
-                err_mess = "cansas_reader.read: error processing entry notes\n"
-                err_mess += "  %s" % sys.exc_value
-                self.errors.append(err_mess)
-                logging.error(err_mess)
-
-        # Position (as a vector)
-        self._store_float('ns:SASsample/ns:position/ns:x', dom, 'position.x',
-                          data_info.sample)
-        self._store_float('ns:SASsample/ns:position/ns:y', dom, 'position.y',
-                          data_info.sample)
-        self._store_float('ns:SASsample/ns:position/ns:z', dom, 'position.z',
-                          data_info.sample)
-
-        # Orientation (as a vector)
-        self._store_float('ns:SASsample/ns:orientation/ns:roll',
-                          dom, 'orientation.x', data_info.sample)
-        self._store_float('ns:SASsample/ns:orientation/ns:pitch',
-                          dom, 'orientation.y', data_info.sample)
-        self._store_float('ns:SASsample/ns:orientation/ns:yaw',
-                          dom, 'orientation.z', data_info.sample)
-
-        # Source info ###################
-        entry = get_content('ns:SASinstrument/ns:SASsource', dom)
-        if entry is not None:
-            data_info.source.name = entry.get('name')
-
-        self._store_content('ns:SASinstrument/ns:SASsource/ns:radiation',
-                            dom, 'radiation', data_info.source)
-        self._store_content('ns:SASinstrument/ns:SASsource/ns:beam_shape',
-                            dom, 'beam_shape', data_info.source)
-        self._store_float('ns:SASinstrument/ns:SASsource/ns:wavelength',
-                          dom, 'wavelength', data_info.source)
-        self._store_float('ns:SASinstrument/ns:SASsource/ns:wavelength_min',
-                          dom, 'wavelength_min', data_info.source)
-        self._store_float('ns:SASinstrument/ns:SASsource/ns:wavelength_max',
-                          dom, 'wavelength_max', data_info.source)
-        self._store_float('ns:SASinstrument/ns:SASsource/ns:wavelength_spread',
-                          dom, 'wavelength_spread', data_info.source)
-
-        # Beam size (as a vector)
-        entry = get_content('ns:SASinstrument/ns:SASsource/ns:beam_size', dom)
-        if entry is not None:
-            data_info.source.beam_size_name = entry.get('name')
-
-        self._store_float('ns:SASinstrument/ns:SASsource/ns:beam_size/ns:x',
-                          dom, 'beam_size.x', data_info.source)
-        self._store_float('ns:SASinstrument/ns:SASsource/ns:beam_size/ns:y',
-                          dom, 'beam_size.y', data_info.source)
-        self._store_float('ns:SASinstrument/ns:SASsource/ns:beam_size/ns:z',
-                          dom, 'beam_size.z', data_info.source)
-
-        # Collimation info ###################
-        nodes = dom.xpath('ns:SASinstrument/ns:SAScollimation',
-                          namespaces={'ns': CANSAS_NS})
-        for item in nodes:
-            collim = Collimation()
-            if item.get('name') is not None:
-                collim.name = item.get('name')
-            self._store_float('ns:length', item, 'length', collim)
-
-            # Look for apertures
-            apert_list = item.xpath('ns:aperture',
-                                    namespaces={'ns': CANSAS_NS})
-            for apert in apert_list:
-                aperture = Aperture()
-
-                # Get the name and type of the aperture
-                aperture.name = apert.get('name')
-                aperture.type = apert.get('type')
-
-                self._store_float('ns:distance', apert, 'distance', aperture)
-
-                entry = get_content('ns:size', apert)
-                if entry is not None:
-                    aperture.size_name = entry.get('name')
-
-                self._store_float('ns:size/ns:x', apert, 'size.x', aperture)
-                self._store_float('ns:size/ns:y', apert, 'size.y', aperture)
-                self._store_float('ns:size/ns:z', apert, 'size.z', aperture)
-
-                collim.aperture.append(aperture)
-
-            data_info.collimation.append(collim)
-
-        # Detector info ######################
-        nodes = dom.xpath('ns:SASinstrument/ns:SASdetector',
-                          namespaces={'ns': CANSAS_NS})
-        for item in nodes:
-
-            detector = Detector()
-
-            self._store_content('ns:name', item, 'name', detector)
-            self._store_float('ns:SDD', item, 'distance', detector)
-
-            # Detector offset (as a vector)
-            self._store_float('ns:offset/ns:x', item, 'offset.x', detector)
-            self._store_float('ns:offset/ns:y', item, 'offset.y', detector)
-            self._store_float('ns:offset/ns:z', item, 'offset.z', detector)
-
-            # Detector orientation (as a vector)
-            self._store_float('ns:orientation/ns:roll', item,
-                              'orientation.x', detector)
-            self._store_float('ns:orientation/ns:pitch', item,
-                              'orientation.y', detector)
-            self._store_float('ns:orientation/ns:yaw', item,
-                              'orientation.z', detector)
-
-            # Beam center (as a vector)
-            self._store_float('ns:beam_center/ns:x', item,
-                              'beam_center.x', detector)
-            self._store_float('ns:beam_center/ns:y', item,
-                              'beam_center.y', detector)
-            self._store_float('ns:beam_center/ns:z', item,
-                              'beam_center.z', detector)
-
-            # Pixel size (as a vector)
-            self._store_float('ns:pixel_size/ns:x', item,
-                              'pixel_size.x', detector)
-            self._store_float('ns:pixel_size/ns:y', item,
-                              'pixel_size.y', detector)
-            self._store_float('ns:pixel_size/ns:z', item,
-                              'pixel_size.z', detector)
-
-            self._store_float('ns:slit_length', item, 'slit_length', detector)
-
-            data_info.detector.append(detector)
-
-        # Processes info ######################
-        nodes = dom.xpath('ns:SASprocess', namespaces={'ns': CANSAS_NS})
-        for item in nodes:
-            process = Process()
-            self._store_content('ns:name', item, 'name', process)
-            self._store_content('ns:date', item, 'date', process)
-            self._store_content('ns:description', item, 'description', process)
-
-            term_list = item.xpath('ns:term', namespaces={'ns': CANSAS_NS})
-            for term in term_list:
-                try:
-                    term_attr = {}
-                    for attr in term.keys():
-                        term_attr[attr] = term.get(attr).strip()
-                    if term.text is not None:
-                        term_attr['value'] = term.text.strip()
-                        process.term.append(term_attr)
-                except:
-                    err_mess = "cansas_reader.read: error processing "
-                    err_mess += "entry notes\n  %s" % sys.exc_value
-                    self.errors.append(err_mess)
-                    logging.error(err_mess)
-
-            note_list = item.xpath('ns:SASprocessnote',
-                                   namespaces={'ns': CANSAS_NS})
-            for note in note_list:
-                if note.text is not None:
-                    process.notes.append(note.text.strip())
-
-            data_info.process.append(process)
-
-        # Data info ######################
-        nodes = dom.xpath('ns:SASdata', namespaces={'ns': CANSAS_NS})
-        if len(nodes) > 1:
-            raise RuntimeError, "CanSAS reader is not compatible with" + \
-                                " multiple SASdata entries"
-
-        for entry in nodes:
-            for item in LIST_OF_DATA_2D_ATTR:
-                # get node
-                node = get_content('ns:%s' % item[0], entry)
-                setattr(data_info, item[1], parse_entry_helper(node, item))
-
-            for item in LIST_OF_DATA_2D_VALUES:
-                field = get_content('ns:%s' % item[0], entry)
-                value_list = []
-                if field is not None:
-                    value_list = \
-                        [parse_entry_helper(node, item) for node in field]
-                if len(value_list) < 2:
-                    setattr(data_info, item[0], None)
-                else:
-                    setattr(data_info, item[0], numpy.array(value_list))
-
-        return data_info
+        return_value, _ = self._parse_entry(dom)
+        return return_value, _
 
     def _read_cansas(self, path):
