Changeset db4ed82 in sasview
- Timestamp:
- Mar 16, 2011 3:30:51 PM (14 years ago)
- Branches:
- master, ESS_GUI, ESS_GUI_Docs, ESS_GUI_batch_fitting, ESS_GUI_bumps_abstraction, ESS_GUI_iss1116, ESS_GUI_iss879, ESS_GUI_iss959, ESS_GUI_opencl, ESS_GUI_ordering, ESS_GUI_sync_sascalc, costrafo411, magnetic_scatt, release-4.1.1, release-4.1.2, release-4.2.2, release_4.0.1, ticket-1009, ticket-1094-headless, ticket-1242-2d-resolution, ticket-1243, ticket-1249, ticket885, unittest-saveload
- Children:
- 27f4bee
- Parents:
- 36cb4d2f
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
prview/perspectives/pr/pr.py
re88ebfd rdb4ed82 73 73 self.invertor = None 74 74 self.pr = None 75 self.data_id = IQ_DATA_LABEL 75 76 # Copy of the last result in case we need to display it. 76 77 self._last_pr = None … … 222 223 new_plot.id = "P_{obs}(r)" 223 224 new_plot.title = title 224 self.parent.append_theory(data_id=self.current_plottable.id, 225 theory=new_plot) 225 self.parent.update_theory(data_id=self.data_id, theory=new_plot) 226 226 wx.PostEvent(self.parent, NewPlotEvent(plot=new_plot, title=title)) 227 227 … … 254 254 new_plot.id = "P_{true}(r)" 255 255 new_plot.group_id = "P_{true}(r)" 256 self.parent.append_theory(data_id=self.current_plottable.id, 257 theory=new_plot) 256 self.parent.update_theory(data_id=self.data_id, theory=new_plot) 258 257 #Put this call in plottables/guitools 259 wx.PostEvent(self.parent, NewPlotEvent(plot=new_plot, title="Sphere P(r)")) 258 wx.PostEvent(self.parent, NewPlotEvent(plot=new_plot, 259 title="Sphere P(r)")) 260 260 261 261 … … 314 314 new_plot.group_id = pr.info["plot_group_id"] 315 315 new_plot.id = IQ_FIT_LABEL 316 self.parent.append_theory(data_id=self.current_plottable.id, 317 theory=new_plot) 316 self.parent.update_theory(data_id=self.data_id, theory=new_plot) 318 317 wx.PostEvent(self.parent, NewPlotEvent(plot=new_plot, title=title)) 319 318 … … 342 341 new_plot.id = IQ_SMEARED_LABEL 343 342 new_plot.title = title 344 self.parent.append_theory(data_id=self.current_plottable.id, 345 theory=new_plot) 343 self.parent.update_theory(data_id=self.data_id, theory=new_plot) 346 344 wx.PostEvent(self.parent, NewPlotEvent(plot=new_plot, title=title)) 347 348 345 349 346 def _on_pr_npts(self, evt): … … 410 407 new_plot.ytransform = "y" 411 408 new_plot.group_id = "P(r) fit" 412 self.parent.append_theory(data_id=self.current_plottable.id, 413 theory=new_plot) 409 self.parent.update_theory(data_id=self.data_id, theory=new_plot) 414 410 wx.PostEvent(self.parent, NewPlotEvent(plot=new_plot, title="P(r) fit")) 415 416 411 return x, pr.d_max 417 418 412 419 413 def load(self, data): 420 414 """ … … 669 663 new_plot.xaxis("\\rm{r}", 'A') 670 664 new_plot.yaxis("\\rm{P(r)} ","cm^{-3}") 671 self.parent.append_theory(data_id=self.current_plottable.id, 672 theory=new_plot) 665 self.parent.update_theory(data_id=self.data_id, theory=new_plot) 673 666 wx.PostEvent(self.parent, 674 667 NewPlotEvent(plot=new_plot, update=True, … … 700 693 new_plot.xaxis("\\rm{r}", 'A') 701 694 new_plot.yaxis("\\rm{P(r)} ","cm^{-3}") 702 self.parent.append_theory(data_id=self.current_plottable.id, 703 theory=new_plot) 695 self.parent.update_theory(data_id=self.data_id,theory=new_plot) 704 696 wx.PostEvent(self.parent, 705 697 NewPlotEvent(plot=new_plot, update=True, … … 747 739 748 740 filename = os.path.basename(path) 749 750 741 new_plot = Data1D(x, y) 751 742 new_plot.symbol = GUIFRAME_ID.CURVE_SYMBOL_NUM … … 753 744 new_plot.xaxis("\\rm{r}", 'A') 754 745 new_plot.yaxis("\\rm{P(r)} ","cm^{-3}") 755 756 746 # Store a ref to the plottable for later use 757 747 self._added_plots[filename] = new_plot 758 748 self._default_Iq[filename] = numpy.copy(y) 759 760 749 wx.PostEvent(self.parent, NewPlotEvent(plot=new_plot, title=filename)) 761 750 762 763 764 751 def start_thread(self): 765 752 """ … … 798 785 if not message==None: 799 786 wx.PostEvent(self.parent, StatusEvent(status=str(message))) 800 801 787 self.perform_estimateNT() 802 803 804 788 805 789 def _estimateNT_completed(self, nterms, alpha, message, elapsed): … … 876 860 if pr.info.has_key("plot_group_id"): 877 861 new_plot.group_id = pr.info["plot_group_id"] 878 new_plot.id = IQ_DATA_LABEL879 self.parent. append_theory(data_id=self.current_plottable.id,862 new_plot.id = self.data_id 863 self.parent.update_theory(data_id=self.data_id, 880 864 theory=new_plot) 881 865 wx.PostEvent(self.parent, NewPlotEvent(plot=new_plot, title="Iq")) … … 925 909 new_plot.interactive = True 926 910 new_plot.group_id = IQ_DATA_LABEL 927 new_plot.id = IQ_DATA_LABEL 928 new_plot.title = "I(q)" 929 self.parent.append_theory(data_id=self.current_plottable.id, 930 theory=new_plot) 911 new_plot.id = self.data_id 912 new_plot.title = "I(q)" 931 913 wx.PostEvent(self.parent, 932 914 NewPlotEvent(plot=new_plot, title="I(q)", reset=reset)) … … 1268 1250 new_plot.xaxis("\\rm{Q}", 'A^{-1}') 1269 1251 new_plot.yaxis("\\rm{Intensity} ","cm^{-1}") 1270 self.parent.append_theory(data_id=self.current_plottable.id,1271 theory=new_plot)1272 1252 wx.PostEvent(self.parent, NewPlotEvent(plot=new_plot, title="Iq")) 1273 1253 # Show I(q) fit … … 1354 1334 if issubclass(data.__class__, Data1D): 1355 1335 try: 1336 self.data_id = data.id 1356 1337 self.control_panel._change_file(evt=None, data=data) 1357 1338 except:
Note: See TracChangeset
for help on using the changeset viewer.