Changeset 1175


Ignore:
Timestamp:
08/23/06 13:15:32 (18 years ago)
Author:
mar637
Message:

various changes to support the pylab plotter 'xyplotter'

Location:
trunk/python
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/python/__init__.py

    r1171 r1175  
    349349    from  asapplotter import asapplotter
    350350    gui = os.environ.has_key('DISPLAY') and rcParams['plotter.gui']
     351    if gui:
     352        import pylab as xyplotter
    351353    plotter = asapplotter(gui)
    352354    del gui
     
    528530            axhline,axvline - draw horizontal/vertical lines
    529531            axhspan,axvspan - draw horizontal/vertical regions
    530            
     532
     533        xyplotter           - matplotlib/pylab plotting functions
     534
    531535    [Reading files]
    532536        reader              - access rpfits/sdfits files
  • trunk/python/asapplotter.py

    r1174 r1175  
    580580        # convert this into lengths
    581581        n0,nstack0 = self._get_selected_n(scan)
    582         n = len(n0)
    583582        if isinstance(n0, int): n = n0
    584         nstack = len(nstack0)
     583        else: n = len(n0)
    585584        if isinstance(nstack0, int): nstack = nstack0
     585        else: nstack = len(nstack0)
    586586        maxpanel, maxstack = 16,8
    587587        if n > maxpanel or nstack > maxstack:
     
    731731             'i': "IF"+str(scan.getif(row)),
    732732             'p': poleval,
    733              't': scan._gettime(row) }
     733             't': str(scan.get_time(row)) }
    734734        return userlabel or d[mode]
    735735
  • trunk/python/scantable.py

    r1157 r1175  
    411411            print "--------------------------------------------------"
    412412            print out
    413         retval = {'axesnames': axesnames, 'axes': axes, 'data': outvec}
    414         return retval
     413        # disabled because the vector seems more useful
     414        #retval = {'axesnames': axesnames, 'axes': axes, 'data': outvec}
     415        return outvec
    415416
    416417    def _get_column(self, callback, row=-1):
     
    433434            none
    434435        """
    435         return self._get_column(self._gettime, row)
     436        from time import strptime
     437        from datetime import datetime
     438        times = self._get_column(self._gettime, row)
     439        format = "%Y/%m/%d/%H:%M:%S"
     440        if isinstance(times, list):
     441            return [datetime(*strptime(i, format)[:6]) for i in times]
     442        else:
     443            return datetime(*strptime(times, format)[:6])
    436444
    437445    def get_sourcename(self, row=-1):
Note: See TracChangeset for help on using the changeset viewer.