Ignore:
Timestamp:
May 18, 2009 5:15:08 PM (14 years ago)
Author:
srkline
Message:

(1) fix in ProtocolAsPanel? that correctly calculates Kappa for data taken with the Cerca detectors. In the Kappa calculation, the data is manually scaled, bypassing the normal "ADD" step where the 4x detector data is correctly renormalized. Added a flag to divide by 4 if ILL detector type found.

(2) lots of bits to try to accomodate 2D resolution smearing. Changes to the QxQy? output to have everything needed: Qz, sigX, sigY, and shadowing. So presumably, all of the information is in the reduced data, where it should be.

  • added a 2D resolution calculation based on David Mildner's notes.
  • added 2D quadrature calculation for smearing, and new structure definitions

Location:
sans/Dev/trunk/NCNR_User_Procedures/Common
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • sans/Dev/trunk/NCNR_User_Procedures/Common/GaussUtils_v40.ipf

    r480 r509  
    6161EndStructure 
    6262 
     63 
     64// tentative pass at 2D resolution smearing 
     65// 
     66Structure ResSmear_2D_AAOStruct 
     67        Wave coefW 
     68        Wave zw                 //answer 
     69        Wave qy                 // q-value 
     70        Wave qx 
     71        Wave qz 
     72        Wave sigQx              //resolution 
     73        Wave sigQy 
     74        Wave fs 
     75        String info 
     76EndStructure 
    6377 
    6478 
     
    10621076end 
    10631077 
     1078// prototype function for 2D smearing routine 
     1079Function SANS_2D_ModelAAO_proto(w,zw,xw,yw) 
     1080        Wave w,zw,xw,yw 
     1081         
     1082        Print "in SANSModelAAO_proto function" 
     1083        return(1) 
     1084end 
     1085 
     1086// prototype function for fit wrapper using 2D smearing 
     1087// not used (yet) 
     1088Function SANS_2D_ModelSTRUCT_proto(s) 
     1089        Struct ResSmear_2D_AAOStruct &s  
     1090 
     1091        Print "in SANSModelSTRUCT_proto function" 
     1092        return(1) 
     1093end 
     1094 
    10641095//Numerical Recipes routine to calculate the nn(th) stage 
    10651096//refinement of a trapezoid integration 
  • sans/Dev/trunk/NCNR_User_Procedures/Common/Packages/PlotManager/PlotUtils2D_v40.ipf

    r490 r509  
    1515 
    1616// 
     17// changed May 2009 to read in the resolution information (now 7 columns) 
     18// -- subject to change -- 
    1719// 
    1820Proc LoadQxQy() 
     
    2426 
    2527        String w0,w1,w2,n0,n1,n2 
     28        String w3,w4,w5,w6,n3,n4,n5,n6 
    2629                 
    2730        // put the names of the three loaded waves into local names 
     
    2932        n1 = StringFromList(1, S_waveNames ,";" ) 
    3033        n2 = StringFromList(2, S_waveNames ,";" ) 
     34        n3 = StringFromList(3, S_waveNames ,";" ) 
     35        n4 = StringFromList(4, S_waveNames ,";" ) 
     36        n5 = StringFromList(5, S_waveNames ,";" ) 
     37        n6 = StringFromList(6, S_waveNames ,";" ) 
    3138         
    3239        //remove the semicolon AND period from files from the VAX 
     
    3441        w1 = CleanupName((S_fileName + "_qy"),0) 
    3542        w2 = CleanupName((S_fileName + "_i"),0) 
    36          
     43        w3 = CleanupName((S_fileName + "_qz"),0) 
     44        w4 = CleanupName((S_fileName + "_sigQx"),0) 
     45        w5 = CleanupName((S_fileName + "_sigQy"),0) 
     46        w6 = CleanupName((S_fileName + "_fs"),0) 
     47 
    3748        String baseStr=w1[0,strlen(w1)-4] 
    3849        if(DataFolderExists("root:"+baseStr)) 
     
    4051                        if(V_flag==2)   //user selected No, don't load the data 
    4152                                SetDataFolder root: 
    42                                 KillWaves $n0,$n1,$n2           // kill the default waveX that were loaded 
     53                                KillWaves $n0,$n1,$n2,$n3,$n4,$n5,$n6           // kill the default waveX that were loaded 
    4354                                return          //quits the macro 
    4455                        endif 
     
    6980        Duplicate/O $("root:"+n1), $w1 
    7081        Duplicate/O $("root:"+n2), $w2 
     82        Duplicate/O $("root:"+n3), $w3 
     83        Duplicate/O $("root:"+n4), $w4 
     84        Duplicate/O $("root:"+n5), $w5 
     85        Duplicate/O $("root:"+n6), $w6 
    7186         
    7287        Variable/G gIsLogScale = 0 
     
    88103        //clean up               
    89104        SetDataFolder root: 
    90         KillWaves/Z $n0,$n1,$n2 
     105        KillWaves/Z $n0,$n1,$n2,$n3,$n4,$n5,$n6 
    91106EndMacro 
    92107 
     
    413428                                //make log scale 
    414429                                w=log(linW) 
     430                                w = w[p][q] == -inf ? NaN : w[p][q]             //remove the -inf for display 
    415431                        endif 
    416432        endfor   
Note: See TracChangeset for help on using the changeset viewer.