Changeset 058f6c3 in sasview for src


Ignore:
Timestamp:
Jun 22, 2018 2:33:42 PM (6 years ago)
Author:
krzywon
Branches:
master, magnetic_scatt, release-4.2.2, ticket-1009, ticket-1094-headless, ticket-1242-2d-resolution, ticket-1243, ticket-1249, unittest-saveload
Children:
8f882fe
Parents:
3bab401
Message:

Fixes for failing ascii, cansasXML, red2D, and sesans reader unit tests.

Location:
src/sas/sascalc/dataloader
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • src/sas/sascalc/dataloader/file_reader_base_class.py

    r3bab401 r058f6c3  
    308308        new_output = [] 
    309309        for data in self.output: 
     310            if data.isSesans: 
     311                new_output.append(data) 
     312                continue 
    310313            file_x_unit = data._xunit 
    311314            data_conv_x = Converter(file_x_unit) 
     
    333336                    message.format(default_q_unit) 
    334337                    data.errors.append(message) 
    335                 new_output.append(data) 
    336338            elif isinstance(data, Data2D): 
    337339                try: 
     
    356358                    message.format(default_q_unit) 
    357359                    data.errors.append(message) 
    358                 new_output.append(data) 
    359360            else: 
    360361                # TODO: Throw error of some sort... 
    361362                pass 
     363            new_output.append(data) 
    362364        self.output = new_output 
    363365 
  • src/sas/sascalc/dataloader/readers/cansas_reader.py

    r2469df7 r058f6c3  
    812812            node.append(point) 
    813813            self.write_node(point, "Q", datainfo.x[i], 
    814                             {'unit': datainfo.x_unit}) 
     814                            {'unit': datainfo._xunit}) 
    815815            if len(datainfo.y) >= i: 
    816816                self.write_node(point, "I", datainfo.y[i], 
    817                                 {'unit': datainfo.y_unit}) 
     817                                {'unit': datainfo._yunit}) 
    818818            if datainfo.dy is not None and len(datainfo.dy) > i: 
    819819                self.write_node(point, "Idev", datainfo.dy[i], 
    820                                 {'unit': datainfo.y_unit}) 
     820                                {'unit': datainfo._yunit}) 
    821821            if datainfo.dx is not None and len(datainfo.dx) > i: 
    822822                self.write_node(point, "Qdev", datainfo.dx[i], 
    823                                 {'unit': datainfo.x_unit}) 
     823                                {'unit': datainfo._xunit}) 
    824824            if datainfo.dxw is not None and len(datainfo.dxw) > i: 
    825825                self.write_node(point, "dQw", datainfo.dxw[i], 
    826                                 {'unit': datainfo.x_unit}) 
     826                                {'unit': datainfo._xunit}) 
    827827            if datainfo.dxl is not None and len(datainfo.dxl) > i: 
    828828                self.write_node(point, "dQl", datainfo.dxl[i], 
    829                                 {'unit': datainfo.x_unit}) 
     829                                {'unit': datainfo._xunit}) 
    830830        if datainfo.isSesans: 
    831831            sesans_attrib = {'x_axis': datainfo._xaxis, 
  • src/sas/sascalc/dataloader/readers/red2d_reader.py

    r3bab401 r058f6c3  
    317317 
    318318        # Units of axes 
    319         self.set_default_2d_units() 
     319        self.current_dataset = self.set_default_2d_units(self.current_dataset) 
    320320 
    321321        # Store loading process information 
Note: See TracChangeset for help on using the changeset viewer.