Changeset 381


Ignore:
Timestamp:
02/08/05 12:33:01 (19 years ago)
Author:
mar637
Message:
  • added verbose flag for scantable.summary
  • enabled get_scan(list)
Location:
trunk/python
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/python/__init__.py

    r379 r381  
    6565    'scantable.allaxes'   : [True, validate_bool],  # apply action to all axes
    6666    'scantable.plotter'   : [True, validate_bool], # use internal plotter
     67    'scantable.verbosesummary'   : [False, validate_bool]
    6768
    6869    # fitter
     
    105106    'scantable.plotter'          : True
    106107
     108    # Control the level of information printed by summary
     109    'scantable.verbosesummary'   : False
     110   
    107111    # Fitter   
    108112    """
  • trunk/python/scantable.py

    r358 r381  
    139139                return scantable(s)
    140140            elif type(scanid) is int:
     141                s = sdtable._getscan(self,[scanid])
     142                return scantable(s)
     143            elif type(scanid) is list:
    141144                s = sdtable._getscan(self,scanid)
    142145                return scantable(s)
     146            else:
     147                print "Illegal scanid type, use 'int' or 'list' if ints."
    143148        except RuntimeError:
    144149            print "Couldn't find any match."
    145150
    146151    def __str__(self):
    147         return sdtable._summary(self)
    148 
    149     def summary(self,filename=None):
     152        return sdtable._summary(self,True)
     153
     154    def summary(self,filename=None, verbose=None):
    150155        """
    151156        Print a summary of the contents of this scantable.
     
    153158            filename:    the name of a file to write the putput to
    154159                         Default - no file output
    155         """
    156         info = sdtable._summary(self)
     160            verbose:     print extra info such as the frequency table
     161                         The default (False) is taken from .asaprc
     162        """
     163        info = sdtable._summary(self, verbose)
     164        if verbose is None: verbose = rcParams['scantable.verbosesummary']
    157165        if filename is not None:
    158166            if filename is "":
Note: See TracChangeset for help on using the changeset viewer.