- Timestamp:
- Apr 13, 2009 7:39:35 PM (16 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:
- fb8daaaf
- Parents:
- 7959f297
- Location:
- sansview/perspectives/fitting
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
sansview/perspectives/fitting/fitpage.py
r60d6c23 r707436d 40 40 self.text_disp_1=None 41 41 ## default fitengine type 42 self.engine_type = "scipy"42 self.engine_type = None 43 43 ## draw sizer 44 44 self._fill_datainfo_sizer() … … 630 630 self.sizer3.Clear(True) 631 631 self.parameters = [] 632 #self.page_info.parameters=[]633 632 self.param_toFit=[] 634 633 self.fittable_param=[] … … 639 638 self.SetScrollbars(20,20,200,100) 640 639 return 640 ## the panel is drawn using the current value of the fit engine 641 if self.engine_type==None and self.manager !=None: 642 self.engine_type= self.manager._return_engine_type() 643 641 644 box_description= wx.StaticBox(self, -1,str("Model Parameters")) 642 645 boxsizer1 = wx.StaticBoxSizer(box_description, wx.VERTICAL) -
sansview/perspectives/fitting/fitting.py
r60d6c23 r707436d 96 96 id3 = wx.NewId() 97 97 scipy_help= "Scipy Engine: Perform Simple fit. More in Help window...." 98 #self.menu1.Append(id3, "Scipy",scipy_help)99 98 self.menu1.AppendCheckItem(id3, "Simple Fit [Scipy]",scipy_help) 100 99 wx.EVT_MENU(owner, id3, self._onset_engine_scipy) … … 104 103 self.menu1.AppendCheckItem(id3, "Complex Fit [Park]",park_help) 105 104 wx.EVT_MENU(owner, id3, self._onset_engine_park) 105 106 self.menu1.FindItemByPosition(0).Check(True) 107 self.menu1.FindItemByPosition(1).Check(False) 108 106 109 self.menu1.AppendSeparator() 107 110 … … 405 408 ## if simultaneous fit change automatically the engine to park 406 409 if fitproblem_count >1: 407 self.menu1.FindItemByPosition(1).Check(True)408 self.menu1.FindItemByPosition(0).Check(False)409 410 self._on_change_engine(engine='park') 410 411 … … 702 703 set engine to park 703 704 """ 704 if event.IsChecked():705 self.menu1.FindItemByPosition(0).Check(False)706 705 self._on_change_engine('park') 707 706 … … 711 710 set engine to scipy 712 711 """ 713 if event.IsChecked():714 self.menu1.FindItemByPosition(1).Check(False)715 712 self._on_change_engine('scipy') 716 713 … … 730 727 new_panel 731 728 self.mypanels.append(new_panel) 732 return 733 729 return 730 731 732 def _return_engine_type(self): 733 """ 734 return the current type of engine 735 """ 736 return self._fit_engine 737 738 734 739 def _on_change_engine(self, engine='park'): 735 740 """ … … 739 744 ## saving fit engine name 740 745 self._fit_engine = engine 746 ## change menu item state 747 if engine=="park": 748 self.menu1.FindItemByPosition(0).Check(False) 749 self.menu1.FindItemByPosition(1).Check(True) 750 else: 751 self.menu1.FindItemByPosition(0).Check(True) 752 self.menu1.FindItemByPosition(1).Check(False) 753 741 754 ## post a message to status bar 742 755 wx.PostEvent(self.parent, StatusEvent(status="Engine set to: %s" % self._fit_engine))
Note: See TracChangeset
for help on using the changeset viewer.