Changeset d112c30 in sasview for src/sas/sascalc/dataloader/readers


Ignore:
Timestamp:
Jul 21, 2016 4:09:56 AM (8 years ago)
Author:
lewis
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:
df332d8
Parents:
7c8ddb83
Message:

Write run_name to SASentry.name instead of Run.name to agree with Mantid output

File:
1 edited

Legend:

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

    r3a9801f rd112c30  
    10131013        return doc, entry_node 
    10141014 
    1015     def _to_xml_doc(self, datainfo): 
     1015    def _to_xml_doc(self, datainfo, sasentry_attrs=None): 
    10161016        """ 
    10171017        Create an XML document to contain the content of a Data1D 
     
    10311031        doc = self.create_tree(base_element) 
    10321032        # Create SASentry Element 
    1033         entry_node = self.create_element("SASentry") 
     1033        entry_node = self.create_element("SASentry", sasentry_attrs) 
    10341034        root = doc.getroot() 
    10351035        root.append(entry_node) 
     
    10801080        return False 
    10811081 
    1082     def write(self, filename, datainfo): 
     1082    def write(self, filename, datainfo, sasentry_attrs=None): 
    10831083        """ 
    10841084        Write the content of a Data1D as a CanSAS XML file 
     
    10881088        """ 
    10891089        # Create XML document 
    1090         doc, _ = self._to_xml_doc(datainfo) 
     1090        doc, _ = self._to_xml_doc(datainfo, sasentry_attrs) 
    10911091        # Write the file 
    10921092        file_ref = open(filename, 'w') 
Note: See TracChangeset for help on using the changeset viewer.