original_docstring:  The number of frames each process should retrieve from file at a
          time.
          
docstring: The number of frames each process should retrieve from file at a
  time.
docstring_tokens: The number of frames each process should retrieve from file at a time .
code: def __get_optimum_distribution(self, nFrames):
          """ The number of frames each process should retrieve from file at a
          time.
          """
          min_mft, max_mft = self.__get_boundaries(nFrames)
  
          if isinstance(nFrames, int) and nFrames > max_mft:
              logging.warning("The requested %s frames excedes the maximum "
                           "preferred of %s." % (nFrames, max_mft))
              max_mft = nFrames
  
          # find all possible choices of nFrames, being careful with boundaries
          sdir = self.params['sdir']
          # for multiple mft slice dimensions
          #slice_shape = [self.params['shape'][d] for d in sdir]
          #nSlices = np.prod(slice_shape)
          nSlices = self.params['shape'][sdir[0]]
          nFrames = 1 if isinstance(nFrames, str) else nFrames
          fchoices, size_list = self._get_frame_choices(
              sdir, nFrames, min(max_mft, max(nFrames, nSlices)))
  
          threshold_idx = [i for i in range(len(fchoices)) if fchoices[i] >= min_mft]
  
          if threshold_idx:
              fchoices = [fchoices[i] for i in threshold_idx]
              size_list = [size_list[i] for i in threshold_idx]
  
  # use this for multiple mft slice dimensions
  #        mft, idx = self._find_best_frame_distribution(
  #            size_list, slice_shape, self.params['mpi_procs'],
  #            idx=True)
          mft, idx = self._find_best_frame_distribution(
              fchoices, nSlices, self.params['mpi_procs'], idx=True)
          return int(mft), fchoices, size_list
code_tokens: def __get_optimum_distribution ( self , nFrames ) : min_mft , max_mft = self . __get_boundaries ( nFrames ) if isinstance ( nFrames , int ) and nFrames > max_mft : logging . warning ( "The requested %s frames excedes the maximum " "preferred of %s." % ( nFrames , max_mft ) ) max_mft = nFrames sdir = self . params [ 'sdir' ] nSlices = self . params [ 'shape' ] [ sdir [ 0 ] ] nFrames = 1 if isinstance ( nFrames , str ) else nFrames fchoices , size_list = self . _get_frame_choices ( sdir , nFrames , min ( max_mft , max ( nFrames , nSlices ) ) ) threshold_idx = [ i for i in range ( len ( fchoices ) ) if fchoices [ i ] >= min_mft ] if threshold_idx : fchoices = [ fchoices [ i ] for i in threshold_idx ] size_list = [ size_list [ i ] for i in threshold_idx ] mft , idx = self . _find_best_frame_distribution ( fchoices , nSlices , self . params [ 'mpi_procs' ] , idx = True ) return int ( mft ) , fchoices , size_list
short_docstring: The number of frames each process should retrieve from file at a
  time.
short_docstring_tokens: The number of frames each process should retrieve from file at a time .
comment: """ The number of frames each process should retrieve from file at a
          time.
          """$SEP$# find all possible choices of nFrames, being careful with boundaries$SEP$# for multiple mft slice dimensions$SEP$#slice_shape = [self.params['shape'][d] for d in sdir]$SEP$#nSlices = np.prod(slice_shape)$SEP$# use this for multiple mft slice dimensions$SEP$#        mft, idx = self._find_best_frame_distribution($SEP$#            size_list, slice_shape, self.params['mpi_procs'],$SEP$#            idx=True)