Ignore:
Timestamp:
06/08/06 13:59:51 (18 years ago)
Author:
mar637
Message:

Added feature Ticket #42; The user can now plot the fits adn reject them.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/python/asapfitter.py

    r1039 r1061  
    322322                fix = ""
    323323                if fixed[i]: fix = "(fixed)"
    324                 out += '  p%d%s= %3.3f,' % (c,fix,pars[i])
     324                out += '  p%d%s= %3.6f,' % (c,fix,pars[i])
    325325                c+=1
    326326            out = out[:-1]  # remove trailing ','
     
    491491        print_log()
    492492
    493     def auto_fit(self, insitu=None):
     493    def auto_fit(self, insitu=None, plot=False):
    494494        """
    495495        Return a scan where the function is applied to all rows for
     
    521521            self.fit()
    522522            x = self.get_parameters()
     523            if plot:
     524                self.plot(residual=True)
     525                x = raw_input("Accept fit ([y]/n): ")
     526                if x.upper() == 'N':
     527                    continue
    523528            scan._setspectrum(self.fitter.getresidual(), r)
     529        if plot:
     530            self._p.unmap()
     531            self._p = None
    524532        print_log()
    525533        return scan
Note: See TracChangeset for help on using the changeset viewer.