Changeset 2602 for trunk/python


Ignore:
Timestamp:
07/19/12 16:20:07 (12 years ago)
Author:
Kana Sugimoto
Message:

New Development: No

JIRA Issue: Yes (CAS-1814/Trac-271)

Ready for Test: Yes

Interface Changes: No

What Interface Changed:

Test Programs:

Put in Release Notes: No

Module(s): asapplotter, sdplot (CASA)

Description:

Fixed a couple of bugs in asapplotter.plotgrid.
Enabled colormap and linestyle specifications for plotgrid.
Ommitted debug output messages.


File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/python/asapplotter.py

    r2600 r2602  
    16871687            xgrid = wx/self._cols
    16881688            ygrid = wy/self._rows
    1689             print "Pointing range: (x, y) = (%f - %f, %f - %f)" %\
    1690               (dirarr[0].min(),dirarr[0].max(),dirarr[1].min(),dirarr[1].max())
     1689            #print "Pointing range: (x, y) = (%f - %f, %f - %f)" %\
     1690            #  (dirarr[0].min(),dirarr[0].max(),dirarr[1].min(),dirarr[1].max())
    16911691            # identical R.A. and/or Dec. for all spectra.
    16921692            if xgrid == 0:
     
    17001700        #    # spacing is a quantity
    17011701        elif isinstance(spacing,list) and len(spacing) > 1:
    1702             for val in spacing[0:2]:
    1703                 if not isinstance(val, str):
     1702            for i in xrange(2):
     1703                val = spacing[i]
     1704                if not isinstance(val, float):
    17041705                    raise TypeError("spacing should be a list of float")
     1706                if val > 0.:
     1707                    spacing[i] = -val
    17051708            spacing = spacing[0:2]
    17061709        else:
     
    17161719        #ybound = [center[1]-spacing[1]*self._rows/2.,
    17171720        #          center[1]+spacing[1]*self._rows/2.]
    1718         print "Plot range: (x, y) = (%f - %f, %f - %f)" %\
    1719               (minpos[0],minpos[0]+spacing[0]*self._cols,
    1720                minpos[1],minpos[1]+spacing[1]*self._rows)
    1721         #      (xbound[0],xbound[1],ybound[0],ybound[1])
     1721        #print "Plot range: (x, y) = (%f - %f, %f - %f)" %\
     1722        #      (minpos[0],minpos[0]+spacing[0]*self._cols,
     1723        #       minpos[1],minpos[1]+spacing[1]*self._rows)
     1724        ##      (xbound[0],xbound[1],ybound[0],ybound[1])
    17221725        ifs = self._data.getifnos()
    17231726        if len(ifs) > 1:
     
    17631766            #if pos[0] < xbound[0] or pos[0] > xbound[1]:
    17641767            if ix < 0 or ix >= self._cols:
    1765                 print "Row %d : Out of X-range (x = %f) ... skipped" % (irow, pos[0])
     1768                #print "Row %d : Out of X-range (x = %f) ... skipped" % (irow, pos[0])
    17661769                continue
    17671770            #ix = min(int((pos[0] - xbound[0])/spacing[0]),self._cols)
     
    17691772            #if pos[1] < ybound[0] or pos[1] > ybound[1]:
    17701773            if iy < 0 or iy >= self._cols:
    1771                 print "Row %d : Out of Y-range (y = %f) ... skipped" % (irow,pos[1])
     1774                #print "Row %d : Out of Y-range (y = %f) ... skipped" % (irow,pos[1])
    17721775                continue
    17731776            #iy = min(int((pos[1]- ybound[0])/spacing[1]),self._rows)
    17741777            ipanel = ix + iy*self._cols
    17751778            if len(self._plotter.subplots[ipanel]['lines']) > 0:
    1776                 print "Row %d : panel %d lready plotted ... skipped" % (irow,ipanel)
     1779                #print "Row %d : panel %d lready plotted ... skipped" % (irow,ipanel)
    17771780                # a spectrum already plotted in the panel
    17781781                continue
    17791782            # Plotting this row
    1780             print "PLOTTING row %d (panel=%d)" % (irow, ipanel)
     1783            #print "PLOTTING row %d (panel=%d)" % (irow, ipanel)
    17811784            npl += 1
    17821785            self._plotter.subplot(ipanel)
    1783             self._plotter.palette(0)
     1786            self._plotter.palette(0,colormap=self._colormap, \
     1787                                  linestyle=0,linestyles=self._linestyles)
    17841788            xlab = self._abcissa and self._abcissa[ipanel] \
    17851789                   or scan._getabcissalabel(irow)
Note: See TracChangeset for help on using the changeset viewer.