- Timestamp:
- Nov 24, 2009 4:40:50 PM (15 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:
- 2cce133
- Parents:
- b6666d4
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
Invariant/invariant.py
rb6666d4 r669aaf9 10 10 from DataLoader.qsmearing import smear_selection 11 11 12 13 # PLEASE NEVER USE SUCH A DIRTY TRICK. Change your logic instead.14 #INFINITY = 1015 12 16 13 # The minimum q-value to be used when extrapolating … … 38 35 self.qmin = self.data[0] 39 36 if self.qmin == 0: 40 self.qmin = MINIMUM37 self.qmin = Q_MINIMUM 41 38 42 39 self.qmax = self.data[x_len] … … 254 251 + ..+ xn**2 *yn *dxn 255 252 256 where n = SOME GOOD DEFAULT253 where n >= len(data.x)-1 257 254 dxi = 1/2*(xi+1 - xi) + (xi - xi-1) 258 255 dx0 = (x1 - x0)/2 … … 268 265 q_star = x0*dxl *y0*dx0 + x1*dxl *y1 *dx1 269 266 + ..+ xn*dxl *yn *dxn 270 where n = SOME GOOD DEFAULT267 where n >= len(data.x)-1 271 268 dxi = 1/2*(xi+1 - xi) + (xi - xi-1) 272 269 dx0 = x0+ (x1 - x0)/2 … … 283 280 dq_star = math.sqrt[(x0**2*(dy0)*dx0)**2 + 284 281 (x1**2 *(dy1)*dx1)**2 + ..+ (xn**2 *(dyn)*dxn)**2 ] 285 where n = SOME GOOD DEFAULT282 where n >= len(data.x)-1 286 283 dxi = 1/2*(xi+1 - xi) + (xi - xi-1) 287 284 dx0 = x0+ (x1 - x0)/2 … … 299 296 dq_star = x0*dxl *dy0 *dx0 + x1*dxl *dy1 *dx1 300 297 + ..+ xn*dxl *dyn *dxn 301 where n = infinity298 where n >= len(data.x)-1 302 299 dxi = 1/2*(xi+1 - xi) + (xi - xi-1) 303 300 dx0 = x0+ (x1 - x0)/2 … … 338 335 q_star: the invariant value included extrapolation is applied 339 336 unit 1/A^(3)*1/cm 340 q_star = self._ get_qstar_total()337 q_star = self._qstar 341 338 342 339 the result returned will be 0<= volume <= 1
Note: See TracChangeset
for help on using the changeset viewer.