Changes in / [d4cde37:cc2cd5a] in sasview


Ignore:
Location:
src/sas/sascalc/dataloader
Files:
2 edited

Legend:

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

    re090ba90 r0e0c645  
    11911191        final_dataset.yaxis(data._yaxis, data._yunit) 
    11921192        final_dataset.zaxis(data._zaxis, data._zunit) 
    1193         final_dataset.y_bins = data.y_bins 
    1194         final_dataset.x_bins = data.x_bins 
    11951193    else: 
    11961194        return_string = ("Should Never Happen: _combine_data_info_with_plottabl" 
  • src/sas/sascalc/dataloader/readers/cansas_reader.py

    re090ba90 r0e0c645  
    1717# For saving individual sections of data 
    1818from ..data_info import Data1D, Data2D, DataInfo, plottable_1D, plottable_2D, \ 
    19     Collimation, TransmissionSpectrum, Detector, Process, Aperture, \ 
    20     combine_data_info_with_plottable as combine_data 
     19    Collimation, TransmissionSpectrum, Detector, Process, Aperture 
    2120from ..loader_exceptions import FileContentsException, DefaultReaderException, \ 
    2221    DataReaderException 
    2322from . import xml_reader 
    2423from .xml_reader import XMLreader 
    25 from .cansas_constants import CansasConstants, CurrentLevel 
     24from .cansas_constants import CansasConstants 
    2625 
    2726logger = logging.getLogger(__name__) 
     
    5958    type = ["XML files (*.xml)|*.xml", "SasView Save Files (*.svs)|*.svs"] 
    6059    # List of allowed extensions 
    61     ext = ['.xml', '.XML', '.svs', '.SVS'] 
     60    ext = ['.xml', '.svs'] 
    6261    # Flag to bypass extension check 
    6362    allow_all = True 
     
    8180        self.encoding = None 
    8281 
    83     def read(self, xml_file, schema_path="", invalid=True): 
     82    def _read(self, xml_file, schema_path="", invalid=True): 
    8483        if schema_path != "" or not invalid: 
    8584            # read has been called from self.get_file_contents because xml file doens't conform to schema 
     
    9089        return super(XMLreader, self).read(xml_file) 
    9190 
    92     def get_file_contents(self, xml_file=None, schema_path="", invalid=True): 
     91    def get_file_contents(self): 
     92        return self._get_file_contents(xml_file=None, schema_path="", invalid=True) 
     93 
     94    def _get_file_contents(self, xml_file=None, schema_path="", invalid=True): 
    9395        # Reset everything since we're loading a new file 
    9496        self.reset_state() 
     
    124126                try: 
    125127                    # Load data with less strict schema 
    126                     self.read(xml_file, invalid_schema, False) 
     128                    self._get_file_contents(xml_file, invalid_schema, False) 
    127129 
    128130                    # File can still be read but doesn't match schema, so raise exception 
     
    493495                self.current_datainfo.errors.add(error) 
    494496            self.data_cleanup() 
    495             self.sort_one_d_data() 
    496             self.sort_two_d_data() 
     497            self.sort_data() 
    497498            self.reset_data_list() 
    498499            return self.output[0], None 
Note: See TracChangeset for help on using the changeset viewer.