Changeset c8deee5 in sasview for sansview/perspectives/fitting
- Timestamp:
- Feb 2, 2011 3:53:14 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:
- 35f2f49
- Parents:
- 6d3d5ff
- Location:
- sansview/perspectives/fitting
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
sansview/perspectives/fitting/basepage.py
r3f6508f rc8deee5 356 356 self.state.event_owner = owner 357 357 358 def get_state(self): 359 """ 360 """ 361 return self.state 358 362 def get_data(self): 359 363 """ -
sansview/perspectives/fitting/fitpanel.py
r340c2b3 rc8deee5 137 137 self.data = data 138 138 self.model= model 139 self. manager= manager139 self._manager= manager 140 140 self.event_owner= event_owner 141 141 self.model_list_box = model_list_box … … 169 169 PanelBase.__init__(self) 170 170 171 self. manager = None171 self._manager = None 172 172 self.parent = parent 173 173 self.event_owner = None … … 198 198 self.Center() 199 199 200 def get_data(self): 201 """ 202 get the data in the current page 203 """ 204 pos = self.GetSelection() 205 selected_page = self.GetPage(pos) 206 return selected_page.get_data() 207 208 def get_state(self): 209 """ 210 return the state of the current selected page 211 """ 212 pos = self.GetSelection() 213 selected_page = self.GetPage(pos) 214 return selected_page.get_state() 215 200 216 def add_default_pages(self): 201 217 """ … … 247 263 # add data associated to the page created 248 264 if panel is not None: 249 self. manager.store_page(page=panel, data=state.data)265 self._manager.store_page(page=panel, data=state.data) 250 266 panel.reset_page(state=state) 251 267 panel.save_current_state() … … 258 274 #close all panels only when svs file opened 259 275 self.close_all() 260 self. manager.mypanels = []276 self._manager.mypanels = [] 261 277 262 278 def on_close_page(self, event=None): … … 299 315 300 316 """ 301 self. manager = manager317 self._manager = manager 302 318 303 319 … … 332 348 """ 333 349 from simfitpage import SimultaneousFitPage 334 page_finder= self. manager.get_page_finder()350 page_finder= self._manager.get_page_finder() 335 351 self.sim_page = SimultaneousFitPage(self,page_finder=page_finder, id=-1) 336 352 337 353 self.AddPage(self.sim_page,caption="Simultaneous Fit",select=True) 338 self.sim_page.set_manager(self. manager)354 self.sim_page.set_manager(self._manager) 339 355 return self.sim_page 340 356 … … 358 374 page_info = PageInfo(data=data, name=name) 359 375 page_info.event_owner = self.event_owner 360 page_info.manager = self. manager376 page_info.manager = self._manager 361 377 page_info.window_name = name 362 378 page_info.window_caption = name … … 371 387 from fitpage import FitPage 372 388 panel = FitPage(parent=self, page_info=page_info) 389 panel.set_manager(self._manager) 373 390 self.AddPage(page=panel, caption=page_info.window_name, select=True) 374 391 self.opened_pages[page_info.type] = [page_info.window_name, panel] … … 381 398 from fitpage import FitPage 382 399 panel = FitPage(parent=self, page_info=page_info) 400 panel.set_manager(self._manager) 383 401 self.AddPage(page=panel, caption=page_info.window_name, select=True) 384 402 index = self.GetPageIndex(panel) … … 440 458 #delete the previous theory page and add a new one 441 459 name, panel = self.opened_pages[type] 442 #self. manager.reset_plot_panel(panel.get_data())460 #self._manager.reset_plot_panel(panel.get_data()) 443 461 #delete the existing page and replace it 444 462 index = self.GetPageIndex(panel) … … 503 521 ## removing sim_page 504 522 if selected_page == self.sim_page : 505 self. manager.sim_page=None523 self._manager.sim_page=None 506 524 return 507 525 … … 509 527 state = selected_page.createMemento() 510 528 page_name = selected_page.window_name 511 page_finder = self. manager.get_page_finder()529 page_finder = self._manager.get_page_finder() 512 530 fitproblem = None 513 531 ## removing fit page … … 524 542 if flag and selected_page.window_name == name: 525 543 if type.lower() in ['theory1d', 'theory2d']: 526 self. manager.remove_plot(selected_page, theory=True)544 self._manager.remove_plot(selected_page, theory=True) 527 545 else: 528 self. manager.remove_plot(selected_page, theory=False)546 self._manager.remove_plot(selected_page, theory=False) 529 547 break 530 548 del page_finder[selected_page] -
sansview/perspectives/fitting/fitting.py
rcab076b rc8deee5 112 112 #Create a reader for fit page's state 113 113 self.state_reader = None 114 self._extensions = '.fitv' 114 115 self.temp_state = [] 115 116 self.state_index = 0 … … 246 247 #Create reader when fitting panel are created 247 248 self.state_reader = Reader(self.set_state) 249 248 250 #append that reader to list of available reader 249 251 loader = Loader() … … 281 283 wx.PostEvent(self.parent, NewPlotEvent(plot=data, 282 284 title=str(data.title))) 285 283 286 284 287 def set_state(self, state=None, datainfo=None, format=None): … … 300 303 self.sfile_ext = format 301 304 302 def 305 def on_set_state_helper(self,event=None): 303 306 """ 304 307 Set_state_helper. This actually sets state after plotting data from state file.
Note: See TracChangeset
for help on using the changeset viewer.