Changeset 2138 for branches


Ignore:
Timestamp:
04/15/11 11:17:42 (14 years ago)
Author:
Kana Sugimoto
Message:

merged a fix to trunk (r2137)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/casa-prerelease/pre-asap/python/flagtoolbar.py

    r2116 r2138  
    138138                if textobj.contains(event)[0]:
    139139                    return True
    140         #print "No text picked"
    141140        return False
    142141
     
    157156            asaplog.post('WARN')
    158157            return
    159         #print "add the region to selections"
    160         #self._thisregion = {'axes': event.inaxes,'xs': event.xdata,
    161158        self._thisregion = {'axes': event.inaxes,'xs': event.x,
    162159                            'worldx': [event.xdata,event.xdata]}
     
    167164    def _xspan_draw(self,event):
    168165        if event.inaxes == self._thisregion['axes']:
    169             #xnow = event.xdata
    170166            xnow = event.x
    171167            self.xdataold = xnow
     
    174170        try: self.lastspan
    175171        except AttributeError: pass
    176         #else: self.lastspan.remove()
    177172        else: self._remove_span(self.lastspan)
    178173
    179         #self.lastspan = self._thisregion['axes'].axvspan(self._thisregion['xs'],xnow,facecolor='0.7')
    180         self.lastspan = self._draw_span(self._thisregion['axes'],self._thisregion['xs'],xnow,fill="#555555",stipple="gray50")
    181         #self.plotter._plotter.show(False)
    182         #self.plotter._plotter.canvas.draw()
     174        #self.lastspan = self._draw_span(self._thisregion['axes'],self._thisregion['xs'],xnow,fill="#555555",stipple="gray50")
     175        self.lastspan = self._draw_span(self._thisregion['axes'],self._thisregion['xs'],xnow,fill="")
    183176        del xnow
    184177
     
    199192        except AttributeError: pass
    200193        else:
    201             #self.lastspan.remove()
    202194            self._remove_span(self.lastspan)
    203195            del self.lastspan
     
    211203        pregion = self._thisregion['axes'].axvspan(lregion[0],lregion[1],
    212204                                                   facecolor='0.7')
    213         #self.plotter._plotter.show(False)
    214205        self.plotter._plotter.canvas.draw()
    215206        self._polygons.append(pregion)
     
    251242        self.plotter._plotter.canvas.draw()
    252243        asaplog.push("row "+str(irow)+" is selected")
    253         #print "selected rows =",self._selpanels
    254244        ## check for region selection of the spectra and overwrite it.
    255245        ##!!!! currently disabled for consistency with flag tools !!!!
     
    302292                self._polygons.append(ax.add_patch(shadow))
    303293                del ax,shadow
    304         #self.plotter._plotter.show(False)
    305294        self.plotter._plotter.canvas.draw()
    306295        del regions,panels,strow,enrow
     
    402391            asaplog.post('WARN')
    403392            return
    404         #print "Calculate statistics of selected region and spectra"
    405393        self._selected_stats(rows=self._selpanels,regions=self._selregions)
    406         #print "Statistics: "
    407         #print "- rows: ",self._selpanels
    408         #print "- regions:\n   ",self._selregions
    409394        self._clearup_selections(refresh=True)
    410395
     
    422407            for irow in rows:
    423408                for stat in statstr:
    424                     #statval[stat] = scan.stats(stat=stat,row=irow)[0]
    425409                    statval[stat] = mathobj._statsrow(scan,[],stat,irow)[0]
    426410                self._print_stats(scan,irow,statval,statstr=statstr)
     
    437421                mask = scan.create_mask(masklist,invert=False,row=irow)
    438422                for stat in statstr:
    439                     #statval[stat] = scan.stats(stat=stat,row=irow,mask = mask)[0]
    440423                    statval[stat] = mathobj._statsrow(scan,mask,stat,irow)[0]
    441424                self._print_stats(scan,irow,statval,statstr=statstr,mask=masklist)
     
    481464    ### go to the previous page
    482465    def prev_page(self):
    483         #self.figmgr.toolbar.set_message('plotting the previous page')
    484466        self._pause_buttons(operation="start",msg='plotting the previous page')
    485467        self._clear_selection_plot(refresh=False)
     
    490472    ### go to the next page
    491473    def next_page(self):
    492         #self.figmgr.toolbar.set_message('plotting the next page')
    493474        self._pause_buttons(operation="start",msg='plotting the next page')
    494475        self._clear_selection_plot(refresh=False)
     
    509490        self.plotter._plotter.hold()
    510491        self.plotter._plotter.legend(1)
    511         #if goback:
    512         #    self._set_prevpage_counter()
    513492        self._set_plot_counter(pagemode)
    514         #self.plotter._plotter.clear()
    515493        self.plotter._plot(self.plotter._data)
    516494        self.set_pagecounter(self._get_pagenum())
     
    758736    def quit(self):
    759737        self.__disconnect_event()
    760         #self.delete_bar()
    761738        self.disable_button()
    762739        self.figmgr.window.wm_withdraw()
Note: See TracChangeset for help on using the changeset viewer.