Changeset 58 for sans/SASCalc


Ignore:
Timestamp:
Mar 19, 2007 5:43:32 PM (16 years ago)
Author:
srkline
Message:

added a more realistic shadow correction for resolution

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sans/SASCalc/trunk/SASCALC.ipf

    r57 r58  
    930930        Variable L2 = reals[18] 
    931931//      Variable BS = reals[21]         //this the diameter is stored in mm 
    932         Variable BS = beamstopDiamProjection() * 10             //calculated projection in cm *10 = mm 
     932        Variable BS = beamstopDiamProjection(1) * 10            //calculated projection in cm *10 = mm 
    933933        Variable S1 = reals[23] 
    934934        Variable S2 = reals[24] 
     
    14231423//returns the projected diameter of the beamstop at the anode plane. 
    14241424// most noticeable at short SDD 
    1425 Function beamstopDiamProjection() 
    1426  
     1425//if flag == 0 use conservative estimate = largest diameter (for SASCALC, default) 
     1426//if flag != 0 use point aperture = average diameter (for resolution calculation) 
     1427Function beamstopDiamProjection(flag) 
     1428        Variable flag 
     1429         
    14271430        NVAR L2diff = root:SAS:L2diff 
    14281431        Variable a2 = sampleApertureDiam() 
     
    14321435        l2 = sampleToDetectorDist() + L2diff 
    14331436        LB = 20.1 + 1.61*BS                     //distance in cm from beamstop to anode plane (empirical) 
    1434         BS_P = bs + (bs+a2)*lb/(l2-lb)          //diameter of shadow from parallax 
    1435  
     1437        if(flag==0) 
     1438                BS_P = bs + (bs+a2)*lb/(l2-lb)          //diameter of shadow from parallax 
     1439        else 
     1440                BS_P = bs + bs*lb/(l2-lb)               //diameter of shadow, point A2 
     1441        endif 
    14361442        return (bs_p)           //return projected diameter in cm 
    14371443End 
     
    14441450    Variable l2s = sampleToDetectorDist()       //distance from sample to detector in cm 
    14451451//    Variable bs = beamstopDiam()              //beamstop diameter in cm 
    1446     Variable bs_p = beamstopDiamProjection()            //projected beamstop diameter in cm 
     1452    Variable bs_p = beamstopDiamProjection(0)           //projected beamstop diameter in cm 
    14471453    NVAR lambda = root:SAS:gLambda 
    14481454    NVAR d_det = root:SAS:d_det         //cm 
Note: See TracChangeset for help on using the changeset viewer.