Ignore:
Timestamp:
Aug 10, 2007 3:08:57 PM (15 years ago)
Author:
srkline
Message:

RT 809 fix to correct resolution calculation

  • gravity term
  • lens resolution

-- this also led to changes in the two averaging routines to pick up this flag and pass it to getResolution()
-- then two SANSBeta menu items added to crudely change the header flag (0|1) on a run-by-run basis
!! NOTE that the VAX header has not been updated to put this information in at the time of data collection!!

other minor changes...
Some changes to beta procedures for combining files (I don't think anyone uses these but me) - these changes are in NSORT.ipf.

Some changes to the MainPanel? to remove the RealTime? button (which somehow came back)

SRK 10AUG07

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sans/SANSReduction/trunk/Put in User Procedures/SANS_Reduction_v5.00/NCNR_Utils.ipf

    r121 r143  
    6262//          raw data header to indicate the presence of lenses. 
    6363// 
     64// - Aug 07 - added input to switch calculation based on lenses (==1 if in) 
     65// 
    6466// - called by CircSectAvg.ipf and RectAnnulAvg.ipf 
    6567// 
     
    6769// except DDet and apOff, which are set from globals before passing 
    6870// 
    69 Function/S getResolution(inQ,lambda,lambdaWidth,DDet,apOff,S1,S2,L1,L2,BS,del_r,SigmaQ,QBar,fSubS) 
    70         Variable inQ, lambda, lambdaWidth, DDet, apOff, S1, S2, L1, L2, BS, del_r 
     71// 
     72Function/S getResolution(inQ,lambda,lambdaWidth,DDet,apOff,S1,S2,L1,L2,BS,del_r,usingLenses,SigmaQ,QBar,fSubS) 
     73        Variable inQ, lambda, lambdaWidth, DDet, apOff, S1, S2, L1, L2, BS, del_r,usingLenses 
    7174        Variable &fSubS, &QBar, &SigmaQ         //these are the output quantities at the input Q value 
    7275         
     
    104107 
    105108        v_lambda = lambdaWidth^2/6.0 
    106         v_b = 0.25*(S1*L2/L1)^2 +0.25*(S2*L2/lp)^2 
     109         
     110        if(usingLenses==1)                      //SRK 2007 
     111                v_b = 0.25*(S1*L2/L1)^2 +0.25*(2/3)*(lambdaWidth/lambda)^2*(S2*L2/lp)^2         //correction to 2nd term 
     112        else 
     113                v_b = 0.25*(S1*L2/L1)^2 +0.25*(S2*L2/lp)^2              //original form 
     114        endif 
     115         
    107116        v_d = (DDet/2.3548)^2 + del_r^2/12.0 
    108117        vz = vz_1 / lambda 
    109118        yg = 0.5*g*L2*(L1+L2)/vz^2 
    110         v_g = 2.0*yg^2*v_lambda 
     119        v_g = 2.0*(2.0*yg^2*v_lambda)                                   //factor of 2 correction, B. Hammouda, 2007 
    111120 
    112121        r0 = L2*tan(2.0*asin(lambda*inQ/(4.0*Pi) )) 
Note: See TracChangeset for help on using the changeset viewer.