Changeset 3f6508f in sasview for sansview/perspectives/fitting
- Timestamp:
- Jan 31, 2011 10:03:56 AM (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:
- 213892bc
- Parents:
- d603001
- Location:
- sansview/perspectives/fitting
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
sansview/perspectives/fitting/basepage.py
r4ce74917 r3f6508f 2039 2039 2040 2040 # q value from qx and qy 2041 radius= numpy.sqrt( self.data.qx_data*self.data.qx_data + self.data.qy_data*self.data.qy_data ) 2041 radius= numpy.sqrt( self.data.qx_data * self.data.qx_data + 2042 self.data.qy_data * self.data.qy_data ) 2042 2043 #get unmasked index 2043 index_data = (float(self.qmin.GetValue()) <= radius)&(radius<= float(self.qmax.GetValue())) 2044 index_data = (index_data)&(self.data.mask) 2045 index_data = (index_data)&(numpy.isfinite(self.data.data)) 2044 index_data = (float(self.qmin.GetValue()) <= radius) & \ 2045 (radius <= float(self.qmax.GetValue())) 2046 index_data = (index_data) & (self.data.mask) 2047 index_data = (index_data) & (numpy.isfinite(self.data.data)) 2046 2048 2047 2049 if len(index_data[index_data]) < 10: … … 2405 2407 2406 2408 self.qmin = self.ModelTextCtrl(self, -1,size=(_BOX_WIDTH,20),style=wx.TE_PROCESS_ENTER, 2407 text_enter_callback = self._on paramEnter)2409 text_enter_callback = self._onQrangeEnter) 2408 2410 self.qmin.SetValue(str(self.qmin_x)) 2409 2411 self.qmin.SetToolTipString("Minimun value of Q in linear scale.") 2410 2412 2411 2413 self.qmax = self.ModelTextCtrl(self, -1,size=(_BOX_WIDTH,20),style=wx.TE_PROCESS_ENTER, 2412 text_enter_callback = self._on paramEnter)2414 text_enter_callback = self._onQrangeEnter) 2413 2415 self.qmax.SetValue(str(self.qmax_x)) 2414 2416 self.qmax.SetToolTipString("Maximum value of Q in linear scale.") -
sansview/perspectives/fitting/fitpage.py
rc4397785 r3f6508f 1049 1049 radius= numpy.sqrt( self.data.qx_data*self.data.qx_data + 1050 1050 self.data.qy_data*self.data.qy_data ) 1051 index_data = ((self.qmin <= radius)&(radius<= self.qmax)) 1051 index_data = ((self.qmin_x <= radius)& \ 1052 (radius<= self.qmax_x)) 1052 1053 index_data = (index_data)&(self.data.mask) 1053 1054 index_data = (index_data)&(numpy.isfinite(self.data.data)) 1054 1055 if len(index_data[index_data]) < 10: 1055 msg = "Cannot Plot :No or too little npts in \1056 1056 msg = "Cannot Plot :No or too little npts in" 1057 msg += " that data range!!! " 1057 1058 wx.PostEvent(self.parent.parent, StatusEvent(status = msg )) 1058 1059 return 1059 1060 else: 1060 1061 self.data.mask = index_data 1061 self.Npts_fit.Setvalue(str(len(self.data.mask))) 1062 #self.Npts_fit.SetValue(str(len(self.data.mask))) 1063 self.set_npts2fit() 1062 1064 else: 1063 1065 index_data = ((self.qmin <= self.data.x)& \ 1064 1066 (self.data.x <= self.qmax)) 1065 self.Npts_fit.SetValue(str(len(self.data.x[index_data]))) 1067 #self.Npts_fit.SetValue(str(len(self.data.x[index_data]))) 1068 self.set_npts2fit() 1066 1069 1067 1070 else: … … 2516 2519 self.Layout() 2517 2520 self.Refresh() 2518 #self.SetScrollbars(20,20,25,65)2519 2521 self.SetupScrolling() 2520 2522
Note: See TracChangeset
for help on using the changeset viewer.