Ignore:
Timestamp:
12/14/12 13:48:22 (11 years ago)
Author:
Kana Sugimoto
Message:

New Development: No

JIRA Issue: No

Ready for Test: Yes

Interface Changes: No

What Interface Changed:

Test Programs: iterate pages

Put in Release Notes: No

Module(s): asapplotter and sdplot

Description: An attempt to speed-up page iterations in ASAP plotter.


File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/python/customgui_base.py

    r2606 r2697  
    326326        doheader = (isinstance(header['textobj'],list) and \
    327327                    len(header['textobj']) > 0)
     328        if doheader:
     329            top = self.plotter._plotter.figure.subplotpars.top
     330            fontsize = header['textobj'][0].get_fontproperties().get_size()
    328331        if self.plotter._startrow <= 0:
    329332            msg = "The page counter is reset due to chages of plot settings. "
     
    340343                    selstr = header['selstr']
    341344            self.plotter._reset_header()
    342         if doheader:
    343             top = self.plotter._plotter.figure.subplotpars.top
    344             fontsize = header['textobj'][0].get_fontproperties().get_size()
    345345
    346346        self.plotter._plotter.hold()
     
    349349        #self.plotter._plotter.clear()
    350350        self.plotter._plot(self.plotter._data)
    351         self.set_pagecounter(self._get_pagenum())
     351        pagenum = self._get_pagenum()
     352        self.set_pagecounter(pagenum)
    352353        # Plot header information
    353         if header['textobj']:
     354        #if header['textobj']:
     355        if doheader and pagenum == 1:
    354356            if top and top != self.plotter._margins[3]:
    355357                # work around for sdplot in CASA. complete checking in future?
     
    403405
    404406    def _get_pagenum(self):
    405         maxpanel = 16
    406407        # get the ID of last panel in the current page
    407408        idlastpanel = self.plotter._ipanel
    408         if self.plotter._rows and self.plotter._cols:
    409             ppp = self.plotter._rows*self.plotter._cols
    410         else:
    411             ppp = maxpanel
     409        # max panels in a page
     410        ppp = self.plotter._plotter.rows*self.plotter._plotter.cols
    412411        return int(idlastpanel/ppp)+1
    413412
     
    12391238
    12401239    def _get_pagenum(self):
    1241         maxpanel = 25
    12421240        # get the ID of last panel in the current page
    12431241        idlastpanel = self.plotter._ipanel
    1244         if self.plotter._rows and self.plotter._cols:
    1245             ppp = self.plotter._rows*self.plotter._cols
    1246         else:
    1247             ppp = maxpanel
     1242        # max panels in a page
     1243        ppp = self.plotter._plotter.rows*self.plotter._plotter.cols
    12481244        return int(idlastpanel/ppp)+1
    12491245
Note: See TracChangeset for help on using the changeset viewer.