Changeset 166f2f8 in sasview for fittingview/src/sans/perspectives
- Timestamp:
- Oct 19, 2011 6:46:12 PM (13 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:
- 3912db5
- Parents:
- 63f4b8e
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
fittingview/src/sans/perspectives/fitting/basepage.py
r3b70cc7 r166f2f8 2199 2199 if self.data == None and self.enable2D: 2200 2200 return flag 2201 2202 # q value from qx and qy2203 radius= numpy.sqrt( self.data.qx_data * self.data.qx_data +2204 self.data.qy_data * self.data.qy_data )2205 #get unmasked index2206 index_data = (float(self.qmin.GetValue()) <= radius) & \2207 (radius <= float(self.qmax.GetValue()))2208 index_data = (index_data) & (self.data.mask)2209 index_data = (index_data) & (numpy.isfinite(self.data.data))2210 2211 if len(index_data[index_data]) < 10:2212 # change the color pink.2213 self.qmin.SetBackgroundColour("pink")2214 self.qmin.Refresh()2215 self.qmax.SetBackgroundColour("pink")2216 self.qmax.Refresh()2217 msg= "Cannot Plot :No or too little npts in that data range!!! "2218 wx.PostEvent(self.parent.parent, StatusEvent(status = msg ))2219 self.fitrange = False2220 flag = False2221 else:2222 self.Npts_fit.SetValue(str(len(self.data.mask[index_data==True])))2223 self.fitrange = True2201 for data in self.data_list: 2202 # q value from qx and qy 2203 radius= numpy.sqrt( data.qx_data * data.qx_data + 2204 data.qy_data * data.qy_data ) 2205 #get unmasked index 2206 index_data = (float(self.qmin.GetValue()) <= radius) & \ 2207 (radius <= float(self.qmax.GetValue())) 2208 index_data = (index_data) & (data.mask) 2209 index_data = (index_data) & (numpy.isfinite(data.data)) 2210 2211 if len(index_data[index_data]) < 10: 2212 # change the color pink. 2213 self.qmin.SetBackgroundColour("pink") 2214 self.qmin.Refresh() 2215 self.qmax.SetBackgroundColour("pink") 2216 self.qmax.Refresh() 2217 msg= "Npts of Data Error :No or too little npts of %s."% data.name 2218 wx.PostEvent(self.parent.parent, StatusEvent(status = msg )) 2219 self.fitrange = False 2220 flag = False 2221 else: 2222 self.Npts_fit.SetValue(str(len(index_data[index_data==True]))) 2223 self.fitrange = True 2224 2224 2225 2225 return flag
Note: See TracChangeset
for help on using the changeset viewer.