Changeset f95301b in sasview for sansview/perspectives/fitting
- Timestamp:
- Mar 16, 2011 8:33:57 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:
- 02775ab8
- Parents:
- c8afcb7
- Location:
- sansview/perspectives/fitting
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
sansview/perspectives/fitting/basepage.py
r36cb4d2f rf95301b 67 67 self.id = None 68 68 ## Q range 69 self.qmin = None 70 self.qmax = None 69 71 self.qmax_x = _QMAX_DEFAULT 70 72 self.qmin_x = _QMIN_DEFAULT … … 1351 1353 # if self.check_invalid_panel(): 1352 1354 # return 1353 self.qmin _tctrl.SetValue(str(state.qmin))1355 self.qmin.SetValue(str(state.qmin)) 1354 1356 self.qmax.SetValue(str(state.qmax)) 1355 1357 … … 1406 1408 # If qmin and qmax have been modified, update qmin and qmax and 1407 1409 # set the is_modified flag to True 1408 if self._validate_qrange(self.qmin _tcrl, self.qmax):1409 tempmin = float(self.qmin _tcrl.GetValue())1410 if self._validate_qrange(self.qmin, self.qmax): 1411 tempmin = float(self.qmin.GetValue()) 1410 1412 if tempmin != self.qmin_x: 1411 1413 self.qmin_x = tempmin … … 1461 1463 # If qmin and qmax have been modified, update qmin and qmax and 1462 1464 # set the is_modified flag to True 1463 self.fitrange = self._validate_qrange(self.qmin _tcrl, self.qmax)1465 self.fitrange = self._validate_qrange(self.qmin, self.qmax) 1464 1466 if self.fitrange: 1465 tempmin = float(self.qmin _tcrl.GetValue())1467 tempmin = float(self.qmin.GetValue()) 1466 1468 if tempmin != self.qmin_x: 1467 1469 self.qmin_x = tempmin … … 1892 1894 tcrtl.SetBackgroundColour(wx.WHITE) 1893 1895 # If qmin and qmax have been modified, update qmin and qmax 1894 if self._validate_qrange(self.qmin _tcrl, self.qmax):1895 tempmin = float(self.qmin _tcrl.GetValue())1896 if self._validate_qrange(self.qmin, self.qmax): 1897 tempmin = float(self.qmin.GetValue()) 1896 1898 if tempmin != self.qmin_x: 1897 1899 self.qmin_x = tempmin … … 2127 2129 self.data.qy_data * self.data.qy_data ) 2128 2130 #get unmasked index 2129 index_data = (float(self.qmin _tcrl.GetValue()) <= radius) & \2131 index_data = (float(self.qmin.GetValue()) <= radius) & \ 2130 2132 (radius <= float(self.qmax.GetValue())) 2131 2133 index_data = (index_data) & (self.data.mask) … … 2134 2136 if len(index_data[index_data]) < 10: 2135 2137 # change the color pink. 2136 self.qmin _tcrl.SetBackgroundColour("pink")2137 self.qmin _tcrl.Refresh()2138 self.qmin.SetBackgroundColour("pink") 2139 self.qmin.Refresh() 2138 2140 self.qmax.SetBackgroundColour("pink") 2139 2141 self.qmax.Refresh() … … 2539 2541 else: 2540 2542 # set relative text ctrs. 2541 self.qmin _tcrl.SetValue(str(self.qmin_x))2543 self.qmin.SetValue(str(self.qmin_x)) 2542 2544 self.qmax.SetValue(str(self.qmax_x)) 2543 2545 self.set_npts2fit() -
sansview/perspectives/fitting/fitpage.py
r36cb4d2f rf95301b 361 361 self.sizer5.Clear(True) 362 362 363 self.qmin _tcrl= self.ModelTextCtrl(self, -1,size=(_BOX_WIDTH,20),363 self.qmin = self.ModelTextCtrl(self, -1,size=(_BOX_WIDTH,20), 364 364 style=wx.TE_PROCESS_ENTER, 365 365 text_enter_callback = self._onQrangeEnter) 366 self.qmin _tcrl.SetValue(str(self.qmin_x))367 self.qmin _tcrl.SetToolTipString("Minimun value of Q in linear scale.")366 self.qmin.SetValue(str(self.qmin_x)) 367 self.qmin.SetToolTipString("Minimun value of Q in linear scale.") 368 368 369 369 self.qmax = self.ModelTextCtrl(self, -1,size=(_BOX_WIDTH,20), … … 398 398 sizer.Add(self.EditMask_title) 399 399 sizer.Add(self.reset_qrange) 400 sizer.Add(self.qmin _tcrl)400 sizer.Add(self.qmin) 401 401 sizer.Add(self.qmax) 402 402 sizer.Add(self.theory_npts_tcrtl) … … 963 963 # Remove or do not allow fitting on the Q=0 point, especially 964 964 # when y(q=0)=None at x[0]. 965 self.qmin_x = float(self.qmin _tcrl.GetValue())965 self.qmin_x = float(self.qmin.GetValue()) 966 966 self.qmax_x = float( self.qmax.GetValue()) 967 967 self._manager._reset_schedule_problem(id=self.id, value=0) … … 1174 1174 1175 1175 # If qmin and qmax have been modified, update qmin and qmax 1176 if self._validate_qrange( self.qmin _tcrl, self.qmax):1177 tempmin = float(self.qmin _tcrl.GetValue())1176 if self._validate_qrange( self.qmin, self.qmax): 1177 tempmin = float(self.qmin.GetValue()) 1178 1178 if tempmin != self.qmin_x: 1179 1179 self.qmin_x = tempmin … … 1589 1589 self.minimum_q.SetValue(str(data_min)) 1590 1590 self.maximum_q.SetValue(str(data_max)) 1591 self.qmin _tcrl.SetValue(str(data_min))1591 self.qmin.SetValue(str(data_min)) 1592 1592 self.qmax.SetValue(str(data_max)) 1593 self.qmin _tcrl.SetBackgroundColour("white")1593 self.qmin.SetBackgroundColour("white") 1594 1594 self.qmax.SetBackgroundColour("white") 1595 1595 self.state.data = data -
sansview/perspectives/fitting/fitpanel.py
r8ee56a9 rf95301b 157 157 page_is_opened = False 158 158 if state is not None: 159 for id, panel in self.opened_pages. values():159 for id, panel in self.opened_pages.iteritems(): 160 160 #Don't return any panel is the exact same page is created 161 161 if id == panel.id: -
sansview/perspectives/fitting/fitting.py
r17553ae rf95301b 337 337 338 338 data.group_id = state.data.group_id 339 self.parent.add_data(data_list= [data])339 self.parent.add_data(data_list={data.id:data}) 340 340 wx.PostEvent(self.parent, NewPlotEvent(plot=data, 341 341 title=data.title)) 342 #need to be fix later make sure we are sendind guiframe.data 343 #to panel 344 state.data = data 342 345 page = self.fit_panel.set_state(state) 343 346 else: 344 self.parent.add_data(data_list=[data])345 wx.PostEvent(self.parent, NewPlotEvent(plot=data,346 title=data.title))347 347 #just set data because set_state won't work 348 348 data = self.parent.create_gui_data(state.data) 349 349 data.group_id = state.data.group_id 350 self.parent.add_data(data_list={data.id:data}) 351 wx.PostEvent(self.parent, NewPlotEvent(plot=data, 352 title=data.title)) 350 353 self.add_fit_page(data) 351 354 caption = panel.window_name
Note: See TracChangeset
for help on using the changeset viewer.