Changeset 773806e in sasview for park_integration
- Timestamp:
- Apr 20, 2009 4:50:35 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:
- f04dc30
- Parents:
- 513115c
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
park_integration/AbstractFitEngine.py
r54c21f50 r773806e 144 144 def setFitRange(self,mini=None,maxi=None): 145 145 """ to set the fit range""" 146 self.qmin=mini 146 147 self.qmin=mini 147 148 self.qmax=maxi 148 149 … … 210 211 211 212 ## Min Q-value 212 self.qmin= min (self.data.x) 213 #Skip the Q=0 point, especially when y(q=0)=None at x[0]. 214 if min (self.data.x) ==0.0 and self.data.x[0]==0 and not numpy.isfinite(self.data.y[0]): 215 self.qmin = min(self.data.x[self.data.x!=0]) 216 else: 217 self.qmin= min (self.data.x) 213 218 ## Max Q-value 214 219 self.qmax= max (self.data.x) … … 217 222 def setFitRange(self,qmin=None,qmax=None): 218 223 """ to set the fit range""" 219 if qmin!=None: 220 self.qmin = qmin 224 225 # Remove or do not allow fitting on the Q=0 point, especially when y(q=0)=None at x[0]. 226 #ToDo: Fix this. 227 if qmin==0.0 and self.data.x[0]==0 and not numpy.isfinite(self.data.y[0]): 228 self.qmin = min(self.data.x[self.data.x!=0]) 229 elif qmin!=None: 230 self.qmin = qmin 231 221 232 if qmax !=None: 222 233 self.qmax = qmax … … 261 272 if numpy.size(dy) < numpy.size(x): 262 273 raise RuntimeError, "FitData1D: invalid error array" 263 264 274 return (y[idx] - fx[idx])/dy[idx] 265 275 … … 291 301 292 302 ## fitting range 293 self.qmin = 0303 self.qmin = 1e-16 294 304 self.qmax = math.sqrt(x*x +y*y) 295 305 … … 298 308 def setFitRange(self,qmin=None,qmax=None): 299 309 """ to set the fit range""" 300 if qmin!=None: 301 self.qmin= qmin 310 if qmin==0.0: 311 self.qmin = 1e-16 312 elif qmin!=None: 313 self.qmin = qmin 302 314 if qmax!=None: 303 315 self.qmax= qmax
Note: See TracChangeset
for help on using the changeset viewer.