sasdata.file_converter.cansas_writer module

class sasdata.file_converter.cansas_writer.CansasWriter(xml=None, schema=None)

Bases: Reader

__annotations__ = {}
__doc__ = None
__module__ = 'sasdata.file_converter.cansas_writer'
_to_xml_doc(frame_data, sasentry_attrs=None)

Create an XML document to contain the content of an array of Data1Ds

Parameters:

frame_data – An array of Data1D objects

_write_data(datainfo, entry_node)

Writes the I and Q data to the XML file

Parameters:
  • datainfo – The Data1D object the information is coming from

  • entry_node – lxml node ElementTree object to be appended to

write(filename, frame_data, sasentry_attrs=None)

Write the content of a Data1D as a CanSAS XML file

Parameters:
  • filename – name of the file to write

  • datainfo – Data1D object