Ignore:
Timestamp:
Oct 16, 2009 5:17:38 PM (13 years ago)
Author:
srkline
Message:

Changing ILL_ files to use the #define ILL_D22, removing the need for Lionel's verison of WorkFileUtils?. The change there was in the DetCorr? function, doing a tuby-by-tube correction rather than our array correction. We can make use of this later for vSANS, surely.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sans/Dev/trunk/NCNR_User_Procedures/Reduction/SANS/ILL_Utils.ipf

    r573 r576  
    3434 
    3535        // changing behavior specific to ILL correction of data 
    36         Variable/G root:myGlobals:gDoDetectorEffCorr = 0                                //default state is ==1 
    37         Variable/G root:myGlobals:gDoDetectorEffCorrILL = 1                     //new global switch 
     36        Variable/G root:myGlobals:gDoDetectorEffCorr = 1                                //default state is ==1 
    3837 
    3938 
     
    972971        return("Function Empty") 
    973972End 
     973 
     974// a tube-by-tube correction that replaces our area detecor correction 
     975Function DetEffCorrILL(lambda,dtdist,xd)   
     976        Variable lambda,dtdist,xd 
     977        Variable ff=1,theta 
     978  
     979        theta =360* atan( xd/dtdist )/(2*Pi) 
     980  
     981        if (lambda <=5.1 && lambda>=4.9) 
     982                ff= 1.000087- 7.094023e-5*abs(theta) + 8.622997e-5*abs(theta^2) + 9.262026e-6*abs(theta^3) -3.216369e-7*abs(theta^4) +2.142398e-9*abs(theta^5) 
     983        elseif  (lambda <=8.1 && lambda>=7.9) 
     984                ff= 0.9993575- 0.0002320264*abs(theta) + 9.751713e-5*abs(theta^2) + 1.018564e-5*abs(theta^3) -3.977445e-7*abs(theta^4) +2.960205e-9*abs(theta^5) 
     985        endif 
     986 
     987        return(ff) 
     988End 
Note: See TracChangeset for help on using the changeset viewer.