Changeset 2137
- Timestamp:
- 04/15/11 11:08:36 (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/python/flagtoolbar.py
r2117 r2137 138 138 if textobj.contains(event)[0]: 139 139 return True 140 #print "No text picked"141 140 return False 142 141 … … 157 156 asaplog.post('WARN') 158 157 return 159 #print "add the region to selections"160 #self._thisregion = {'axes': event.inaxes,'xs': event.xdata,161 158 self._thisregion = {'axes': event.inaxes,'xs': event.x, 162 159 'worldx': [event.xdata,event.xdata]} … … 167 164 def _xspan_draw(self,event): 168 165 if event.inaxes == self._thisregion['axes']: 169 #xnow = event.xdata170 166 xnow = event.x 171 167 self.xdataold = xnow … … 174 170 try: self.lastspan 175 171 except AttributeError: pass 176 #else: self.lastspan.remove()177 172 else: self._remove_span(self.lastspan) 178 173 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="") 183 176 del xnow 184 177 … … 199 192 except AttributeError: pass 200 193 else: 201 #self.lastspan.remove()202 194 self._remove_span(self.lastspan) 203 195 del self.lastspan … … 211 203 pregion = self._thisregion['axes'].axvspan(lregion[0],lregion[1], 212 204 facecolor='0.7') 213 #self.plotter._plotter.show(False)214 205 self.plotter._plotter.canvas.draw() 215 206 self._polygons.append(pregion) … … 251 242 self.plotter._plotter.canvas.draw() 252 243 asaplog.push("row "+str(irow)+" is selected") 253 #print "selected rows =",self._selpanels254 244 ## check for region selection of the spectra and overwrite it. 255 245 ##!!!! currently disabled for consistency with flag tools !!!! … … 302 292 self._polygons.append(ax.add_patch(shadow)) 303 293 del ax,shadow 304 #self.plotter._plotter.show(False)305 294 self.plotter._plotter.canvas.draw() 306 295 del regions,panels,strow,enrow … … 402 391 asaplog.post('WARN') 403 392 return 404 #print "Calculate statistics of selected region and spectra"405 393 self._selected_stats(rows=self._selpanels,regions=self._selregions) 406 #print "Statistics: "407 #print "- rows: ",self._selpanels408 #print "- regions:\n ",self._selregions409 394 self._clearup_selections(refresh=True) 410 395 … … 422 407 for irow in rows: 423 408 for stat in statstr: 424 #statval[stat] = scan.stats(stat=stat,row=irow)[0]425 409 statval[stat] = mathobj._statsrow(scan,[],stat,irow)[0] 426 410 self._print_stats(scan,irow,statval,statstr=statstr) … … 437 421 mask = scan.create_mask(masklist,invert=False,row=irow) 438 422 for stat in statstr: 439 #statval[stat] = scan.stats(stat=stat,row=irow,mask = mask)[0]440 423 statval[stat] = mathobj._statsrow(scan,mask,stat,irow)[0] 441 424 self._print_stats(scan,irow,statval,statstr=statstr,mask=masklist) … … 481 464 ### go to the previous page 482 465 def prev_page(self): 483 #self.figmgr.toolbar.set_message('plotting the previous page')484 466 self._pause_buttons(operation="start",msg='plotting the previous page') 485 467 self._clear_selection_plot(refresh=False) … … 490 472 ### go to the next page 491 473 def next_page(self): 492 #self.figmgr.toolbar.set_message('plotting the next page')493 474 self._pause_buttons(operation="start",msg='plotting the next page') 494 475 self._clear_selection_plot(refresh=False) … … 509 490 self.plotter._plotter.hold() 510 491 self.plotter._plotter.legend(1) 511 #if goback:512 # self._set_prevpage_counter()513 492 self._set_plot_counter(pagemode) 514 #self.plotter._plotter.clear()515 493 self.plotter._plot(self.plotter._data) 516 494 self.set_pagecounter(self._get_pagenum()) … … 758 736 def quit(self): 759 737 self.__disconnect_event() 760 #self.delete_bar()761 738 self.disable_button() 762 739 self.figmgr.window.wm_withdraw()
Note:
See TracChangeset
for help on using the changeset viewer.