Changeset 8976865 in sasview
- Timestamp:
- Jul 21, 2016 6:41:46 AM (8 years ago)
- Branches:
- master, ESS_GUI, ESS_GUI_Docs, ESS_GUI_batch_fitting, ESS_GUI_bumps_abstraction, ESS_GUI_iss1116, ESS_GUI_iss879, ESS_GUI_iss959, ESS_GUI_opencl, ESS_GUI_ordering, ESS_GUI_sync_sascalc, costrafo411, magnetic_scatt, release-4.1.1, release-4.1.2, release-4.2.2, ticket-1009, ticket-1094-headless, ticket-1242-2d-resolution, ticket-1243, ticket-1249, ticket885, unittest-saveload
- Children:
- eb8da5f
- Parents:
- ea2a7348
- Location:
- src/sas
- Files:
-
- 1 added
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
TabularUnified src/sas/sascalc/dataloader/readers/cansas_reader.py ¶
rd112c30 r8976865 1013 1013 return doc, entry_node 1014 1014 1015 def _to_xml_doc(self, datainfo , sasentry_attrs=None):1015 def _to_xml_doc(self, datainfo): 1016 1016 """ 1017 1017 Create an XML document to contain the content of a Data1D … … 1031 1031 doc = self.create_tree(base_element) 1032 1032 # Create SASentry Element 1033 entry_node = self.create_element("SASentry" , sasentry_attrs)1033 entry_node = self.create_element("SASentry") 1034 1034 root = doc.getroot() 1035 1035 root.append(entry_node) … … 1080 1080 return False 1081 1081 1082 def write(self, filename, datainfo , sasentry_attrs=None):1082 def write(self, filename, datainfo): 1083 1083 """ 1084 1084 Write the content of a Data1D as a CanSAS XML file … … 1088 1088 """ 1089 1089 # Create XML document 1090 doc, _ = self._to_xml_doc(datainfo , sasentry_attrs)1090 doc, _ = self._to_xml_doc(datainfo) 1091 1091 # Write the file 1092 1092 file_ref = open(filename, 'w') -
TabularUnified src/sas/sasgui/perspectives/file_converter/converter_panel.py ¶
rea2a7348 r8976865 18 18 from sas.sasgui.guiframe.dataFitting import Data1D 19 19 from sas.sasgui.guiframe.utils import check_float 20 from sas.sas calc.dataloader.readers.cansas_reader import Reader as CansasReader20 from sas.sasgui.perspectives.file_converter.cansas_writer import CansasWriter 21 21 from sas.sasgui.perspectives.file_converter.bsl_loader import BSLLoader 22 22 from sas.sascalc.dataloader.data_info import Detector … … 72 72 self.Layout() 73 73 74 def convert_to_cansas(self, data, filename):75 reader = Cansas Reader()74 def convert_to_cansas(self, frame_data, filename): 75 reader = CansasWriter() 76 76 entry_attrs = None 77 77 if self.run_name is not None: 78 78 entry_attrs = { 'name': self.run_name } 79 reader.write(filename, data,79 reader.write(filename, frame_data, 80 80 sasentry_attrs=entry_attrs) 81 81
Note: See TracChangeset
for help on using the changeset viewer.