Ignore:
Timestamp:
08/30/06 13:29:25 (18 years ago)
Author:
mar637
Message:

Merge from Release2.1.0b tag

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/python/scantable.py

    r1203 r1217  
    923923                         Otherwise, the scaling is done in-situ
    924924                         The default is taken from .asaprc (False)
    925             allaxes:         if True apply to all spectra. Otherwise
    926                          apply only to the selected (beam/pol/if)spectra only
    927                          The default is taken from .asaprc (True if none)
    928925        """
    929926        if insitu is None: insitu = rcParams['insitu']
     
    11841181            mask = list(NUM.ones(self.nchan(-1)))
    11851182        from asap.asapfitter import fitter
    1186         f = fitter()
    1187         f.set_scan(self, mask)
    1188         f.set_function(poly=order)
    1189         s = f.auto_fit(insitu, plot=plot)
    1190         s._add_history("poly_baseline", varlist)
    1191         print_log()
    1192         if insitu: self._assign(s)
    1193         else: return s
     1183        try:
     1184            f = fitter()
     1185            f.set_scan(self, mask)
     1186            f.set_function(poly=order)
     1187            s = f.auto_fit(insitu, plot=plot)
     1188            s._add_history("poly_baseline", varlist)
     1189            print_log()
     1190            if insitu: self._assign(s)
     1191            else: return s
     1192        except RuntimeError:
     1193            msg = "The fit failed, possibly because it didn't converge."
     1194            if rcParams['verbose']:
     1195                print msg
     1196                return
     1197            else:
     1198                raise RuntimeError(msg)
     1199
    11941200
    11951201    def auto_poly_baseline(self, mask=[], edge=(0, 0), order=0,
     
    14331439                            preserve: Output = Toff * (on/off) - Toff
    14341440                            remove:   Output = Toff * (on/off) - Ton
    1435     """
     1441        """
    14361442        if mask is None: mask = ()
    14371443        varlist = vars()
     
    14391445        preoff = scantable(self._math._mx_extract(self, 'off'))
    14401446        off = preoff.average_time(mask=mask, weight=weight, scanav=False)
    1441     from asapmath  import quotient
     1447        from asapmath  import quotient
    14421448        q = quotient(on, off, preserve)
    14431449        q._add_history("mx_quotient", varlist)
    14441450        print_log()
    1445     return q
     1451        return q
    14461452
    14471453    def freq_switch(self, insitu=None):
Note: See TracChangeset for help on using the changeset viewer.