Changeset 1422 for trunk


Ignore:
Timestamp:
05/22/08 16:38:44 (16 years ago)
Author:
Malte Marquarding
Message:

added scantable.history rc parameter to optionally suppress history generation. Fixed warning in matplotlib re backend import

Location:
trunk/python
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/python/__init__.py

    r1408 r1422  
    105105    'scantable.freqframe' : ['LSRK', str],  #default frequency frame
    106106    'scantable.verbosesummary'   : [False, _validate_bool],
    107     'scantable.storage'   : ['memory', str]
     107    'scantable.storage'   : ['memory', str],
     108    'scantable.history'   : [True, _validate_bool]
    108109    # fitter
    109110    }
     
    154155# default storage of scantable ('memory'/'disk')
    155156scantable.storage          : memory
     157
     158# write history of each call to scantable
     159scantable.history          : True
     160
    156161# default ouput format when saving
    157162scantable.save             : ASAP
     163
    158164# auto averaging on read
    159165scantable.autoaverage      : True
     
    242248    for k,v in kwargs.items():
    243249        name = aliases.get(k) or k
    244         key = '%s.%s' % (group, name)
     250        if len(group):
     251            key = '%s.%s' % (group, name)
     252        else:
     253            key = name
    245254        if not rcParams.has_key(key):
    246255            raise KeyError('Unrecognized key "%s" for group "%s" and name "%s"' % (key, group, name))
     
    351360if rcParams['useplotter']:
    352361    try:
    353         from  asapplotter import asapplotter
    354         gui = os.environ.has_key('DISPLAY') and rcParams['plotter.gui']
    355         if gui:
     362            from asapplotter import asapplotter
     363            gui = os.environ.has_key('DISPLAY') and rcParams['plotter.gui']
     364            if gui:
     365            import matplotlib
     366            matplotlib.use("TkAgg")
    356367            import pylab
    357             xyplotter = pylab
     368        xyplotter = pylab
    358369            plotter = asapplotter(gui)
    359370            del gui
    360371    except ImportError:
    361         print "Matplotlib not installed. No plotting available"
     372            print "Matplotlib not installed. No plotting available"
    362373
    363374__date__ = '$Date$'.split()[1]
     
    368379if is_ipython():
    369380    def version(): print  "ASAP %s(%s)"% (__version__, __date__)
     381   
    370382    def list_scans(t = scantable):
    371383        import types
     
    420432            get_restfreqs   - get the current list of rest frequencies
    421433            set_restfreqs   - set a list of rest frequencies
    422             shift_refpix    - shift the reference pixel of the IFs
     434                shift_refpix    - shift the reference pixel of the IFs
    423435            flag            - flag selected channels in the data
    424436            lag_flag        - flag specified frequency in the data
     
    427439            nbeam,nif,nchan,npol - the number of beams/IFs/Pols/Chans
    428440            nscan           - the number of scans in the scantable
    429             nrow            - te number of spectra in the scantable
     441            nrow            - the number of spectra in the scantable
    430442            history         - print the history of the scantable
    431443            get_fit         - get a fit which has been stored witnh the data
  • trunk/python/asaplotgui.py

    r1153 r1422  
    55from asap.asaplotbase import *
    66import Tkinter as Tk
     7import matplotlib
    78from matplotlib.backends.backend_tkagg import FigureCanvasTkAgg, \
    89        FigureManagerTkAgg
    910# Force use of the newfangled toolbar.
    10 import matplotlib
    11 matplotlib.use("TkAgg")
    1211matplotlib.rcParams['toolbar'] = 'toolbar2'
    1312
Note: See TracChangeset for help on using the changeset viewer.