code: def autoscale_eydata(self):
          
          if not self.results:
              self._error("You must complete a fit first.")
              return
  
          r = self.reduced_chi_squareds()
  
          # loop over the eydata and rescale
          for n in range(len(r)): self["scale_eydata"][n] *= _n.sqrt(r[n])
  
          # the fit is no longer valid
          self.clear_results()
  
          # replot
          if self['autoplot']: self.plot()
  
          return self
docs: Rescales the error so the next fit will give reduced chi squareds of 1.
          Each data set will be scaled independently, and you may wish to run 
          this a few times until it converges.