parameters: (self, xml_str)
docstring: Read in data from XML
              @param xml_str: text to read the data from
docstring_summary: Read in data from XML
docstring_tokens: Read in data from XML
function: def from_xml(self, xml_str):
          """
              Read in data from XML
              @param xml_str: text to read the data from
          """
          self.reset()
          super(ReductionOptions, self).from_xml(xml_str)
  
          dom = xml.dom.minidom.parseString(xml_str)
  
          instrument_dom = dom.getElementsByTagName("Instrument")[0]
          self.detector_offset = BaseScriptElement.getFloatElement(instrument_dom, "detector_offset",
                                                                   default=ReductionOptions.default_detector_offset)
  
          # TOF cutoff and correction
          element_list = dom.getElementsByTagName("TOFcorr")
          if len(element_list)>0:
              tof_dom = element_list[0]
  
              self.use_config_cutoff = BaseScriptElement.getBoolElement(tof_dom, "use_config_cutoff",
                                                                        default = ReductionOptions.use_config_cutoff)
              self.correct_for_flight_path = BaseScriptElement.getBoolElement(tof_dom, "perform_flight_path_corr",
                                                                              default = ReductionOptions.correct_for_flight_path)
              self.low_TOF_cut = BaseScriptElement.getFloatElement(tof_dom, "low_tof_cut",
                                                                   default=ReductionOptions.low_TOF_cut)
              self.high_TOF_cut = BaseScriptElement.getFloatElement(tof_dom, "high_tof_cut",
                                                                    default=ReductionOptions.high_TOF_cut)
  
          # Mask
          self.use_config_mask = BaseScriptElement.getBoolElement(dom, "UseConfigMask",
                                                                  default = ReductionOptions.use_config_mask)
  
          # Resolution
          self.compute_resolution = BaseScriptElement.getBoolElement(dom, "ComputeResolution",
                                                                     default = ReductionOptions.compute_resolution)
          self.sample_aperture_diameter = BaseScriptElement.getFloatElement(dom, "SampleApertureDiameter",
                                                                            default = ReductionOptions.sample_aperture_diameter)
  
          # TOF correction
          self.perform_TOF_correction = BaseScriptElement.getBoolElement(dom, "PerformTOFCorrection",
                                                                         default = ReductionOptions.perform_TOF_correction)
          # Normalization option
          self.use_beam_monitor = BaseScriptElement.getBoolElement(dom, "UseBeamMonitor",
                                                                   default = ReductionOptions.use_beam_monitor)
          self.beam_monitor_reference = BaseScriptElement.getStringElement(dom, "BeamMonitorRef",
                                                                           default = ReductionOptions.beam_monitor_reference)
function_tokens: def from_xml ( self , xml_str ) : self . reset ( ) super ( ReductionOptions , self ) . from_xml ( xml_str ) dom = xml . dom . minidom . parseString ( xml_str ) instrument_dom = dom . getElementsByTagName ( "Instrument" ) [ 0 ] self . detector_offset = BaseScriptElement . getFloatElement ( instrument_dom , "detector_offset" , default = ReductionOptions . default_detector_offset ) # TOF cutoff and correction element_list = dom . getElementsByTagName ( "TOFcorr" ) if len ( element_list ) > 0 : tof_dom = element_list [ 0 ] self . use_config_cutoff = BaseScriptElement . getBoolElement ( tof_dom , "use_config_cutoff" , default = ReductionOptions . use_config_cutoff ) self . correct_for_flight_path = BaseScriptElement . getBoolElement ( tof_dom , "perform_flight_path_corr" , default = ReductionOptions . correct_for_flight_path ) self . low_TOF_cut = BaseScriptElement . getFloatElement ( tof_dom , "low_tof_cut" , default = ReductionOptions . low_TOF_cut ) self . high_TOF_cut = BaseScriptElement . getFloatElement ( tof_dom , "high_tof_cut" , default = ReductionOptions . high_TOF_cut ) # Mask self . use_config_mask = BaseScriptElement . getBoolElement ( dom , "UseConfigMask" , default = ReductionOptions . use_config_mask ) # Resolution self . compute_resolution = BaseScriptElement . getBoolElement ( dom , "ComputeResolution" , default = ReductionOptions . compute_resolution ) self . sample_aperture_diameter = BaseScriptElement . getFloatElement ( dom , "SampleApertureDiameter" , default = ReductionOptions . sample_aperture_diameter ) # TOF correction self . perform_TOF_correction = BaseScriptElement . getBoolElement ( dom , "PerformTOFCorrection" , default = ReductionOptions . perform_TOF_correction ) # Normalization option self . use_beam_monitor = BaseScriptElement . getBoolElement ( dom , "UseBeamMonitor" , default = ReductionOptions . use_beam_monitor ) self . beam_monitor_reference = BaseScriptElement . getStringElement ( dom , "BeamMonitorRef" , default = ReductionOptions . beam_monitor_reference )