parameters: (sample_run, reload=True, period=ALL_PERIODS)
docstring: Sets the sample scatter data.
  
      @param sample_run: run number to analysis e.g. SANS2D7777.nxs
      @param reload: must be set to True
      @param period: the period (entry) number to load, default is the first period
docstring_summary: Sets the sample scatter data.
docstring_tokens: Sets the sample scatter data .
function: def AssignSample(sample_run, reload=True, period=ALL_PERIODS):
      """
      Sets the sample scatter data.
  
      @param sample_run: run number to analysis e.g. SANS2D7777.nxs
      @param reload: must be set to True
      @param period: the period (entry) number to load, default is the first period
      """
      _ = reload  # noqa
      # First of all the default for all periods used to be -1. If we encounter this then set periods to ALL_PERIODS
      period = int(period)
      period = ALL_PERIODS if period == -1 else period
  
      # Print the output
      message = 'AssignSample("' + str(sample_run) + '"'
      if period != ALL_PERIODS:
          message += ', ' + str(period)
      message += ')'
      print_message(message)
  
      # Get the full file name of the run
      file_name = find_sans_file(sample_run)
  
      # Set the command
      data_command = DataCommand(command_id=DataCommandId.SAMPLE_SCATTER, file_name=file_name, period=period)
      director.add_command(data_command)
function_tokens: def AssignSample ( sample_run , reload = True , period = ALL_PERIODS ) : _ = reload # noqa # First of all the default for all periods used to be -1. If we encounter this then set periods to ALL_PERIODS period = int ( period ) period = ALL_PERIODS if period == - 1 else period # Print the output message = 'AssignSample("' + str ( sample_run ) + '"' if period != ALL_PERIODS : message += ', ' + str ( period ) message += ')' print_message ( message ) # Get the full file name of the run file_name = find_sans_file ( sample_run ) # Set the command data_command = DataCommand ( command_id = DataCommandId . SAMPLE_SCATTER , file_name = file_name , period = period ) director . add_command ( data_command )