Changeset 669aaf9 in sasview for Invariant


Ignore:
Timestamp:
Nov 24, 2009 4:40:50 PM (15 years ago)
Author:
Gervaise Alina <gervyh@…>
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
Message:

apply feedback in invariant.py

File:
1 edited

Legend:

Unmodified
Added
Removed
  • Invariant/invariant.py

    rb6666d4 r669aaf9  
    1010from DataLoader.qsmearing import smear_selection 
    1111 
    12  
    13 # PLEASE NEVER USE SUCH A DIRTY TRICK. Change your logic instead. 
    14 #INFINITY = 10 
    1512 
    1613# The minimum q-value to be used when extrapolating 
     
    3835        self.qmin =  self.data[0]     
    3936        if self.qmin == 0: 
    40             self.qmin = MINIMUM  
     37            self.qmin = Q_MINIMUM  
    4138     
    4239        self.qmax = self.data[x_len] 
     
    254251                            + ..+ xn**2 *yn *dxn  
    255252                             
    256             where n= SOME GOOD DEFAULT 
     253            where n >= len(data.x)-1 
    257254            dxi = 1/2*(xi+1 - xi) + (xi - xi-1) 
    258255            dx0 = (x1 - x0)/2 
     
    268265                q_star = x0*dxl *y0*dx0 + x1*dxl *y1 *dx1  
    269266                            + ..+ xn*dxl *yn *dxn  
    270             where n= SOME GOOD DEFAULT 
     267            where n >= len(data.x)-1 
    271268            dxi = 1/2*(xi+1 - xi) + (xi - xi-1) 
    272269            dx0 = x0+ (x1 - x0)/2 
     
    283280               dq_star = math.sqrt[(x0**2*(dy0)*dx0)**2 + 
    284281                    (x1**2 *(dy1)*dx1)**2 + ..+ (xn**2 *(dyn)*dxn)**2 ] 
    285             where n = SOME GOOD DEFAULT 
     282            where n >= len(data.x)-1 
    286283            dxi = 1/2*(xi+1 - xi) + (xi - xi-1) 
    287284            dx0 = x0+ (x1 - x0)/2 
     
    299296                dq_star = x0*dxl *dy0 *dx0 + x1*dxl *dy1 *dx1  
    300297                            + ..+ xn*dxl *dyn *dxn  
    301             where n= infinity 
     298            where n >= len(data.x)-1 
    302299            dxi = 1/2*(xi+1 - xi) + (xi - xi-1) 
    303300            dx0 = x0+ (x1 - x0)/2 
     
    338335            q_star: the invariant value included extrapolation is applied 
    339336                         unit  1/A^(3)*1/cm 
    340                     q_star = self._get_qstar_total() 
     337                    q_star = self._qstar 
    341338                     
    342339            the result returned will be 0<= volume <= 1 
Note: See TracChangeset for help on using the changeset viewer.