Ignore:
Timestamp:
03/31/09 12:13:51 (15 years ago)
Author:
Malte Marquarding
Message:

minor doc fixes; fixed list_scans, which seems brokrn in latest ipython; rc parameter xaxisformatting -> axesformatting; fixed font settings for matplotlib rc parameters

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/python/__init__.py

    r1558 r1560  
    107107    'plotter.histogram'  : [False, _validate_bool],
    108108    'plotter.papertype'  : ['A4', str],
    109     'plotter.xaxisformatting' : ['asap', str],
     109    'plotter.axesformatting' : ['mpl', str],
    110110
    111111    # scantable
     
    144144plotter.panelling          : scan
    145145
    146 # push panels together, to share axislabels
     146# push panels together, to share axis labels
    147147plotter.ganged             : True
    148148
     
    162162
    163163# The formatting style of the xaxis
    164 plotter.xaxisformatting    : 'asap' or 'mpl'
     164plotter.axesformatting    : 'mpl' (default) or 'asap' (for old versions of matplotlib)
    165165
    166166# scantable
     
    188188# This is has to be a regular expression
    189189scantable.reference         : .*(e|w|_R)$
     190
    190191# Fitter
    191192"""
     
    389390
    390391__date__ = '$Date$'.split()[1]
    391 __version__  = '$Revision:$'
     392__version__  = '$Revision$'
    392393
    393394def is_ipython():
     
    396397    def version(): print  "ASAP %s(%s)"% (__version__, __date__)
    397398   
    398     def list_scans(t = scantable):
    399         import types
    400         globs = sys.modules['__main__'].__dict__.iteritems()
    401         print "The user created scantables are:"
    402         sts = map(lambda x: x[0], filter(lambda x: isinstance(x[1], t), globs))
    403         print filter(lambda x: not x.startswith('_'), sts)
    404         return
     399    def list_scans(t = scantable):       
     400        import inspect
     401        print "The user created scantables are: ",
     402        globs=inspect.currentframe().f_back.f_locals.copy()
     403        out = [ k for k,v in globs.iteritems() \
     404                     if isinstance(v, scantable) and not k.startswith("_") ]
     405        print out
     406        return out
    405407
    406408    def commands():
     
    472474            mx_quotient     - Form a quotient using MX data (off beams)
    473475            scale, *, /     - return a scan scaled by a given factor
    474             add, +, -       - return a scan with given value added
     476            add, +          - return a scan with given value added
     477            sub, -          - return a scan with given value subtracted
    475478            bin             - return a scan with binned channels
    476479            resample        - return a scan with resampled channels
     
    579582            axhline,axvline - draw horizontal/vertical lines
    580583            axhspan,axvspan - draw horizontal/vertical regions
     584            annotate        - draw an arrow with label
     585            create_mask     - create a scnatble mask interactively
    581586
    582587        xyplotter           - matplotlib/pylab plotting functions
     
    592597        commands            - this command
    593598        print               - print details about a variable
    594         list_scans          - list all scantables created bt the user
     599        list_scans          - list all scantables created by the user
    595600        list_files          - list all files readable by asap (default rpf)
    596601        del                 - delete the given variable from memory
Note: See TracChangeset for help on using the changeset viewer.