- Timestamp:
- May 2, 2008 9:07:36 AM (17 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:
- 416223d
- Parents:
- 90640f2
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
guitools/transform.py
rf193585 r2e014bf 135 135 return dx 136 136 137 def errToXY(x, y, dx=None, dy=None): 138 if dx==None: 139 dx=0 140 if dy==None: 141 dy=0 142 err =math.sqrt((y*dx)**2 +(x*dy)**2) 143 if err >= math.fabs(x): 144 err =0.9*x 145 return err 137 146 138 147 139 def errToYX2(x, y, dx=None, dy=None): … … 151 143 dy=0 152 144 err =math.sqrt((2*x*y*dx)**2 +((x**2)*dy)**2) 153 if err >= math.fabs(x):154 err =0.9*x145 #if err >= math.fabs(x): 146 # err =0.9*x 155 147 return err 156 148 … … 165 157 dy = 0 166 158 err = (dx/x)**2 + (dy/y)**2 167 if math.sqrt(math.fabs(err)) >= math.fabs(x):168 err= 0.9*x159 #if math.sqrt(math.fabs(err)) >= math.fabs(x): 160 # err= 0.9*x 169 161 else: 170 162 raise ValueError, "cannot compute this error" … … 182 174 dy = 0 183 175 err = (2*dx/x)**2 + (dy/y)**2 184 if math.fabs(err) >= math.fabs(x):185 176 #if math.fabs(err) >= math.fabs(x): 177 # err =0.9*x 186 178 else: 187 179 raise ValueError, "cannot compute this error" … … 212 204 dx =0 213 205 err= -1/2*math.pow(x, -3/2)* dx 214 if math.fabs(err)>= math.fabs(x):215 err=0.9*x206 #if math.fabs(err)>= math.fabs(x): 207 # err=0.9*x 216 208 else: 217 209 raise ValueError, "Cannot compute this error" … … 228 220 dy=0 229 221 err =math.sqrt((4*dx/x)**2 +(dy/y)**2) 230 if err >= math.fabs(x):231 222 #if err >= math.fabs(x): 223 #err =0.9*x 232 224 return err 233 225
Note: See TracChangeset
for help on using the changeset viewer.