parameters: (self, wavelength_adjustment_file, transmission_workspace,
                                               monitor_normalization_workspace, rebin_string)
return_statement: return wavelength_adjustment_workspace
docstring: This creates a workspace with wavelength adjustments, ie this will be a correction for the bins, but it will
          be the same for all pixels. This is essentially the product of several workspaces.
          The participating workspaces are:
          1. A workspace loaded from a calibration file
          2.. The workspace resulting from the monitor normalization
          3. The workspace resulting from the transmission calculation (using CalculateSANSTransmission) if applicable
  
          :param wavelength_adjustment_file: the file path to the wavelength adjustment file
          :param transmission_workspace: the calculated transmission workspace (which can be None)
          :param monitor_normalization_workspace: the monitor normalization workspace
          :param rebin_string: the parameters for rebinning
          :return: a general wavelength adjustment workspace
docstring_summary: This creates a workspace with wavelength adjustments, ie this will be a correction for the bins, but it will
          be the same for all pixels. This is essentially the product of several workspaces.
          The participating workspaces are:
          1. A workspace loaded from a calibration file
          2.. The workspace resulting from the monitor normalization
          3. The workspace resulting from the transmission calculation (using CalculateSANSTransmission) if applicable
docstring_tokens: This creates a workspace with wavelength adjustments ie this will be a correction for the bins but it will be the same for all pixels . This is essentially the product of several workspaces . The participating workspaces are : 1 . A workspace loaded from a calibration file 2 .. The workspace resulting from the monitor normalization 3 . The workspace resulting from the transmission calculation ( using CalculateSANSTransmission ) if applicable
function: def _get_wavelength_adjustment_workspace(self, wavelength_adjustment_file, transmission_workspace,
                                               monitor_normalization_workspace, rebin_string):
          """
          This creates a workspace with wavelength adjustments, ie this will be a correction for the bins, but it will
          be the same for all pixels. This is essentially the product of several workspaces.
          The participating workspaces are:
          1. A workspace loaded from a calibration file
          2.. The workspace resulting from the monitor normalization
          3. The workspace resulting from the transmission calculation (using CalculateSANSTransmission) if applicable
  
          :param wavelength_adjustment_file: the file path to the wavelength adjustment file
          :param transmission_workspace: the calculated transmission workspace (which can be None)
          :param monitor_normalization_workspace: the monitor normalization workspace
          :param rebin_string: the parameters for rebinning
          :return: a general wavelength adjustment workspace
          """
          # 1. Get the wavelength correction workspace from the file
          wavelength_adjustment_workspaces = []
          if wavelength_adjustment_file:
              wavelength_correction_workspace_from_file = \
                  self._load_wavelength_correction_file(wavelength_adjustment_file)
              wavelength_adjustment_workspaces.append(wavelength_correction_workspace_from_file)
  
          # 2. Normalization
          wavelength_adjustment_workspaces.append(monitor_normalization_workspace)
  
          # 3. Transmission Calculation
          if transmission_workspace:
              wavelength_adjustment_workspaces.append(transmission_workspace)
  
          # Multiply all workspaces
          wavelength_adjustment_workspace = None
          for workspace in wavelength_adjustment_workspaces:
              # First we need to change the binning such that is matches the binning of the main data workspace
              rebin_name = "Rebin"
              rebin_options = {"InputWorkspace": workspace,
                               "Params": rebin_string,
                               "OutputWorkspace": EMPTY_NAME}
              rebin_alg = create_unmanaged_algorithm(rebin_name, **rebin_options)
              rebin_alg.execute()
              rebinned_workspace = rebin_alg.getProperty("OutputWorkspace").value
              if wavelength_adjustment_workspace is None:
                  wavelength_adjustment_workspace = rebinned_workspace
              else:
                  multiply_name = "Multiply"
                  multiply_options = {"LHSWorkspace": rebinned_workspace,
                                      "RHSWorkspace": wavelength_adjustment_workspace,
                                      "OutputWorkspace": EMPTY_NAME}
                  multiply_alg = create_unmanaged_algorithm(multiply_name, **multiply_options)
                  multiply_alg.execute()
                  wavelength_adjustment_workspace = multiply_alg.getProperty("OutputWorkspace").value
          return wavelength_adjustment_workspace
function_tokens: def _get_wavelength_adjustment_workspace ( self , wavelength_adjustment_file , transmission_workspace , monitor_normalization_workspace , rebin_string ) : # 1. Get the wavelength correction workspace from the file wavelength_adjustment_workspaces = [ ] if wavelength_adjustment_file : wavelength_correction_workspace_from_file = self . _load_wavelength_correction_file ( wavelength_adjustment_file ) wavelength_adjustment_workspaces . append ( wavelength_correction_workspace_from_file ) # 2. Normalization wavelength_adjustment_workspaces . append ( monitor_normalization_workspace ) # 3. Transmission Calculation if transmission_workspace : wavelength_adjustment_workspaces . append ( transmission_workspace ) # Multiply all workspaces wavelength_adjustment_workspace = None for workspace in wavelength_adjustment_workspaces : # First we need to change the binning such that is matches the binning of the main data workspace rebin_name = "Rebin" rebin_options = { "InputWorkspace" : workspace , "Params" : rebin_string , "OutputWorkspace" : EMPTY_NAME } rebin_alg = create_unmanaged_algorithm ( rebin_name , * * rebin_options ) rebin_alg . execute ( ) rebinned_workspace = rebin_alg . getProperty ( "OutputWorkspace" ) . value if wavelength_adjustment_workspace is None : wavelength_adjustment_workspace = rebinned_workspace else : multiply_name = "Multiply" multiply_options = { "LHSWorkspace" : rebinned_workspace , "RHSWorkspace" : wavelength_adjustment_workspace , "OutputWorkspace" : EMPTY_NAME } multiply_alg = create_unmanaged_algorithm ( multiply_name , * * multiply_options ) multiply_alg . execute ( ) wavelength_adjustment_workspace = multiply_alg . getProperty ( "OutputWorkspace" ) . value return wavelength_adjustment_workspace