parameters: (self, ws, xbeam, ybeam, xbeam_other=None, ybeam_other=None)
return_statement: return [xshift, yshift], [xshift, yshift]
docstring: Move the locations of the sample and detector bank based on the passed beam center
              and information from the sample workspace logs
              @param ws: workspace containing the instrument information
              @param xbeam: x-position of the beam
              @param ybeam: y-position of the beam
              @return: the locations of (in the new coordinates) beam center, center of detector bank
docstring_summary: Move the locations of the sample and detector bank based on the passed beam center
              and information from the sample workspace logs
docstring_tokens: Move the locations of the sample and detector bank based on the passed beam center and information from the sample workspace logs
function: def move_components(self, ws, xbeam, ybeam, xbeam_other=None, ybeam_other=None):
          """
              Move the locations of the sample and detector bank based on the passed beam center
              and information from the sample workspace logs
              @param ws: workspace containing the instrument information
              @param xbeam: x-position of the beam
              @param ybeam: y-position of the beam
              @return: the locations of (in the new coordinates) beam center, center of detector bank
          """
          self.move_all_components(ws)
  
          xshift = (317.5 / 1000.) - xbeam
          yshift = (317.5 / 1000.) - ybeam
          MoveInstrumentComponent(Workspace=ws,
                                  ComponentName=self.cur_detector().name(),
                                  X=xshift, Y=yshift, RelativePosition="1")
          if ybeam_other and xbeam_other:
              xshift_other = (317.5 / 1000.) - xbeam_other
              yshift_other = (317.5 / 1000.) - ybeam_other
              MoveInstrumentComponent(Workspace=ws,
                                      ComponentName=self.other_detector().name(),
                                      X=xshift_other, Y=yshift_other, RelativePosition="1")
          # Have a separate move for x_corr, y_coor and z_coor just to make it more obvious in the
          # history, and to expert users what is going on
          det = self.cur_detector()
          det_other = self.other_detector()
          if det.x_corr != 0.0 or det.y_corr != 0.0 or det.z_corr != 0.0:
              MoveInstrumentComponent(Workspace=ws, ComponentName=det.name(), X=det.x_corr / 1000.0,
                                      Y=det.y_corr / 1000.0, Z=det.z_corr / 1000.0, RelativePosition="1")
              if ybeam_other and xbeam_other:
                  MoveInstrumentComponent(Workspace=ws, ComponentName=det_other.name(), X=det_other.x_corr / 1000.0,
                                          Y=det_other.y_corr / 1000.0, Z=det_other.z_corr / 1000.0, RelativePosition="1")
              xshift = xshift + det.x_corr / 1000.0
              yshift = yshift + det.y_corr / 1000.0
  
          # Set the beam centre position afte the move, leave as they were
          self.beam_centre_pos1_after_move = xbeam
          self.beam_centre_pos2_after_move = ybeam
  
          return [xshift, yshift], [xshift, yshift]
function_tokens: def move_components ( self , ws , xbeam , ybeam , xbeam_other = None , ybeam_other = None ) : self . move_all_components ( ws ) xshift = ( 317.5 / 1000. ) - xbeam yshift = ( 317.5 / 1000. ) - ybeam MoveInstrumentComponent ( Workspace = ws , ComponentName = self . cur_detector ( ) . name ( ) , X = xshift , Y = yshift , RelativePosition = "1" ) if ybeam_other and xbeam_other : xshift_other = ( 317.5 / 1000. ) - xbeam_other yshift_other = ( 317.5 / 1000. ) - ybeam_other MoveInstrumentComponent ( Workspace = ws , ComponentName = self . other_detector ( ) . name ( ) , X = xshift_other , Y = yshift_other , RelativePosition = "1" ) # Have a separate move for x_corr, y_coor and z_coor just to make it more obvious in the # history, and to expert users what is going on det = self . cur_detector ( ) det_other = self . other_detector ( ) if det . x_corr != 0.0 or det . y_corr != 0.0 or det . z_corr != 0.0 : MoveInstrumentComponent ( Workspace = ws , ComponentName = det . name ( ) , X = det . x_corr / 1000.0 , Y = det . y_corr / 1000.0 , Z = det . z_corr / 1000.0 , RelativePosition = "1" ) if ybeam_other and xbeam_other : MoveInstrumentComponent ( Workspace = ws , ComponentName = det_other . name ( ) , X = det_other . x_corr / 1000.0 , Y = det_other . y_corr / 1000.0 , Z = det_other . z_corr / 1000.0 , RelativePosition = "1" ) xshift = xshift + det . x_corr / 1000.0 yshift = yshift + det . y_corr / 1000.0 # Set the beam centre position afte the move, leave as they were self . beam_centre_pos1_after_move = xbeam self . beam_centre_pos2_after_move = ybeam return [ xshift , yshift ] , [ xshift , yshift ]