- Timestamp:
- May 24, 2010 5:33:44 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:
- 7f69d4d
- Parents:
- 5536035
- Location:
- sansview/perspectives/fitting
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
sansview/perspectives/fitting/basepage.py
r9c38ed4 rf83b94a 2143 2143 sizer_save.Add(self.btSave_title) 2144 2144 sizer_save.Add((20,20),0, wx.LEFT|wx.RIGHT|wx.EXPAND,80) 2145 2146 2145 sizer_save.Add(self.btSave) 2147 2148 2146 boxsizer1.Add(sizer_save) 2149 2147 self.sizer6.Add(boxsizer1,0, wx.EXPAND | wx.ALL, 10) -
sansview/perspectives/fitting/fitting.py
r5536035 rf83b94a 19 19 from copy import deepcopy 20 20 21 import models 22 import fitpage 23 21 24 from DataLoader import Loader 22 25 … … 36 39 from fitpanel import FitPanel 37 40 from fit_thread import FitThread 38 import models 39 import fitpage 41 from pagestate import Reader 40 42 41 43 DEFAULT_BEAM = 0.005 … … 76 78 self.perspective = [] 77 79 #list of panel to send to guiframe 78 self.mypanels =[]80 self.mypanels = [] 79 81 # reference to the current running thread 80 self.calc_2D = None81 self.calc_1D = None82 self.calc_fit = None82 self.calc_2D = None 83 self.calc_1D = None 84 self.calc_fit = None 83 85 84 86 # Start with a good default … … 89 91 self.fitproblem_count = None 90 92 #Flag to let the plug-in know that it is running stand alone 91 self.standalone =True93 self.standalone = True 92 94 ## dictionary of page closed and id 93 self.closed_page_dict = {}95 self.closed_page_dict = {} 94 96 ## Fit engine 95 97 self._fit_engine = 'scipy' 96 98 #List of selected data 97 self.selected_data_list =[]99 self.selected_data_list = [] 98 100 ## list of slicer panel created to display slicer parameters and results 99 self.slicer_panels=[] 100 # Log startup 101 logging.info("Fitting plug-in started") 101 self.slicer_panels = [] 102 102 # model 2D view 103 self.model2D_id =None103 self.model2D_id = None 104 104 #keep reference of the simultaneous fit page 105 self.sim_page =None105 self.sim_page = None 106 106 #dictionary containing data name and error on dy of that data 107 107 self.err_dy = {} 108 self.theory_data = None 109 108 self.theory_data = None 109 #Create a reader for fit page's state 110 self.state_reader = Reader(self.set_state) 111 #append that reader to list of available reader 112 loader = Loader() 113 loader.associate_file_reader(".fitv", self.state_reader) 114 # Log startup 115 logging.info("Fitting plug-in started") 110 116 111 117 def populate_menu(self, id, owner): … … 275 281 Post initialization call back to close the loose ends 276 282 """ 277 # Do not show the fitting perspective immediately and278 # let the application show the Welcome Page.279 #self.parent.set_perspective(self.perspective)280 283 pass 281 284 285 def set_state(self, state, datainfo=None): 286 """ 287 Call-back method for the fit page state reader. 288 This method is called when a .fitv file is loaded. 289 @param state: PageState object 290 """ 291 try: 292 # Load fitting state 293 page = self.fit_panel.set_state(state) 294 # Make sure the user sees the fitting panel after loading 295 self.parent.set_perspective(self.perspective) 296 297 except: 298 raise 299 300 def save_fit_state(self, filepath, fitstate): 301 """ 302 save fit page state into file 303 """ 304 self.state_reader.write(filename=filepath, fitstate=fitstate) 305 282 306 def copy_data(self, item, dy=None): 283 307 """
Note: See TracChangeset
for help on using the changeset viewer.