Changeset 0e0c645 in sasview
- Timestamp:
- Mar 26, 2019 3:35:43 PM (6 years ago)
- Branches:
- ticket-1243
- Children:
- cc2cd5a
- Parents:
- 2b3eb3d
- Location:
- src/sas/sascalc/dataloader
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
src/sas/sascalc/dataloader/data_info.py
r4fdcc65 r0e0c645 1188 1188 final_dataset.yaxis(data._yaxis, data._yunit) 1189 1189 final_dataset.zaxis(data._zaxis, data._zunit) 1190 final_dataset.y_bins = data.y_bins1191 final_dataset.x_bins = data.x_bins1192 1190 else: 1193 1191 return_string = ("Should Never Happen: _combine_data_info_with_plottabl" -
src/sas/sascalc/dataloader/readers/cansas_reader.py
r2b3eb3d r0e0c645 17 17 # For saving individual sections of data 18 18 from ..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 21 20 from ..loader_exceptions import FileContentsException, DefaultReaderException, \ 22 21 DataReaderException 23 22 from . import xml_reader 24 23 from .xml_reader import XMLreader 25 from .cansas_constants import CansasConstants , CurrentLevel24 from .cansas_constants import CansasConstants 26 25 27 26 logger = logging.getLogger(__name__) … … 59 58 type = ["XML files (*.xml)|*.xml", "SasView Save Files (*.svs)|*.svs"] 60 59 # List of allowed extensions 61 ext = ['.xml', '. XML', '.svs', '.SVS']60 ext = ['.xml', '.svs'] 62 61 # Flag to bypass extension check 63 62 allow_all = True … … 81 80 self.encoding = None 82 81 83 def read(self, xml_file, schema_path="", invalid=True):82 def _read(self, xml_file, schema_path="", invalid=True): 84 83 if schema_path != "" or not invalid: 85 84 # read has been called from self.get_file_contents because xml file doens't conform to schema … … 90 89 return super(XMLreader, self).read(xml_file) 91 90 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): 93 95 # Reset everything since we're loading a new file 94 96 self.reset_state() … … 124 126 try: 125 127 # Load data with less strict schema 126 self. read(xml_file, invalid_schema, False)128 self._get_file_contents(xml_file, invalid_schema, False) 127 129 128 130 # File can still be read but doesn't match schema, so raise exception
Note: See TracChangeset
for help on using the changeset viewer.