Ignore:
Timestamp:
02/21/05 11:38:19 (19 years ago)
Author:
mar637
Message:
  • added history to all functions, which modify the data
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/python/scantable.py

    r484 r489  
    2727                         (input rpfits/sdfits/ms) or replaces the value
    2828                         in existing scantables
    29         """
     29        """       
     30        if average is None or type(average) is not bool:
     31            average = rcParams['scantable.autoaverage']           
     32
    3033        varlist = vars()
    3134        self._vb = rcParams['verbose']
    3235        self._p = None
    33        
    34         if average is None or type(average) is not bool:
    35             autoav = rcParams['scantable.autoaverage']           
    3636
    3737        if isinstance(filename,sdtable):
     
    6464                if unit is not None:
    6565                    tbl.set_fluxunit(unit)
    66                 if autoav:
    67                     from asap._asap import average
     66                if average:
     67                    from asap._asap import average as _av
    6868                    tmp = tuple([tbl])
    6969                    print 'Auto averaging integrations...'
    70                     tbl2 = average(tmp,(),True,'none')
     70                    tbl2 = _av(tmp,(),True,'none')
    7171                    sdtable.__init__(self,tbl2)
    7272                    del r,tbl
     
    8181        Parameters:
    8282            name:        the name of the outputfile. For format="FITS" this
    83                          is the directory file name into which all the files will
    84                          be written (default is 'asap_FITS')
     83                         is the directory file name into which all the files
     84                         will be written (default is 'asap_FITS')
    8585            format:      an optional file format. Default is ASAP.
    8686                         Allowed are - 'ASAP' (save as ASAP [aips++] Table),
     
    9090                                       'MS2' (saves as an aips++
    9191                                              MeasurementSet V2)
    92             stokes:      Convert to Stokes parameters.  Default is False.
     92            stokes:      Convert to Stokes parameters (only available
     93                         currently with FITS and ASCII formats.
     94                         Default is False.
    9395            overwrite:   If the file should be overwritten if it exists.
    9496                         The default False is to return with warning
     
    711713        print "-"*80
    712714        for h in hist:
    713             items = h.split("##")
    714             date = items[0]
    715             func = items[1]
    716             items = items[2:]
    717             print date           
    718             print "Function: %s\n  Parameters:" % (func)
    719             for i in items:
    720                 s = i.split("=")
    721                 print "   %s: %s" % (s[0],s[1])
    722             print "-"*80
     715            if h.startswith("---"):
     716                print h
     717            else:
     718                items = h.split("##")
     719                date = items[0]
     720                func = items[1]
     721                items = items[2:]
     722                print date           
     723                print "Function: %s\n  Parameters:" % (func)
     724                for i in items:
     725                    s = i.split("=")
     726                    print "   %s = %s" % (s[0],s[1])
     727                print "-"*80
    723728        return
    724729
Note: See TracChangeset for help on using the changeset viewer.