parameters: (self, label, reference)
docstring: Interpolates the background or calibration intensities to
          all observable points existing in sample at a given energy
          @param label  :: calibration or background
          @param reference :: to interpolate to, can be sample or calibration
docstring_summary: Interpolates the background or calibration intensities to
          all observable points existing in sample at a given energy
docstring_tokens: Interpolates the background or calibration intensities to all observable points existing in sample at a given energy
function: def _interpolate(self, label, reference):
          '''
          Interpolates the background or calibration intensities to
          all observable points existing in sample at a given energy
          @param label  :: calibration or background
          @param reference :: to interpolate to, can be sample or calibration
          '''
  
          for energy in self._all_runs[reference]:
              if energy in self._all_runs[label]:
  
                  ws = self._insert_energy_value(self._red_ws + '_' + label, energy, label)
  
                  if reference == self._SAMPLE:
                      ref = self._insert_energy_value(self._red_ws, energy, reference)
                  else:
                      ref = self._insert_energy_value(self._red_ws + '_' + reference, energy, reference)
  
                  if mtd[ws].blocksize() > 1:
                      SplineInterpolation(WorkspaceToInterpolate=ws,
                                          WorkspaceToMatch=ref,
                                          Linear2Points=True,
                                          OutputWorkspace=ws)
function_tokens: def _interpolate ( self , label , reference ) : for energy in self . _all_runs [ reference ] : if energy in self . _all_runs [ label ] : ws = self . _insert_energy_value ( self . _red_ws + '_' + label , energy , label ) if reference == self . _SAMPLE : ref = self . _insert_energy_value ( self . _red_ws , energy , reference ) else : ref = self . _insert_energy_value ( self . _red_ws + '_' + reference , energy , reference ) if mtd [ ws ] . blocksize ( ) > 1 : SplineInterpolation ( WorkspaceToInterpolate = ws , WorkspaceToMatch = ref , Linear2Points = True , OutputWorkspace = ws )