Ignore:
Timestamp:
May 23, 2013 9:43:12 AM (10 years ago)
Author:
srkline
Message:

Updated the NGB attenuator tables with Katie's new measurements from May 2013.

Made some changes to Auto-Fit to make it more useable. Will turn it "on" when documentation is finished.

Changed how the random deviate function is calculated to improve the estimates of multiple scattering. Now the q-range of integration is shifted to lower q for the USANS calculation (using very large objects). Also, the number of points used in the integration is chosen adaptively until a constant value of scattering cross section is obtained. There are still some functions where the integration fails (power laws). These will always fail. My best solution currently is to flag the times when the XS>100. Then the estimates are invalid. The 1D simulation is fine, the 2D is reasonably fine, but anything to do with multile scattering is incorrect.

Location:
sans/Dev/trunk/NCNR_User_Procedures/Reduction/SANS
Files:
2 edited

Legend:

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

    r902 r911  
    804804// returns the random deviate as a wave 
    805805// and the total SAS cross-section [1/cm] sig_sas 
     806// 
     807// MAY 2013 
     808// -- now this calculation is done adaptively, with very little speed hit. When doing either the  
     809// 1D SANS or USANS simulations, the longest time spent is for the re-calculation of a smeared model. Not this. 
     810// -- now I calculate USANS from 1e-7 to qu/100, (then qu ~ 0.05) and for SANS, qmin = 1e-4 (everything else is behind 
     811//    the beamstop) and is not really "seen" 
     812// 
     813// I key on the wavelength to determine if it's USANS data 
     814// 
     815// I can verify the calculation by calculating the exact SASxs for a sphere using SAS_XS_Sphere() below 
     816// 
    806817Function CalculateRandomDeviate(func,coef,lam,outWave,SASxs) 
    807818        FUNCREF SANSModelAAO_MCproto func 
     
    811822        Variable &SASxs 
    812823 
    813         Variable nPts_ran=10000,qu 
    814         qu = 4*pi/lam            
    815          
    816 // hard-wired into the Simulation directory rather than the SAS folder. 
    817 // plotting resolution-smeared models won't work any other way 
    818         Make/O/N=(nPts_ran)/D root:Simulation:Gq,root:Simulation:xw             // if these waves are 1000 pts, the results are "pixelated" 
    819         WAVE Gq = root:Simulation:gQ 
    820         WAVE xw = root:Simulation:xw 
    821         SetScale/I x (0+1e-4),qu*(1-1e-10),"", Gq,xw                    //don't start at zero or run up all the way to qu to avoid numerical errors 
    822  
    823 /// if all of the coefficients are well-behaved, then the last point is the background 
    824 // and I can set it to zero here (only for the calculation) 
    825         Duplicate/O coef,tmp_coef 
    826         Variable num=numpnts(coef) 
    827         tmp_coef[num-1] = 0 
    828          
    829         xw=x                                                                                            //for the AAO 
    830         func(tmp_coef,Gq,xw)                                                                    //call as AAO 
    831  
    832 //      Gq = x*Gq                                                                                                       // SAS approximation 
    833         Gq = Gq*sin(2*asin(x/qu))/sqrt(1-(x/qu))                        // exact 
    834         // 
    835         // 
    836         Integrate/METH=1 Gq/D=Gq_INT 
    837          
    838 //      SASxs = lam*lam/2/pi*Gq_INT[nPts_ran-1]                 //if the approximation is used 
    839         SASxs = lam*Gq_INT[nPts_ran-1] 
    840          
    841         Gq_INT /= Gq_INT[nPts_ran-1] 
     824        Variable nPts_ran=5000,qu,qu_scale=1,SASxs_old,qmin=1e-4 
     825        qu = 4*pi/lam    
     826         
     827         
     828        SASxs = 0 
     829        do 
     830                nPts_ran *= 2                   //first pass -- it starts at 2*5000= 10000 
     831                SASxs_old = SASxs               // "old" value is zero 
     832         
     833                // make qu much smaller if it's a call from USANS. then the points are spaced to the lower values as is necessary 
     834                // - qu of 5.2 is way too high for USANS-sized objects 
     835                if(lam < 2.9 && nPts_ran > 100000)              // USANS lam = 2.4 
     836                        qu_scale = 100 
     837                        qmin = 1e-7 
     838                endif    
     839                 
     840        // hard-wired into the Simulation directory rather than the SAS folder. 
     841        // plotting resolution-smeared models won't work any other way 
     842                Make/O/N=(nPts_ran)/D root:Simulation:Gq,root:Simulation:xw             // if these waves are 1000 pts, the results are "pixelated" 
     843                WAVE Gq = root:Simulation:gQ 
     844                WAVE xw = root:Simulation:xw 
     845                SetScale/I x (0+qmin),qu/qu_scale*(1-1e-10),"", Gq,xw                   //don't start at zero or run up all the way to qu to avoid numerical errors 
     846         
     847        /// if all of the coefficients are well-behaved, then the last point is the background 
     848        // and I can set it to zero here (only for the calculation) 
     849                Duplicate/O coef,tmp_coef 
     850                Variable num=numpnts(coef) 
     851                tmp_coef[num-1] = 0 
     852                 
     853                xw=x                                                                                            //for the AAO 
     854                func(tmp_coef,Gq,xw)                                                                    //call as AAO 
     855         
     856//              Gq = x*Gq                                                                                                       // SAS approximation 
     857                Gq = Gq*sin(2*asin(x/qu))/sqrt(1-(x/qu))                        // exact 
     858                // 
     859                // 
     860                Integrate/METH=1 Gq/D=Gq_INT 
     861                 
     862        //      SASxs = lam*lam/2/pi*Gq_INT[nPts_ran-1]                 //if the approximation is used 
     863                SASxs = lam*Gq_INT[nPts_ran-1] 
     864                 
     865                Gq_INT /= Gq_INT[nPts_ran-1] 
     866         
     867//              Print "nPts_ran, SASxs = ",nPts_ran, SASxs 
     868                 
     869        while( abs((SASxs_old-SASxs)/SASxs) > 0.02 && nPts_ran < 1e6)           // allow 5% error in XS 
    842870         
    843871        Duplicate/O Gq_INT $outWave 
    844  
     872         
     873//      Variable realXS 
     874//      realXS = SAS_XS_Sphere(coef,.1,lam) 
     875//      Print "Analytical XS = ",realXS 
     876         
    845877        return(0) 
    846878End 
     
    866898 
    867899        Variable nPts_ran=1000,qu,qmin,ii 
    868         qmin=1e-5 
     900        qmin=1e-7 
    869901        qu = 4*pi/lam            
    870902 
    871903// hard-wired into the Simulation directory rather than the SAS folder. 
    872904// plotting resolution-smeared models won't work any other way 
    873         Make/O/N=(nPts_ran)/D root:Simulation:Gq,root:Simulation:xw             // if these waves are 1000 pts, the results are "pixelated" 
    874         WAVE Gq = root:Simulation:gQ 
    875         WAVE xw = root:Simulation:xw 
     905        Make/O/N=(nPts_ran)/D root:Simulation:Gq_log,root:Simulation:xw_log             // if these waves are 1000 pts, the results are "pixelated" 
     906        WAVE Gq_log = root:Simulation:gQ_log 
     907        WAVE xw_log = root:Simulation:xw_log 
    876908//      SetScale/I x (0+1e-4),qu*(1-1e-10),"", Gq,xw                    //don't start at zero or run up all the way to qu to avoid numerical errors 
    877         xw =  alog(log(qmin) + x*((log(qu)-log(qmin))/nPts_ran)) 
     909        xw_log =  alog(log(qmin) + x*((log(qu)-log(qmin))/nPts_ran)) 
    878910 
    879911/// if all of the coefficients are well-behaved, then the last point is the background 
     
    883915        tmp_coef[num-1] = 0 
    884916         
    885         func(tmp_coef,Gq,xw)                                                                    //call as AAO 
    886         Gq = Gq*sin(2*asin(xw/qu))/sqrt(1-(xw/qu))                      // exact 
    887  
    888          
    889         Duplicate/O Gq Gq_INT 
    890         Gq_INT = 0 
     917        func(tmp_coef,Gq_log,xw_log)                                                                    //call as AAO 
     918        Gq_log = Gq_log*sin(2*asin(xw_log/qu))/sqrt(1-(xw_log/qu))                      // exact 
     919 
     920         
     921        Duplicate/O Gq_log Gq_INT_log 
     922        Gq_INT_log = 0 
    891923        for(ii=0;ii<nPts_ran;ii+=1) 
    892                 Gq_INT[ii] = AreaXY(xw,Gq,qmin,xw[ii]) 
     924                Gq_INT_log[ii] = AreaXY(xw_log,Gq_log,qmin,xw_log[ii]) 
    893925        endfor 
    894926         
    895         SASxs = lam*Gq_INT[nPts_ran-1] 
    896          
    897         Gq_INT /= Gq_INT[nPts_ran-1] 
     927        SASxs = lam*Gq_INT_log[nPts_ran-1] 
     928         
     929        Gq_INT_log /= Gq_INT_log[nPts_ran-1] 
     930         
     931         
     932        // now, before copying back, interpolate to a linear spacing 
     933        nPts_ran=100000                 //gobs of points 
     934        Make/O/N=(nPts_ran)/D root:Simulation:Gq,root:Simulation:xw             // if these waves are 1000 pts, the results are "pixelated" 
     935        WAVE Gq = root:Simulation:gQ 
     936        WAVE xw = root:Simulation:xw 
     937        SetScale/I x (qmin),qu*(1-1e-10),"", Gq,xw                      //don't start at zero or run up all the way to qu to avoid numerical errors 
     938        Duplicate/O Gq,Gq_INT 
     939        WAVE Gq_INT = root:Gq_INT               //keeps the same scaling 
     940 
     941        Gq_INT = interp(x,xw_log,Gq_INT_log) 
     942         
     943         
    898944         
    899945        Duplicate/O Gq_INT $outWave 
    900946 
    901947        return(0) 
     948End 
     949 
     950// 
     951// coef_sf must exist and be passed 
     952// 
     953Function SAS_XS_Sphere(cw,thick,lam) 
     954        Wave cw 
     955        Variable thick,lam 
     956         
     957        Variable SASxs,rad,Rg,phi,sld_s,sld_solv,rg2,i0,uval,tau,trans 
     958         
     959        phi = cw[0] 
     960        rad = cw[1] 
     961        sld_s = cw[2] 
     962        sld_solv = cw[3] 
     963         
     964 
     965        i0 = 4/3*pi*rad^3*(sld_s-sld_solv)^2*phi 
     966        Rg2 = 3/5*rad^2 
     967        Uval = (thick*1e8)*i0*lam^2/Rg2         // convert thick to A, and all cancels out 
     968 
     969        tau = 27/40/pi*uval 
     970         
     971        SASxs = tau/thick               // keep thick in cm here, so that SASxs is in cm^-1 
     972        trans = exp(-tau) 
     973         
     974        Print "SAS XS(cm^-1) = ",SASxs 
     975        Print "Est Trans = ",trans 
     976         
     977        return(SASxs) 
    902978End 
    903979 
     
    21722248        // subtracted before the calculation. 
    21732249        CalculateRandomDeviate(funcUnsmeared,$coefStr,wavelength,"root:Packages:NIST:SAS:ran_dev",sig_sas) 
    2174          
     2250 
     2251        if(sig_sas > 100) 
     2252                DoAlert 0,"SAS cross section > 100. Estimates of multiple scattering are unreliable. Choosing a model with a well-defined Rg may help" 
     2253        endif            
    21752254//                              if(sig_sas > 100) 
    21762255//                                      sprintf abortStr,"sig_sas = %g. Please check that the model coefficients have a zero background, or the low q is well-behaved.",sig_sas 
     
    22672346         
    22682347//      Simulate_1D_EmptyCell("TwoLevel_EC",aveint,qval,sigave,sigmaq,qbar,fsubs) 
     2348 
    22692349        Simulate_1D_EmptyCell("EC_Empirical",aveint,qval,sigave,sigmaq,qbar,fsubs) 
    22702350         
  • sans/Dev/trunk/NCNR_User_Procedures/Reduction/SANS/NCNR_Utils.ipf

    r901 r911  
    15291529 
    15301530 
    1531 // JAN 2013 -- Using John's measured values from 23 JAN 2013 
    1532 // 
    1533 // there are 13 discrete wavelengths in NGBLambda = 13 (only 10 used for 30m) 
    1534 // there are only 9 attenuators, not 10 as in the 30m 
     1531// xxxx JAN 2013 -- Using John's measured values from 23 JAN 2013 
     1532// 
     1533// xxxx there are 13 discrete wavelengths in NGBLambda = 13 (only 10 used for 30m) 
     1534// xxxx there are only 9 attenuators, not 10 as in the 30m 
     1535// 
     1536// -- updated MAY 2013 -- 
     1537// K. Weigandt's calibration  
     1538// 12 discrete wavelengths 
     1539// 10 attenuators 
    15351540// 
    15361541Proc MakeNGBAttenTable() 
     
    15381543        NewDataFolder/O root:myGlobals:Attenuators 
    15391544         
    1540         Variable num=13         //13 needed for tables to cover 3A - 30A 
     1545//      Variable num=13         //13 needed for tables to cover 3A - 30A 
     1546        Variable num=12         //12 needed for tables to cover 3A - 30A 
    15411547         
    15421548        Make/O/N=(num) root:myGlobals:Attenuators:NGBatt0 
     
    15501556        Make/O/N=(num) root:myGlobals:Attenuators:NGBatt8 
    15511557        Make/O/N=(num) root:myGlobals:Attenuators:NGBatt9 
    1552 //      Make/O/N=(num) root:myGlobals:Attenuators:NGBatt10 
     1558        Make/O/N=(num) root:myGlobals:Attenuators:NGBatt10 
    15531559         
    15541560        // and a wave for the errors at each attenuation factor 
     
    15631569        Make/O/N=(num) root:myGlobals:Attenuators:NGBatt8_err 
    15641570        Make/O/N=(num) root:myGlobals:Attenuators:NGBatt9_err 
    1565 //      Make/O/N=(num) root:myGlobals:Attenuators:NGBatt10_err   
     1571        Make/O/N=(num) root:myGlobals:Attenuators:NGBatt10_err   
    15661572         
    15671573        //NGB wave has 13 elements, the transmission of att# at the wavelengths  
     
    15691575        // note that some of the higher attenuations and ALL of the 30A data is interpolated 
    15701576        // none of these values are expected to be used in reality since the flux would be too low in practice 
    1571         Make/O/N=(num) root:myGlobals:Attenuators:NGBlambda={3,4,5,6,7,8,10,12,14,17,20,25,30} 
    1572  
    1573 // New calibration, Jan 2013 John Barker 
     1577//      Make/O/N=(num) root:myGlobals:Attenuators:NGBlambda={3,4,5,6,7,8,10,12,14,17,20,25,30}          //this is for 13 wavelengths 
     1578        Make/O/N=(num) root:myGlobals:Attenuators:NGBlambda={3,4,5,6,8,10,12,14,16,20,25,30}            // 12 wavelengths, MAY 2013 
     1579 
     1580 
     1581// new calibrations MAY 2013 
    15741582        root:myGlobals:Attenuators:NGBatt0 = {1,1,1,1,1,1,1,1,1,1,1,1,1}         
    1575         root:myGlobals:Attenuators:NGBatt1 = {0.522,0.476,0.42007,0.39298,0.36996,0.35462,0.31637,0.29422,0.27617,0.24904,0.22263,0.18525,0.15} 
    1576         root:myGlobals:Attenuators:NGBatt2 = {0.27046,0.21783,0.17405,0.15566,0.13955,0.1272,0.10114,0.087289,0.077363,0.063607,0.051098,0.0357,0.023} 
    1577         root:myGlobals:Attenuators:NGBatt3 = {0.12601,0.090906,0.064869,0.054644,0.046916,0.041169,0.028926,0.023074,0.019276,0.014244,0.01021,0.006029,0.0033} 
    1578         root:myGlobals:Attenuators:NGBatt4 = {0.057782,0.037886,0.024727,0.019499,0.015719,0.013041,0.0080739,0.0059418,0.0046688,0.0031064,0.0020001,0.0010049,0.0005} 
    1579         root:myGlobals:Attenuators:NGBatt5 = {0.026627,0.016169,0.0096679,0.0071309,0.0052982,0.0040951,0.0021809,0.001479,0.001096,0.00066564,0.00039384,0.0002,9e-05} 
    1580         root:myGlobals:Attenuators:NGBatt6 = {0.0091671,0.0053041,0.0029358,0.0019376,0.0013125,0.00096946,0.00042126,0.0002713,0.00019566,0.00011443,5e-05,3e-05,1.2e-05} 
    1581         root:myGlobals:Attenuators:NGBatt7 = {0.0017971,0.00089679,0.00040572,0.0002255,0.00013669,8.7739e-05,3.3373e-05,2.0759e-05,1.5624e-05,1e-05,8e-06,4e-06,2.1e-06} 
    1582         root:myGlobals:Attenuators:NGBatt8 = {0.00033646,0.00012902,4.6033e-05,2.414e-05,1.4461e-05,9.4644e-06,4.8121e-06,4e-06,3e-06,2e-06,1e-06,7e-07,3.3e-07} 
    1583         root:myGlobals:Attenuators:NGBatt9 = {7e-05,2e-05,8.2796e-06,4.5619e-06,3.1543e-06,2.6216e-06,8e-07,6e-07,4e-07,3e-07,2e-07,1e-07,5e-08} 
    1584 //      root:myGlobals:Attenuators:NGBatt10 = {} 
    1585  
    1586   // percent errors as measured, Jan 2013 values 
     1583        root:myGlobals:Attenuators:NGBatt1 = {0.512,0.474,0.418,0.392,0.354,0.325,0.294,0.27,0.255,0.222,0.185,0.155} 
     1584        root:myGlobals:Attenuators:NGBatt2 = {0.268,0.227,0.184,0.16,0.129,0.108,0.0904,0.0777,0.0689,0.0526,0.0372,0.0263} 
     1585        root:myGlobals:Attenuators:NGBatt3 = {0.135,0.105,0.0769,0.0629,0.0455,0.0342,0.0266,0.0212,0.0178,0.0117,0.007,0.00429} 
     1586        root:myGlobals:Attenuators:NGBatt4 = {0.0689,0.0483,0.0324,0.0249,0.016,0.0109,0.00782,0.00583,0.0046,0.00267,0.00135,0.000752} 
     1587        root:myGlobals:Attenuators:NGBatt5 = {0.0348,0.0224,0.0136,0.00979,0.0056,0.00347,0.0023,0.0016,0.0012,0.000617,0.000282,0.000155} 
     1588        root:myGlobals:Attenuators:NGBatt6 = {0.018,0.0105,0.00586,0.00398,0.00205,0.00115,0.000709,0.000467,0.000335,0.000157,7.08e-05,4e-05} 
     1589        root:myGlobals:Attenuators:NGBatt7 = {0.00466,0.00226,0.00104,0.000632,0.00026,0.000123,6.8e-05,4.26e-05,3e-05,1.5e-05,8e-06,4e-06} 
     1590        root:myGlobals:Attenuators:NGBatt8 = {0.00121,0.000488,0.000187,0.000101,3.52e-05,1.61e-05,9.79e-06,7.68e-06,4.4e-06,2e-06,1e-06,5e-07} 
     1591        root:myGlobals:Attenuators:NGBatt9 = {0.000312,0.000108,3.53e-05,1.78e-05,6.6e-06,4.25e-06,2e-06,1.2e-06,9e-07,4e-07,1.6e-07,9e-08} 
     1592        root:myGlobals:Attenuators:NGBatt10 = {8.5e-05,2.61e-05,8.24e-06,4.47e-06,2.53e-06,9e-07,5e-07,3e-07,2e-07,1e-07,4e-08,2e-08} 
     1593 
     1594  // percent errors as measured, MAY 2013 values 
    15871595  // zero error for zero attenuators, large values put in for unknown values (either 2% or 5%) 
    15881596        root:myGlobals:Attenuators:NGBatt0_err = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 } 
    1589         root:myGlobals:Attenuators:NGBatt1_err = {0.12116,0.111059,0.150188,0.15168,0.174434,0.218745,0.0938678,0.144216,0.2145,0.141995,0.153655,0.157188,5} 
    1590         root:myGlobals:Attenuators:NGBatt2_err = {0.183583,0.19981,0.278392,0.286518,0.336599,0.240429,0.190996,0.178529,0.266807,0.23608,0.221334,0.245336,5} 
    1591         root:myGlobals:Attenuators:NGBatt3_err = {0.271054,0.326341,0.30164,0.31008,0.364188,0.296638,0.1914,0.22433,0.340313,0.307021,0.279339,0.319965,5} 
    1592         root:myGlobals:Attenuators:NGBatt4_err = {0.333888,0.361023,0.356208,0.368968,0.437084,0.322955,0.248284,0.260956,0.402069,0.368168,0.337252,0.454958,5} 
    1593         root:myGlobals:Attenuators:NGBatt5_err = {0.365745,0.433845,0.379735,0.394999,0.470603,0.357534,0.290938,0.291193,0.455465,0.426855,0.434639,2,5} 
    1594         root:myGlobals:Attenuators:NGBatt6_err = {0.402066,0.470239,0.410136,0.432342,0.523241,0.389247,0.333352,0.325301,0.517036,0.539386,2,2,5} 
    1595         root:myGlobals:Attenuators:NGBatt7_err = {0.542334,0.549954,0.45554,0.497426,0.624473,0.454971,0.432225,0.464043,0.752858,2,5,5,5} 
    1596         root:myGlobals:Attenuators:NGBatt8_err = {0.704775,0.673556,0.537178,0.62027,0.814375,0.582449,0.662811,2,2,5,5,5,5} 
    1597         root:myGlobals:Attenuators:NGBatt9_err = {2,2,0.583513,0.685477,0.901413,0.767115,2,5,5,5,5,5,5} 
    1598 //      root:myGlobals:Attenuators:NGBatt10_err = {}   
     1597        root:myGlobals:Attenuators:NGBatt1_err = {0.174,0.256,0.21,0.219,0.323,0.613,0.28,0.135,0.195,0.216,0.214,19.8} 
     1598        root:myGlobals:Attenuators:NGBatt2_err = {0.261,0.458,0.388,0.419,0.354,0.668,0.321,0.206,0.302,0.305,0.315,31.1} 
     1599        root:myGlobals:Attenuators:NGBatt3_err = {0.319,0.576,0.416,0.448,0.431,0.688,0.37,0.247,0.368,0.375,0.41,50.6} 
     1600        root:myGlobals:Attenuators:NGBatt4_err = {0.41,0.611,0.479,0.515,0.461,0.715,0.404,0.277,0.416,0.436,0.576,111} 
     1601        root:myGlobals:Attenuators:NGBatt5_err = {0.549,0.684,0.503,0.542,0.497,0.735,0.428,0.3,0.456,0.538,1.08,274} 
     1602        root:myGlobals:Attenuators:NGBatt6_err = {0.61,0.712,0.528,0.571,0.52,0.749,0.446,0.333,0.515,0.836,2.28,5} 
     1603        root:myGlobals:Attenuators:NGBatt7_err = {0.693,0.76,0.556,0.607,0.554,0.774,0.516,0.56,0.924,5,5,5} 
     1604        root:myGlobals:Attenuators:NGBatt8_err = {0.771,0.813,0.59,0.657,0.612,0.867,0.892,1.3,5,5,5,5} 
     1605        root:myGlobals:Attenuators:NGBatt9_err = {0.837,0.867,0.632,0.722,0.751,1.21,5,5,5,5,5,5} 
     1606        root:myGlobals:Attenuators:NGBatt10_err = {0.892,0.921,0.715,0.845,1.09,5,5,5,5,5,5,5}   
     1607 
     1608 
     1609//// (old) New calibration, Jan 2013 John Barker 
     1610//      root:myGlobals:Attenuators:NGBatt0 = {1,1,1,1,1,1,1,1,1,1,1,1,1}         
     1611//      root:myGlobals:Attenuators:NGBatt1 = {0.522,0.476,0.42007,0.39298,0.36996,0.35462,0.31637,0.29422,0.27617,0.24904,0.22263,0.18525,0.15} 
     1612//      root:myGlobals:Attenuators:NGBatt2 = {0.27046,0.21783,0.17405,0.15566,0.13955,0.1272,0.10114,0.087289,0.077363,0.063607,0.051098,0.0357,0.023} 
     1613//      root:myGlobals:Attenuators:NGBatt3 = {0.12601,0.090906,0.064869,0.054644,0.046916,0.041169,0.028926,0.023074,0.019276,0.014244,0.01021,0.006029,0.0033} 
     1614//      root:myGlobals:Attenuators:NGBatt4 = {0.057782,0.037886,0.024727,0.019499,0.015719,0.013041,0.0080739,0.0059418,0.0046688,0.0031064,0.0020001,0.0010049,0.0005} 
     1615//      root:myGlobals:Attenuators:NGBatt5 = {0.026627,0.016169,0.0096679,0.0071309,0.0052982,0.0040951,0.0021809,0.001479,0.001096,0.00066564,0.00039384,0.0002,9e-05} 
     1616//      root:myGlobals:Attenuators:NGBatt6 = {0.0091671,0.0053041,0.0029358,0.0019376,0.0013125,0.00096946,0.00042126,0.0002713,0.00019566,0.00011443,5e-05,3e-05,1.2e-05} 
     1617//      root:myGlobals:Attenuators:NGBatt7 = {0.0017971,0.00089679,0.00040572,0.0002255,0.00013669,8.7739e-05,3.3373e-05,2.0759e-05,1.5624e-05,1e-05,8e-06,4e-06,2.1e-06} 
     1618//      root:myGlobals:Attenuators:NGBatt8 = {0.00033646,0.00012902,4.6033e-05,2.414e-05,1.4461e-05,9.4644e-06,4.8121e-06,4e-06,3e-06,2e-06,1e-06,7e-07,3.3e-07} 
     1619//      root:myGlobals:Attenuators:NGBatt9 = {7e-05,2e-05,8.2796e-06,4.5619e-06,3.1543e-06,2.6216e-06,8e-07,6e-07,4e-07,3e-07,2e-07,1e-07,5e-08} 
     1620////    root:myGlobals:Attenuators:NGBatt10 = {} 
     1621// 
     1622//  // percent errors as measured, Jan 2013 values 
     1623//  // zero error for zero attenuators, large values put in for unknown values (either 2% or 5%) 
     1624//      root:myGlobals:Attenuators:NGBatt0_err = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 } 
     1625//      root:myGlobals:Attenuators:NGBatt1_err = {0.12116,0.111059,0.150188,0.15168,0.174434,0.218745,0.0938678,0.144216,0.2145,0.141995,0.153655,0.157188,5} 
     1626//      root:myGlobals:Attenuators:NGBatt2_err = {0.183583,0.19981,0.278392,0.286518,0.336599,0.240429,0.190996,0.178529,0.266807,0.23608,0.221334,0.245336,5} 
     1627//      root:myGlobals:Attenuators:NGBatt3_err = {0.271054,0.326341,0.30164,0.31008,0.364188,0.296638,0.1914,0.22433,0.340313,0.307021,0.279339,0.319965,5} 
     1628//      root:myGlobals:Attenuators:NGBatt4_err = {0.333888,0.361023,0.356208,0.368968,0.437084,0.322955,0.248284,0.260956,0.402069,0.368168,0.337252,0.454958,5} 
     1629//      root:myGlobals:Attenuators:NGBatt5_err = {0.365745,0.433845,0.379735,0.394999,0.470603,0.357534,0.290938,0.291193,0.455465,0.426855,0.434639,2,5} 
     1630//      root:myGlobals:Attenuators:NGBatt6_err = {0.402066,0.470239,0.410136,0.432342,0.523241,0.389247,0.333352,0.325301,0.517036,0.539386,2,2,5} 
     1631//      root:myGlobals:Attenuators:NGBatt7_err = {0.542334,0.549954,0.45554,0.497426,0.624473,0.454971,0.432225,0.464043,0.752858,2,5,5,5} 
     1632//      root:myGlobals:Attenuators:NGBatt8_err = {0.704775,0.673556,0.537178,0.62027,0.814375,0.582449,0.662811,2,2,5,5,5,5} 
     1633//      root:myGlobals:Attenuators:NGBatt9_err = {2,2,0.583513,0.685477,0.901413,0.767115,2,5,5,5,5,5,5} 
     1634////    root:myGlobals:Attenuators:NGBatt10_err = {}   
    15991635   
    16001636End 
     
    18421878                case "NGA": 
    18431879                case "NGB": 
    1844 //                      Print "Using the NG7 table for NGB *** this needs to be updated ***" 
    18451880                        attenFactor = LookupAttenNGB(lam,attenNo,atten_err) 
    18461881                        break 
Note: See TracChangeset for help on using the changeset viewer.