docs: def _do_photometry(self, param_tab, n_start=1):
          """
          Helper function which performs the iterations of the photometry
          process.
  
          Parameters
          ----------
          param_names :  list
              Names of the columns which represent the initial guesses.
              For example, ['x_0', 'y_0', 'flux_0'], for intial guesses on
              the center positions and the flux.
          n_start : int
              Integer representing the start index of the iteration.  It
              is 1 if init_guesses are None, and 2 otherwise.
  
          Returns
          -------
          output_table : `~astropy.table.Table` or None
              Table with the photometry results, i.e., centroids and
              fluxes estimations and the initial estimates used to start
              the fitting process.
          """
  
          output_table = Table()
          self._define_fit_param_names()
  
          for (init_parname, fit_parname) in zip(self._pars_to_set.keys(),
                                                 self._pars_to_output.keys()):
              output_table.add_column(Column(name=init_parname))
              output_table.add_column(Column(name=fit_parname))
  
          sources = self.finder(self._residual_image)
  
          n = n_start
          while(sources is not None and
                (self.niters is None or n <= self.niters)):
              apertures = CircularAperture((sources['xcentroid'],
                                            sources['ycentroid']),
                                           r=self.aperture_radius)
              sources['aperture_flux'] = aperture_photometry(
                  self._residual_image, apertures)['aperture_sum']
  
              init_guess_tab = Table(names=['id', 'x_0', 'y_0', 'flux_0'],
                                     data=[sources['id'], sources['xcentroid'],
                                           sources['ycentroid'],
                                           sources['aperture_flux']])
  
              for param_tab_name, param_name in self._pars_to_set.items():
                  if param_tab_name not in (['x_0', 'y_0', 'flux_0']):
                      init_guess_tab.add_column(
                          Column(name=param_tab_name,
                                 data=(getattr(self.psf_model,
                                               param_name) *
                                       np.ones(len(sources)))))
  
              star_groups = self.group_maker(init_guess_tab)
              table, self._residual_image = super().nstar(
                  self._residual_image, star_groups)
  
              star_groups = star_groups.group_by('group_id')
              table = hstack([star_groups, table])
  
              table['iter_detected'] = n*np.ones(table['x_fit'].shape,
                                                 dtype=np.int32)
  
              output_table = vstack([output_table, table])
  
              # do not warn if no sources are found beyond the first iteration
              with warnings.catch_warnings():
                  warnings.simplefilter('ignore', NoDetectionsWarning)
                  sources = self.finder(self._residual_image)
  
              n += 1
  
          return output_table