RefRed template reader. Adapted from Mantid code.

ReductionParameters

Class that hold the parameters for the reduction of a single data set.

from_dict

Update object's attributes with a dictionary with entries of the type attribute_name: attribute_value.

Parameters:
  • permissible (bool, default: True ) –

    allow keys in data_dict that are not attribute names of ReductionParameters instances. Reading from data_dict will result in this instance having new attributes not defined in __init__()

Raises:
  • ValueError

    when permissible=False and one entry (or more) of the dictionary is not an attribute of this object

from_xml_element

Read in data from XML

Parameters:
  • instrument_dom (Document) –

to_xml

Create XML from the current data.

from_xml

Read in data from XML string

Parameters:
  • xml_str (str) –

    String representation of a list of ReductionParameters instances

Returns:
  • list

    List of ReductionParameters instances

getBoolElement

Parse a boolean element from the dom object

getContent

Returns the content of a tag within a dom object

getFloatElement

Parse a float element from the dom object

getFloatList

Parse a list of floats from the dom object

getIntElement

Parse an integer element from the dom object

getIntList

Parse a list of integers from the dom object

getStringElement

Parse a string element from the dom object

getStringList

Parse a list of strings from the dom object

getText

Utility method to extract text out of an XML node

to_xml

Create XML from the current data.

Parameters:
  • data_sets (list) –

    List of ReductionParameters instances

Returns:
  • str

    XML string