Changeset 3bb37ef in sasview
- Timestamp:
- Dec 2, 2009 5:58:56 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:
- 027e8f2
- Parents:
- f31ab59
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
Invariant/invariant.py
rf31ab59 r3bb37ef 323 323 where n >= len(data.x)-1 324 324 dxi = 1/2*(xi+1 - xi) + (xi - xi-1) 325 dx0 = x0 +(x1 - x0)/2326 dxn = xn - xn-1325 dx0 = (x1 - x0)/2 326 dxn = (xn - xn-1)/2 327 327 @param data: the data to use to compute invariant. 328 328 @return q_star: invariant value for pinhole data. q_star > 0 … … 335 335 n = len(data.x)- 1 336 336 #compute the first delta q 337 dx0 = (data.x[1] +data.x[0])/2337 dx0 = (data.x[1] - data.x[0])/2 338 338 #compute the last delta q 339 dxn = data.x[n] - data.x[n-1]339 dxn = (data.x[n] - data.x[n-1])/2 340 340 sum = 0 341 341 sum += data.x[0] * data.x[0] * data.y[0] * dx0 … … 359 359 where n >= len(data.x)-1 360 360 dxi = 1/2*(xi+1 - xi) + (xi - xi-1) 361 dx0 = x0+(x1 - x0)/2362 dxn = xn - xn-1361 dx0 = (x1 - x0)/2 362 dxn = (xn - xn-1)/2 363 363 dxl: slit smear value 364 364 … … 377 377 n = len(data.x)-1 378 378 #compute the first delta 379 dx0 = (data.x[1] +data.x[0])/2379 dx0 = (data.x[1] - data.x[0])/2 380 380 #compute the last delta 381 dxn = data.x[n] - data.x[n-1]381 dxn = (data.x[n] - data.x[n-1])/2 382 382 sum = 0 383 383 sum += data.x[0] * data.dxl[0] * data.y[0] * dx0 … … 425 425 where n >= len(data.x)-1 426 426 dxi = 1/2*(xi+1 - xi) + (xi - xi-1) 427 dx0 = x0+(x1 - x0)/2428 dxn = xn - xn-1427 dx0 = (x1 - x0)/2 428 dxn = (xn - xn-1)/2 429 429 dyn: error on dy 430 430 … … 450 450 n = len(data.x) - 1 451 451 #compute the first delta 452 dx0 = (data.x[1] +data.x[0])/2452 dx0 = (data.x[1] - data.x[0])/2 453 453 #compute the last delta 454 dxn= data.x[n] - data.x[n-1]454 dxn= (data.x[n] - data.x[n-1])/2 455 455 sum = 0 456 456 sum += (data.x[0] * data.x[0] * dy[0] * dx0)**2 … … 473 473 where n >= len(data.x)-1 474 474 dxi = 1/2*(xi+1 - xi) + (xi - xi-1) 475 dx0 = x0+(x1 - x0)/2476 dxn = xn - xn-1475 dx0 = (x1 - x0)/2 476 dxn = (xn - xn-1)/2 477 477 dxl: slit smearing value 478 478 dyn : error on dy … … 503 503 n = len(data.x) - 1 504 504 #compute the first delta 505 dx0 = (data.x[1] +data.x[0])/2505 dx0 = (data.x[1] - data.x[0])/2 506 506 #compute the last delta 507 dxn = data.x[n] - data.x[n-1]507 dxn = (data.x[n] - data.x[n-1])/2 508 508 sum = 0 509 509 sum += (data.x[0] * data.dxl[0] * dy[0] * dx0)**2 … … 652 652 return None 653 653 654 #q_start point 655 q_start = Q_MINIMUM 656 if Q_MINIMUM >= qmin: 657 q_start = qmin/10 658 654 659 #create new Data1D to compute the invariant 655 new_x = numpy.linspace(start= Q_MINIMUM,660 new_x = numpy.linspace(start=q_start, 656 661 stop=qmin, 657 662 num=INTEGRATION_NSTEPS,
Note: See TracChangeset
for help on using the changeset viewer.