Ignore:
Timestamp:
Feb 28, 2017 11:17:19 AM (7 years ago)
Author:
GitHub <noreply@…>
Children:
13043af
Parents:
46f798f
git-author:
Jeff Krzywon <krzywon@…> (02/28/17 11:17:19)
git-committer:
GitHub <noreply@…> (02/28/17 11:17:19)
Message:

Revert "Sesans41"

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/sas/sascalc/dataloader/readers/cansas_reader.py

    rc221349 r0d64713  
    261261                # I and Q - 1D data 
    262262                elif tagname == 'I' and isinstance(self.current_dataset, plottable_1D): 
    263                     unit_list = unit.split("|") 
    264                     if len(unit_list) > 1: 
    265                         self.current_dataset.yaxis(unit_list[0].strip(), 
    266                                                    unit_list[1].strip()) 
    267                     else: 
    268                         self.current_dataset.yaxis("Intensity", unit) 
     263                    self.current_dataset.yaxis("Intensity", unit) 
    269264                    self.current_dataset.y = np.append(self.current_dataset.y, data_point) 
    270265                elif tagname == 'Idev' and isinstance(self.current_dataset, plottable_1D): 
    271266                    self.current_dataset.dy = np.append(self.current_dataset.dy, data_point) 
    272267                elif tagname == 'Q': 
    273                     unit_list = unit.split("|") 
    274                     if len(unit_list) > 1: 
    275                         self.current_dataset.xaxis(unit_list[0].strip(), 
    276                                                    unit_list[1].strip()) 
    277                     else: 
    278                         self.current_dataset.xaxis("Q", unit) 
     268                    self.current_dataset.xaxis("Q", unit) 
    279269                    self.current_dataset.x = np.append(self.current_dataset.x, data_point) 
    280270                elif tagname == 'Qdev': 
     
    288278                elif tagname == 'Shadowfactor': 
    289279                    pass 
    290                 elif tagname == 'Sesans': 
    291                     self.current_datainfo.isSesans = bool(data_point) 
    292                 elif tagname == 'zacceptance': 
    293                     self.current_datainfo.sample.zacceptance = (data_point, unit) 
    294280 
    295281                # I and Qx, Qy - 2D data 
     
    10341020            node.append(point) 
    10351021            self.write_node(point, "Q", datainfo.x[i], 
    1036                             {'unit': datainfo._xaxis + " | " + datainfo._xunit}) 
     1022                            {'unit': datainfo.x_unit}) 
    10371023            if len(datainfo.y) >= i: 
    10381024                self.write_node(point, "I", datainfo.y[i], 
    1039                                 {'unit': datainfo._yaxis + " | " + datainfo._yunit}) 
     1025                                {'unit': datainfo.y_unit}) 
    10401026            if datainfo.dy is not None and len(datainfo.dy) > i: 
    10411027                self.write_node(point, "Idev", datainfo.dy[i], 
    1042                                 {'unit': datainfo._yaxis + " | " + datainfo._yunit}) 
     1028                                {'unit': datainfo.y_unit}) 
    10431029            if datainfo.dx is not None and len(datainfo.dx) > i: 
    10441030                self.write_node(point, "Qdev", datainfo.dx[i], 
    1045                                 {'unit': datainfo._xaxis + " | " + datainfo._xunit}) 
     1031                                {'unit': datainfo.x_unit}) 
    10461032            if datainfo.dxw is not None and len(datainfo.dxw) > i: 
    10471033                self.write_node(point, "dQw", datainfo.dxw[i], 
    1048                                 {'unit': datainfo._xaxis + " | " + datainfo._xunit}) 
     1034                                {'unit': datainfo.x_unit}) 
    10491035            if datainfo.dxl is not None and len(datainfo.dxl) > i: 
    10501036                self.write_node(point, "dQl", datainfo.dxl[i], 
    1051                                 {'unit': datainfo._xaxis + " | " + datainfo._xunit}) 
    1052         if datainfo.isSesans: 
    1053             sesans = self.create_element("Sesans") 
    1054             sesans.text = str(datainfo.isSesans) 
    1055             node.append(sesans) 
    1056             self.write_node(node, "zacceptance", datainfo.sample.zacceptance[0], 
    1057                              {'unit': datainfo.sample.zacceptance[1]}) 
    1058  
     1037                                {'unit': datainfo.x_unit}) 
    10591038 
    10601039    def _write_data_2d(self, datainfo, entry_node): 
Note: See TracChangeset for help on using the changeset viewer.