Changeset 9237df4 in sasview for sansview/perspectives/fitting/fitting.py
- Timestamp:
- Jan 26, 2010 2:04:48 PM (15 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:
- 2377cd4
- Parents:
- 693500a
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sansview/perspectives/fitting/fitting.py
r1a2dc10 r9237df4 261 261 """ 262 262 self.parent.set_perspective(self.perspective) 263 264 263 265 264 def post_init(self): 266 265 """ … … 272 271 pass 273 272 274 273 def get_tools(self): 274 """ 275 Returns a set of menu entries for tools 276 """ 277 id = wx.NewId() 278 sld_help = "Provides computation related to Scattering Length density" 279 return [("SLD Calculator", sld_help, self.on_calculate_sld)] 280 275 281 def copy_data(self, item, dy=None): 276 282 """ … … 510 516 time.sleep(0.4) 511 517 518 def on_calculate_sld(self, event): 519 """ 520 Compute the scattering length density of molecula 521 """ 522 523 import sld_panel 524 frame = sld_panel.SldWindow(base=self.parent) 525 frame.Show(True) 526 527 512 528 def _onEVT_SLICER_PANEL(self, event): 513 529 """ … … 524 540 self.parent._mgr.Update() 525 541 526 527 542 def _compute_invariant(self, event): 528 543 """ … … 534 549 if plottable.name == self.panel.graph.selected_plottable: 535 550 data = self.copy_data(item= plottable, dy=plottable.dy) 536 537 print "_compute_invariant",data._yaxis 538 print "_compute_invariant" ,data._yunit 551 539 552 from invariant_panel import InvariantWindow 540 553 frame = InvariantWindow(base=self.parent, data=plottable, graph=self.panel.graph) 541 554 frame.Show(True) 542 #from invariant_panel import InvariantDialog 543 #self.invariant_dlg = InvariantDialog(base=self.parent, 544 # data=plottable) 545 #if self.invariant_dlg.ShowModal() == wx.ID_OK: 546 # pass 547 #self.invariant_dlg.Destroy() 548 555 549 556 def _closed_fitpage(self, event): 550 557 """ … … 553 560 """ 554 561 self.fit_panel._close_fitpage(event.data) 555 556 562 557 563 def _add_page_onmenu(self, name,fitproblem=None): … … 712 718 try: 713 719 page = self.fit_panel.add_fit_page(data) 720 page.set_data(data) 714 721 # add data associated to the page created 715 if page != None:722 if page != None: 716 723 #create a fitproblem storing all link to data,model,page creation 717 724 if not page in self.page_finder.keys(): … … 767 774 768 775 cpage.onsetValues(result.fitness,param_name, result.pvec,result.stderr) 769 """ 770 ## plot the current model with new param 771 metadata = self.page_finder[cpage].get_fit_data() 772 model = self.page_finder[cpage].get_model() 773 qmin, qmax= self.page_finder[cpage].get_range() 774 smearer =self.page_finder[cpage].get_smearer() 775 #Replot models 776 msg= "Single Fit completed. plotting... %s:"%model.name 777 wx.PostEvent(self.parent, StatusEvent(status="%s " % msg)) 778 self.draw_model( model=model, data= metadata, smearer= smearer, 779 qmin= qmin, qmax= qmax) 780 """ 776 781 777 except: 782 778 raise … … 939 935 model = evt.model 940 936 941 if model == None:937 if model == None: 942 938 return 943 939 model.origin_name = model.name
Note: See TracChangeset
for help on using the changeset viewer.