Changeset 2603


Ignore:
Timestamp:
07/20/12 12:39:13 (12 years ago)
Author:
Kana Sugimoto
Message:

New Development: No

JIRA Issue: No (bug fixes and a minor improvement)

Ready for Test: Yes

Interface Changes: No

What Interface Changed:

Test Programs: interactive test needed.

Put in Release Notes: No

Module(s): asapplotter, flagplotter, and sdplot (CASA)

Description:

Fixed bugs in asapplotter and flagplotter which prevented users from exiting
from notation mode, when the other buttons in the additional toolbar is not active.
Consintently use 'self._data' in asapplotter.plotgrid() instead of 'scan'.


Location:
trunk/python
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/python/asapplotter.py

    r2602 r2603  
    16241624                self._data = scan
    16251625                self._reset()
    1626         elif self._data:
    1627             scan = self._data
    1628         else:
     1626        elif not self._data:
    16291627            msg = "Input is not a scantable"
    16301628            raise TypeError(msg)
     
    17581756        self._plotter.set_panels(rows=self._rows,cols=self._cols,
    17591757                                 nplots=ntotpl,margin=self._margins,ganged=True)
    1760         if self.casabar_exists(): self._plotter.figmgr.casabar.disable_button()
     1758        if self.casabar_exists():
     1759            #self._plotter.figmgr.casabar.disable_button()
     1760            self._plotter.figmgr.casabar.set_pagecounter(1)
     1761            self._plotter.figmgr.casabar.enable_button()
    17611762        # Actual plot
    17621763        npl = 0
     
    17871788                                  linestyle=0,linestyles=self._linestyles)
    17881789            xlab = self._abcissa and self._abcissa[ipanel] \
    1789                    or scan._getabcissalabel(irow)
     1790                   or self._data._getabcissalabel(irow)
    17901791            if self._offset and not self._abcissa:
    17911792                xlab += " (relative)"
    17921793            ylab = self._ordinate and self._ordinate[ipanel] \
    1793                    or scan._get_ordinate_label()
     1794                   or self._data._get_ordinate_label()
    17941795            self._plotter.set_axes('xlabel', xlab)
    17951796            self._plotter.set_axes('ylabel', ylab)
     
    17991800            self._plotter.set_axes('title',lbl)
    18001801
    1801             y = scan._getspectrum(irow)
     1802            y = self._data._getspectrum(irow)
    18021803            # flag application
    1803             mr = scan._getflagrow(irow)
     1804            mr = self._data._getflagrow(irow)
    18041805            if mr:  # FLAGROW=True
    18051806                y = ma.masked_array(y,mask=mr)
    18061807            else:
    1807                 m = scan._getmask(irow)
     1808                m = self._data._getmask(irow)
    18081809                from numpy import logical_not, logical_and
    18091810                ### user mask is not available so far
     
    18131814                y = ma.masked_array(y,mask=logical_not(array(m,copy=False)))
    18141815
    1815             x = array(scan._getabcissa(irow))
     1816            x = array(self._data._getabcissa(irow))
    18161817            if self._offset:
    18171818                x += self._offset
  • trunk/python/customgui_qt4agg.py

    r2173 r2603  
    131131            self.mode = 'none'
    132132            self.spec_show()
     133            if not self.button:
     134                self.notewin.close_widgets()
     135                self.__disconnect_event()
    133136            return
    134137        self.figmgr.toolbar.set_message("text: select a position/text")
     
    662665            self.mode = 'none'
    663666            self.spec_show()
     667            if not self.button:
     668                self.notewin.close_widgets()
     669                self.__disconnect_event()
    664670            return
    665671        self.figmgr.toolbar.set_message('text: select a position/text')
  • trunk/python/customgui_tkagg.py

    r2416 r2603  
    117117    def modify_note(self):
    118118        if not self.figmgr.toolbar.mode == '': return
    119         self.figmgr.toolbar.set_message('text: select a position/text')
    120119        if self.mode == 'note':
    121120            self.bNote.config(relief='raised')
    122121            self.mode = 'none'
    123122            self.spec_show()
     123            if not self.button:
     124                self.notewin.close_widgets()
     125                self.__disconnect_event()
    124126            return
     127        self.figmgr.toolbar.set_message('text: select a position/text')
    125128        #self.bSpec.config(relief='raised')
    126129        self.bStat.config(relief='raised')
     
    603606            self.mode = 'none'
    604607            self.spec_show()
     608            if not self.button:
     609                self.notewin.close_widgets()
     610                self.__disconnect_event()
    605611            return
    606612        self.figmgr.toolbar.set_message('text: select a position/text')
Note: See TracChangeset for help on using the changeset viewer.