parameters: (self, scan_numbers)
return_statement: return part_dict
docstring: add scans to the table
  
          :param scan_numbers:
          :return:
docstring_summary: add scans to the table
docstring_tokens: add scans to the table
function: def add_new_scans(self, scan_numbers):
          """add scans to the table
  
          :param scan_numbers:
          :return:
          """
          # check input
          assert isinstance(scan_numbers, list), 'Scan numbers {0} must be a list but not a {1}.' \
                                                 ''.format(scan_numbers, type(scan_numbers))
  
          # sort
          scan_numbers.sort()
          part_dict = dict()
  
          # append to table
          for scan_number in scan_numbers:
              # skip the scan number that has been added to table
              if scan_number in self._scanRowDict:
                  continue
  
              # append scan
              self.append_row([scan_number, '', '', 'Queued'])
              num_rows = self.rowCount()
              self._scanRowDict[scan_number] = num_rows - 1
              part_dict[scan_number] = num_rows - 1
          # END-FOR
  
          return part_dict
function_tokens: def add_new_scans ( self , scan_numbers ) : # check input assert isinstance ( scan_numbers , list ) , 'Scan numbers {0} must be a list but not a {1}.' '' . format ( scan_numbers , type ( scan_numbers ) ) # sort scan_numbers . sort ( ) part_dict = dict ( ) # append to table for scan_number in scan_numbers : # skip the scan number that has been added to table if scan_number in self . _scanRowDict : continue # append scan self . append_row ( [ scan_number , '' , '' , 'Queued' ] ) num_rows = self . rowCount ( ) self . _scanRowDict [ scan_number ] = num_rows - 1 part_dict [ scan_number ] = num_rows - 1 # END-FOR return part_dict