Changeset fc6ea43 in sasview
- Timestamp:
- Apr 17, 2009 3:06:31 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:
- da594d0
- Parents:
- 41340860
- Location:
- sansview/perspectives/fitting
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
sansview/perspectives/fitting/basepage.py
rc16557c rfc6ea43 332 332 return 333 333 if hasattr(self,"enable_disp"): 334 self.state.enable_disp = self.enable_disp.GetValue()334 self.state.enable_disp = copy.deepcopy(self.enable_disp.GetValue()) 335 335 if hasattr(self, "disp_box"): 336 self.state.disp_box = self.disp_box.GetSelection()336 self.state.disp_box = copy.deepcopy(self.disp_box.GetSelection()) 337 337 338 338 self.state.model = self.model.clone() … … 345 345 346 346 ## Add item in the context menu 347 year, month, day,hour,minute,second,tda,ty,tm_isdst= time.gmtime() 348 my_time= str(hour)+"hrs "+str(minute)+"min "+str(second)+"s" 347 348 year, month, day,hour,minute,second,tda,ty,tm_isdst= time.localtime() 349 my_time= str(hour)+" : "+str(minute)+" : "+str(second)+" " 349 350 date= str( month)+"|"+str(day)+"|"+str(year) 350 351 msg= "Model saved at %s on %s"%(my_time, date) … … 443 444 if hasattr(self,"enable_disp"): 444 445 self.state.enable_disp= self.enable_disp.GetValue() 445 446 self.state.disable_disp = self.disable_disp.GetValue() 447 446 448 self.state.smearer = copy.deepcopy(self.smearer) 447 449 if hasattr(self,"enable_smearer"): 448 450 self.state.enable_smearer = copy.deepcopy(self.enable_smearer.GetValue()) 451 self.state.disable_smearer = copy.deepcopy(self.disable_smearer.GetValue()) 452 449 453 450 454 if hasattr(self,"disp_box"): … … 453 457 454 458 ## save checkbutton state and txtcrtl values 455 self.state.parameters=[]456 self.state.fittable_param=[]457 self.state.fixed_param=[]458 459 459 460 self._copy_parameters_state(self.parameters, self.state.parameters) 460 461 self._copy_parameters_state(self.fittable_param, self.state.fittable_param) 461 462 self._copy_parameters_state(self.fixed_param, self.state.fixed_param) 463 self._copy_parameters_state(self.orientation_params, 464 self.state.orientation_params) 465 self._copy_parameters_state(self.orientation_params_disp, 466 self.state.orientation_params_disp) 462 467 463 468 ## post state to fit panel … … 483 488 ## display dispersion info layer 484 489 self.enable_disp.SetValue(self.state.enable_disp) 490 self.disable_disp.SetValue(self.state.disable_disp) 485 491 if hasattr(self, "disp_box"): 486 492 self.disp_box.SetSelection(self.state.disp_box) … … 492 498 ## set smearing value whether or not the data contain the smearing info 493 499 self.enable_smearer.SetValue(state.enable_smearer) 500 self.disable_smearer.SetValue(state.disable_smearer) 494 501 self.compute_chisqr(smearer= self.smearer) 495 502 … … 500 507 self._reset_parameters_state(self.fittable_param,state.fittable_param) 501 508 self._reset_parameters_state(self.fixed_param,state.fixed_param) 509 self._reset_parameters_state(self.orientation_params_disp, 510 state.orientation_params_disp) 511 self._reset_parameters_state(self.orientation_params, 512 state.orientation_params) 502 513 503 514 ## draw the model with previous parameters value … … 999 1010 1000 1011 ## post state to fit panel 1001 self.save_current_state() 1012 self.state.model =self.model 1013 ## post state to fit panel 1014 event = PageInfoEvent(page = self) 1015 wx.PostEvent(self.parent, event) 1016 1002 1017 self.sizer4_4.Layout() 1003 1018 self.sizer4.Layout() -
sansview/perspectives/fitting/fitting.py
r41340860 rfc6ea43 1009 1009 theory.detector= data.detector 1010 1010 theory.source= data.source 1011 1011 1012 1012 ## plot boundaries 1013 1013 theory.ymin= data.ymin -
sansview/perspectives/fitting/modelpage.py
rd1e0473 rfc6ea43 227 227 ctl1.Bind(wx.EVT_KILL_FOCUS, self._onparamEnter) 228 228 ctl1.Bind(wx.EVT_TEXT_ENTER,self._onparamEnter) 229 ctl1.Disable() 229 if not self.enable2D: 230 ctl1.Disable() 231 else: 232 ctl1.Enable() 230 233 self.sizer4_4.Add(ctl1, (iy,ix),(1,1), wx.EXPAND) 231 234 self.fittable_param.append([None,name1,ctl1,None, … … 242 245 Tctl1.Bind(wx.EVT_KILL_FOCUS, self._onparamEnter) 243 246 Tctl1.Bind(wx.EVT_TEXT_ENTER,self._onparamEnter) 244 Tctl1.Disable() 247 if not self.enable2D: 248 Tctl1.Disable() 249 else: 250 Tctl1.Enable() 245 251 self.sizer4_4.Add(Tctl1, (iy,ix),(1,1), 246 252 wx.EXPAND|wx.ADJUST_MINSIZE, 0) … … 258 264 Tctl2.Bind(wx.EVT_KILL_FOCUS, self._onparamEnter) 259 265 Tctl2.Bind(wx.EVT_TEXT_ENTER,self._onparamEnter) 260 Tctl2.Disable() 266 if not self.enable2D: 267 Tctl2.Disable() 268 else: 269 Tctl2.Enable() 261 270 self.sizer4_4.Add(Tctl2, (iy,ix),(1,1), 262 271 wx.EXPAND|wx.ADJUST_MINSIZE, 0) -
sansview/perspectives/fitting/pagestate.py
r3370922 rfc6ea43 42 42 ## orientation parameters 43 43 self.orientation_params=[] 44 ## orientation parmaters for gaussian dispersity 45 self.orientation_params_disp=[] 44 46 ## smearer info 45 47 self.smearer=None … … 64 66 ## enable smearering state 65 67 self.enable_smearer = False 68 self.disable_smearer = True 66 69 ## disperity selection 67 70 self.enable_disp= False 71 self.disable_disp= True 68 72 ## state of selected all check button 69 73 self.cb1 = False … … 87 91 obj.manager = self.manager 88 92 obj.event_owner = self.event_owner 93 89 94 obj.parameters = copy.deepcopy(self.parameters) 90 95 obj.fixed_param = copy.deepcopy(self.fixed_param) 91 96 obj.fittable_param = copy.deepcopy(self.fittable_param) 92 97 obj.orientation_params = copy.deepcopy(self.orientation_params) 98 obj.orientation_params_disp = copy.deepcopy(self.orientation_params_disp) 99 93 100 obj.enable_disp = copy.deepcopy(self.enable_disp) 101 obj.disable_disp = copy.deepcopy(self.disable_disp) 102 94 103 obj.enable_smearer = copy.deepcopy(self.enable_smearer) 104 obj.disable_smearer = copy.deepcopy(self.disable_smearer) 105 95 106 obj.disp_box = copy.deepcopy(self.disp_box) 96 107 obj.qmin = copy.deepcopy(self.qmin)
Note: See TracChangeset
for help on using the changeset viewer.