Ignore:
Timestamp:
May 22, 2008 4:45:39 PM (15 years ago)
Author:
srkline
Message:

Changed the detector efficiency correction to DIVIDE, rather than multiply. This was verified with John's data from Vanadium.

Location:
sans/Dev/trunk/NCNR_User_Procedures
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • sans/Dev/trunk/NCNR_User_Procedures/InstalledVersion.txt

    r362 r369  
    1 PACKAGE_VERSION=6.001;SANS_RED_VERSION=5.10;SANS_ANA_VERSION=4.00;USANS_RED_VERSION=2.21; 
     1PACKAGE_VERSION=6.002;SANS_RED_VERSION=5.10;SANS_ANA_VERSION=4.00;USANS_RED_VERSION=2.21; 
    22 
    33Only the first line of the file is read in. 
  • sans/Dev/trunk/NCNR_User_Procedures/SANS/Analysis/Models/NewModels_2006/Cylinder_PolyRadius_v40.ipf

    r273 r369  
    280280End 
    281281 
    282  
     282// 
     283//  Fit function that is actually a wrapper to dispatch the calculation to N threads 
     284// 
     285// nthreads is 1 or an even number, typically 2 
     286// it doesn't matter if npt is odd. In this case, fractional point numbers are passed 
     287// and the wave indexing works just fine - I tested this with test waves of 7 and 8 points 
     288// and the points "2.5" and "3.5" evaluate correctly as 2 and 3 
     289// 
     290Function Cyl_PolyRadius(cw,yw,xw) : FitFunc 
     291        Wave cw,yw,xw 
     292         
     293#if exists("Cyl_PolyRadiusX") 
     294 
     295        Variable npt=numpnts(yw) 
     296        Variable i,nthreads= ThreadProcessorCount 
     297        variable mt= ThreadGroupCreate(nthreads) 
     298 
     299//      Variable t1=StopMSTimer(-2) 
     300         
     301        for(i=0;i<nthreads;i+=1) 
     302        //      Print (i*npt/nthreads),((i+1)*npt/nthreads-1) 
     303                ThreadStart mt,i,Cyl_PolyRadius_T(cw,yw,xw,(i*npt/nthreads),((i+1)*npt/nthreads-1)) 
     304        endfor 
     305 
     306        do 
     307                variable tgs= ThreadGroupWait(mt,100) 
     308        while( tgs != 0 ) 
     309 
     310        variable dummy= ThreadGroupRelease(mt) 
     311         
     312//      Print "elapsed time = ",(StopMSTimer(-2) - t1)/1e6 
     313         
     314#else 
     315                yw = fCyl_PolyRadius(cw,xw)             //the Igor, non-XOP, non-threaded calculation 
     316#endif 
     317        return(0) 
     318End 
    283319 
    284320//// experimental threaded version... 
     
    293329#if exists("Cyl_PolyRadiusX")                   //this check is done in the calling function, simply hide from compiler 
    294330        yw[p1,p2] = Cyl_PolyRadiusX(cw,xw) 
    295 //#else 
    296 //      yw[p1,p2] = fCyl_PolyRadius(cw,xw) 
     331#else 
     332        yw[p1,p2] = fCyl_PolyRadius(cw,xw) 
    297333#endif 
    298334 
    299335        return 0 
    300336End 
    301  
    302 // 
    303 //  Fit function that is actually a wrapper to dispatch the calculation to N threads 
    304 // 
    305 // nthreads is 1 or an even number, typically 2 
    306 // it doesn't matter if npt is odd. In this case, fractional point numbers are passed 
    307 // and the wave indexing works just fine - I tested this with test waves of 7 and 8 points 
    308 // and the points "2.5" and "3.5" evaluate correctly as 2 and 3 
    309 // 
    310 Function Cyl_PolyRadius(cw,yw,xw) : FitFunc 
    311         Wave cw,yw,xw 
    312          
    313 #if exists("Cyl_PolyRadiusX") 
    314  
    315         Variable npt=numpnts(yw) 
    316         Variable i,nthreads= ThreadProcessorCount 
    317         variable mt= ThreadGroupCreate(nthreads) 
    318  
    319 //      Variable t1=StopMSTimer(-2) 
    320          
    321         for(i=0;i<nthreads;i+=1) 
    322         //      Print (i*npt/nthreads),((i+1)*npt/nthreads-1) 
    323                 ThreadStart mt,i,Cyl_PolyRadius_T(cw,yw,xw,(i*npt/nthreads),((i+1)*npt/nthreads-1)) 
    324         endfor 
    325  
    326         do 
    327                 variable tgs= ThreadGroupWait(mt,100) 
    328         while( tgs != 0 ) 
    329  
    330         variable dummy= ThreadGroupRelease(mt) 
    331          
    332 //      Print "elapsed time = ",(StopMSTimer(-2) - t1)/1e6 
    333          
    334 #else 
    335                 yw = fCyl_PolyRadius(cw,xw)             //the Igor, non-XOP, non-threaded calculation 
    336 #endif 
    337         return(0) 
    338 End 
  • sans/Dev/trunk/NCNR_User_Procedures/SANS/Reduction/WorkFileUtils.ipf

    r328 r369  
    444444                        // correction inserted 11/2007 SRK 
    445445                        // large angle detector efficiency correction is >= 1 and will "bump up" the highest angles 
     446                        // so divide here to get the correct answer (5/22/08 SRK) 
    446447                        if(doEfficiency) 
    447                                 data[ii][jj] *= DetEffCorr(lambda,dtdist,xd,yd) 
     448                                data[ii][jj] /= DetEffCorr(lambda,dtdist,xd,yd) 
    448449        //                      solidAngle[ii][jj] = DetEffCorr(lambda,dtdist,xd,yd)            //testing only 
    449450                        endif 
Note: See TracChangeset for help on using the changeset viewer.