Ignore:
Timestamp:
Apr 9, 2007 3:42:39 PM (15 years ago)
Author:
srkline
Message:

2nd pass of pulling out NCNR calls. Also cleared a lot of deadwood from the code, removing depricated functions that were mostly already commented out.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sans/SANSReduction/branches/kline_29MAR07/Put in User Procedures/SANS_Reduction_v5.00/RectAnnulAvg.ipf

    r47 r76  
    5959         
    6060        // center of detector, for non-linear corrections 
    61         xcenter = 64.5 
    62         ycenter = 64.5 
     61        NVAR pixelsX = root:myGlobals:gNPixelsX 
     62        NVAR pixelsY = root:myGlobals:gNPixelsY 
     63         
     64        xcenter = pixelsX/2 + 0.5               // == 64.5 for 128x128 Ordela 
     65        ycenter = pixelsY/2 + 0.5               // == 64.5 for 128x128 Ordela 
    6366         
    6467        // beam center, in pixels 
     
    325328        Variable DDet, apOff=0.0 
    326329        DDet = DetectorPixelResolution(fileStr,detStr)          //needs detector type and beamline 
    327 //      do  
    328 //        if(strsearch(fileStr, "NG5", 0) != -1) 
    329 //          //string was found, it's an NG5 file 
    330 //          DDet = 1.0 
    331 //          break 
    332 //        Endif 
    333 //        if(strsearch(fileStr, "NG3", 0) != -1) 
    334 //          //string was found, it's an NG3 file 
    335 //          DDet = 1.0 
    336 //          break 
    337 //        Endif 
    338 //        if(strsearch(fileStr, "NG7", 0) != -1) 
    339 //          //string was found, it's an NG7 file 
    340 //          DDet = 0.5 
    341 //          break 
    342 //        Endif 
    343 //      while(0) 
     330 
    344331 
    345332        //Width of annulus used for the average is gotten from the  
     
    351338 
    352339        ii=0 
    353 //      String res_string="root:myGlobals:Res_vals" 
    354 //      Make/O/D/N=3 $res_string 
    355 //      Wave res_wave=$res_string 
     340 
    356341        Variable ret1,ret2,ret3 
    357342        do 
    358343                getResolution(qval[ii],lambda,lambdaWidth,DDet,apOff,S1,S2,L1,L2,BS,ddr,ret1,ret2,ret3) 
    359                 sigmaq[ii] = ret1       //res_wave[0] 
    360                 qbar[ii] = ret2         //res_wave[1] 
    361                 fsubs[ii] = ret3                //res_wave[2] 
     344                sigmaq[ii] = ret1 
     345                qbar[ii] = ret2  
     346                fsubs[ii] = ret3 
    362347                ii+=1 
    363348        while(ii<nq) 
     
    372357 
    373358        Avg_1D_Graph(aveint,qval,sigave) 
    374 //      DoWindow/F Plot_1d 
    375 //      If(V_flag == 1)         //the graph window already exists 
    376 //              //kill the old graph and make a new one 
    377 //              //easier than adjusting the old one 
    378 //              DoWindow/K Plot_1d 
    379 //      Endif    
    380 //      Display /W=(412,51,727,302)/K=1 aveint vs qval 
    381 //      ModifyGraph log=1 
    382 //      ModifyGraph mode=3,marker=19,msize=1,rgb=(0,0,0) 
    383 //      ErrorBars aveint Y,wave=(sigave,sigave) 
    384 //      Label left "Counts";DelayUpdate 
    385 //      Label bottom "q\\U" 
    386 //      SVAR angst = root:myGlobals:gAngstStr 
    387 //      Label bottom "q ("+angst+"\\S-1\\M)" 
    388 //      DoWindow/C Plot_1d 
    389          
     359 
    390360        //get rid of the default mask, if one was created (it is in the current folder) 
    391361        //don't just kill "mask" since it might be pointing to the one in the MSK folder 
     
    490460        Wave reals = $(destPath + ":RealsRead") 
    491461 
     462        // center of detector, for non-linear corrections 
    492463        NVAR pixelsX = root:myGlobals:gNPixelsX 
    493464        NVAR pixelsY = root:myGlobals:gNPixelsY 
    494465         
    495         // center of detector, for non-linear corrections 
    496         xcenter = 64.5 
    497         ycenter = 64.5 
     466        xcenter = pixelsX/2 + 0.5               // == 64.5 for 128x128 Ordela 
     467        ycenter = pixelsY/2 + 0.5               // == 64.5 for 128x128 Ordela 
    498468         
    499469        // beam center, in pixels 
     
    517487        nphi = numPhiSteps              //number of anular sectors is set by users 
    518488         
    519         rcentr = 150            //pixels within rcentr of beam center are broken into 9 parts 
    520489        rc = 2*dtdist*asin(qc*lambda/4/Pi)              //in mm 
    521490        delr = nw*sx/2 
     
    673642        //angle dependent transmission correction is not done in phiave 
    674643        Ann_1D_Graph(aveint,phival,sigave) 
    675 //      DoWindow/F Plot_1d 
    676 //      If(V_flag == 1)         //the graph window already exists 
    677 //              //kill the old graph and make a new one 
    678 //              //easier than adjusting the old one 
    679 //              DoWindow/K Plot_1d 
    680 //      Endif    
    681 //      Display /W=(412,51,727,302)/K=1 aveint vs phival 
    682 //      ModifyGraph log=0 
    683 //      ModifyGraph mode=3,marker=19,msize=1,rgb=(0,0,0) 
    684 //      ErrorBars aveint Y,wave=(sigave,sigave) 
    685 //      Label left "Counts";DelayUpdate 
    686 //      Label bottom "Angle (degrees)" 
    687 //      DoWindow/C Plot_1d 
    688644         
    689645        //get rid of the default mask, if one was created (it is in the current folder) 
Note: See TracChangeset for help on using the changeset viewer.