Changeset 3370922 in sasview for sansview/perspectives
- Timestamp:
- Apr 16, 2009 1:11:03 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:
- 54c21f50
- Parents:
- 847091f
- Location:
- sansview/perspectives/fitting
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
sansview/perspectives/fitting/basepage.py
r997131a r3370922 4 4 import numpy 5 5 import time 6 6 import copy 7 7 from sans.guiframe.utils import format_number,check_float 8 8 from sans.guicomm.events import StatusEvent … … 443 443 if hasattr(self,"enable_disp"): 444 444 self.state.enable_disp= self.enable_disp.GetValue() 445 445 446 self.state.smearer = copy.deepcopy(self.smearer) 446 447 if hasattr(self,"enable_smearer"): 447 self.state.enable_smearer = self.enable_smearer.GetValue()448 self.state.enable_smearer = copy.deepcopy(self.enable_smearer.GetValue()) 448 449 449 450 if hasattr(self,"disp_box"): … … 472 473 self.model= self.state.model 473 474 self.data = self.state.data 475 self.smearer= self.state.smearer 476 self.state.enable_smearer=state.enable_smearer 474 477 475 478 ##model parameter values restore … … 483 486 self.disp_box.SetSelection(self.state.disp_box) 484 487 self._set_dipers_Param(event=None) 485 488 ##plotting range restore 489 self._reset_plotting_range() 486 490 ## smearing info restore 487 491 if hasattr(self,"enable_smearer"): 492 ## set smearing value whether or not the data contain the smearing info 488 493 self.enable_smearer.SetValue(state.enable_smearer) 489 ## reset state of checkbox,textcrtl and parameters value 490 491 ##plotting range restore 492 self._reset_plotting_range() 494 self.compute_chisqr(smearer= self.smearer) 495 493 496 ## reset context menu items 494 497 self._reset_context_menu() 495 498 ## reset state of checkbox,textcrtl and parameters value 496 499 self._reset_parameters_state(self.parameters,state.parameters) 497 500 self._reset_parameters_state(self.fittable_param,state.fittable_param) … … 803 806 """ 804 807 if self.model !=None: 808 805 809 self.manager.draw_model(self.model, data=self.data, 810 smearer= self.smearer, 806 811 qmin=float(self.qmin_x), qmax=float(self.qmax_x), 807 812 qstep= float(self.num_points), -
sansview/perspectives/fitting/fitpage.py
r847091f r3370922 610 610 are compute when fitting 611 611 """ 612 612 temp_smearer = None 613 613 if self.enable_smearer.GetValue(): 614 614 msg="" … … 624 624 wx.PostEvent(self.manager.parent, StatusEvent(status=\ 625 625 "Data contains smearing information %s"%msg)) 626 else: 627 temp_smearer = None 626 628 627 ## set smearing value whether or not the data contain the smearing info 629 self.manager.set_smearer( temp_smearer, qmin= float(self.qmin_x),628 self.manager.set_smearer(smearer=temp_smearer, qmin= float(self.qmin_x), 630 629 qmax= float(self.qmax_x)) 631 630 ##Calculate chi2 … … 633 632 ## save the state enable smearing 634 633 self.save_current_state() 634 635 635 636 636 -
sansview/perspectives/fitting/fitting.py
r847091f r3370922 359 359 ## redraw the model with data smeared 360 360 361 smear er=self.page_finder[current_pg].get_smearer()362 self.draw_model( model=model, data= data, smearer= smear er,361 smear =self.page_finder[current_pg].get_smearer() 362 self.draw_model( model=model, data= data, smearer= smear, 363 363 qmin= qmin, qmax= qmax) 364 364 … … 1070 1070 qmin = min(data.x) 1071 1071 if qmax == DEFAULT_QMAX: 1072 qmax = max(data.x) 1072 qmax = max(data.x) 1073 1073 1074 1074 1075 if not enable1D: -
sansview/perspectives/fitting/pagestate.py
r60132ef r3370922 42 42 ## orientation parameters 43 43 self.orientation_params=[] 44 ## smearer info 45 self.smearer=None 44 46 #list of dispersion paramaters 45 47 self.disp_list =[] … … 96 98 obj.npts = copy.deepcopy(self.npts ) 97 99 obj.cb1 = copy.deepcopy(self.cb1) 100 obj.smearer = copy.deepcopy(self.smearer) 101 98 102 for name, state in self.saved_states.iteritems(): 99 103 copy_name = copy.deepcopy(name)
Note: See TracChangeset
for help on using the changeset viewer.