Changeset 889 for sans/Dev/trunk/NCNR_User_Procedures/Reduction/SANS
- Timestamp:
- Jan 24, 2013 12:42:19 PM (10 years ago)
- Location:
- sans/Dev/trunk/NCNR_User_Procedures/Reduction/SANS
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
sans/Dev/trunk/NCNR_User_Procedures/Reduction/SANS/NCNR_Utils.ipf
r888 r889 45 45 Variable/G root:myGlobals:DeadtimeNG7_ORNL_VAX = 3.4e-6 //pre 25-FEB-2010 used VAX 46 46 Variable/G root:myGlobals:DeadtimeNG7_ORNL_ICE = 2.3e-6 //post 25-FEB-2010 used ICE 47 Variable/G root:myGlobals:DeadtimeNGA_ORNL_ICE = 4.0e-6 //per JGB 16-JAN-2 301347 Variable/G root:myGlobals:DeadtimeNGA_ORNL_ICE = 4.0e-6 //per JGB 16-JAN-2013 48 48 Variable/G root:myGlobals:DeadtimeDefault = 3.4e-6 49 49 … … 474 474 // NG3 DECEMBER 2009 1.5 microseconds 475 475 // NG7 APRIL2010 2.3 microseconds 476 // NGA TBD 2013 477 // TODO_10m: measure proper dead time constants 476 // NGA JAN 2013 4 microseconds 478 477 // 479 478 // … … 1520 1519 1521 1520 1522 // JAN 2013 -- a duplication of the NG7 table, needs to be updated after the attenuation factors 1523 // are measured 1524 // 1525 // 1) change num to be the number of discrete wavelengths 1526 // 2) set these in ngALambda = 1527 // 3) do I have (11) slots for atten 0-10? 1528 // 4) fill in the tables of factors and errors 1529 // 1530 // TODO_10m:::: 1521 // JAN 2013 -- Using John's measured values from 23 JAN 2013 1522 // 1523 // there are 13 discrete wavelengths in ngALambda = 13 (only 10 used for 30m) 1524 // there are only 9 attenuators, not 10 as in the 30m 1525 // 1531 1526 Proc MakeNGAAttenTable() 1532 1527 1533 1528 NewDataFolder/O root:myGlobals:Attenuators 1534 1529 1535 Variable num=1 0 //10 needed for tables after June 20071530 Variable num=13 //13 needed for tables to cover 3A - 30A 1536 1531 1537 1532 Make/O/N=(num) root:myGlobals:Attenuators:ngAatt0 … … 1545 1540 Make/O/N=(num) root:myGlobals:Attenuators:ngAatt8 1546 1541 Make/O/N=(num) root:myGlobals:Attenuators:ngAatt9 1547 Make/O/N=(num) root:myGlobals:Attenuators:ngAatt101542 // Make/O/N=(num) root:myGlobals:Attenuators:ngAatt10 1548 1543 1549 1544 // and a wave for the errors at each attenuation factor … … 1558 1553 Make/O/N=(num) root:myGlobals:Attenuators:ngAatt8_err 1559 1554 Make/O/N=(num) root:myGlobals:Attenuators:ngAatt9_err 1560 Make/O/N=(num) root:myGlobals:Attenuators:ngAatt10_err1561 1562 //NGA wave has 1 0elements, the transmission of att# at the wavelengths1563 //lambda = 4, 5,6,7,8,10,12,14,17,201564 // note that some of the higher attenuations and ALL of the 4 A and 20A data is interpolated1555 // Make/O/N=(num) root:myGlobals:Attenuators:ngAatt10_err 1556 1557 //NGA wave has 13 elements, the transmission of att# at the wavelengths 1558 //lambda = 3A to 30A 1559 // note that some of the higher attenuations and ALL of the 30A data is interpolated 1565 1560 // none of these values are expected to be used in reality since the flux would be too low in practice 1566 Make/O/N=(num) root:myGlobals:Attenuators:ngAlambda={ 4,5,6,7,8,10,12,14,17,20}1567 1568 // New calibration, J une 2007,John Barker1569 root:myGlobals:Attenuators:ngAatt0 = {1, 1, 1, 1, 1, 1, 1, 1,1,1}1570 root:myGlobals:Attenuators:ngAatt1 = {0. 448656,0.4192,0.3925,0.3661,0.3458,0.3098,0.2922,0.2738,0.2544,0.251352}1571 root:myGlobals:Attenuators:ngAatt2 = {0.2 17193,0.1898,0.1682,0.148,0.1321,0.1076,0.0957,0.08485,0.07479,0.0735965}1572 root:myGlobals:Attenuators:ngAatt3 = {0. 098019,0.07877,0.06611,0.05429,0.04548,0.03318,0.02798,0.0234,0.02004,0.0202492}1573 root:myGlobals:Attenuators:ngAatt4 = {0.0 426904,0.03302,0.02617,0.02026,0.0158,0.01052,0.008327,0.006665,0.005745,0.00524807}1574 root:myGlobals:Attenuators:ngAatt5 = {0.0 194353,0.01398,0.01037,0.0075496,0.005542,0.003339,0.002505,0.001936,0.001765,0.00165959}1575 root:myGlobals:Attenuators:ngAatt6 = {0.009 71666,0.005979,0.004136,0.002848,0.001946,0.001079,0.0007717,0.000588,0.000487337,0.000447713}1576 root:myGlobals:Attenuators:ngAatt7 = {0.00 207332,0.001054,0.0006462,0.0003957,0.0002368,0.0001111,7.642e-05,4.83076e-05,3.99401e-05,3.54814e-05}1577 root:myGlobals:Attenuators:ngAatt8 = {0.0003 97173,0.0001911,0.0001044,5.844e-05,3.236e-05,1.471e-05,6.88523e-06,4.06541e-06,3.27333e-06,2.81838e-06}1578 root:myGlobals:Attenuators:ngAatt9 = { 9.43625e-05,3.557e-05,1.833e-05,1.014e-05,6.153e-06,1.64816e-06,6.42353e-07,3.42132e-07,2.68269e-07,2.2182e-07}1579 root:myGlobals:Attenuators:ngAatt10 = {2.1607e-05,7.521e-06,2.91221e-06,1.45252e-06,7.93451e-07,1.92309e-07,5.99279e-08,2.87928e-08,2.19862e-08,1.7559e-08}1580 1581 // percent errors as measured, May 2007values1582 // zero error for zero attenuators, appropriate average values put in for unknown values1583 root:myGlobals:Attenuators:ngAatt0_err = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }1584 root:myGlobals:Attenuators:ngAatt1_err = {0. 2,0.169,0.1932,0.253,0.298,0.4871,0.238,0.245,0.332,0.3}1585 root:myGlobals:Attenuators:ngAatt2_err = {0. 3,0.305,0.3551,0.306,0.37,0.6113,0.368,0.413,0.45,0.4}1586 root:myGlobals:Attenuators:ngAatt3_err = {0. 4,0.355,0.4158,0.36,0.4461,0.7643,0.532,0.514,0.535,0.5}1587 root:myGlobals:Attenuators:ngAatt4_err = {0. 45,0.402,0.4767,0.415,0.5292,0.9304,0.635,0.588,0.623,0.6}1588 root:myGlobals:Attenuators:ngAatt5_err = {0. 5,0.447,0.5376,0.487,0.6391,1.169,0.708,0.665,0.851,0.8}1589 root:myGlobals:Attenuators:ngAatt6_err = {0. 6,0.501,0.6136,0.528,0.8796,1.708,0.782,0.874,1,1}1590 root:myGlobals:Attenuators:ngAatt7_err = {0. 8,0.697,0.9149,0.583,1.173,2.427,1.242,2,2,2}1591 root:myGlobals:Attenuators:ngAatt8_err = { 1,0.898,1.24,0.696,1.577,3.412,3,3,3,3}1592 root:myGlobals:Attenuators:ngAatt9_err = { 1.5,1.113,1.599,1.154,2.324,4.721,5,5,5,5}1593 root:myGlobals:Attenuators:ngAatt10_err = {1.5,1.493,5,5,5,5,5,5,5,5}1561 Make/O/N=(num) root:myGlobals:Attenuators:ngAlambda={3,4,5,6,7,8,10,12,14,17,20,25,30} 1562 1563 // New calibration, Jan 2013 John Barker 1564 root:myGlobals:Attenuators:ngAatt0 = {1,1,1,1,1,1,1,1,1,1,1,1,1} 1565 root:myGlobals:Attenuators:ngAatt1 = {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} 1566 root:myGlobals:Attenuators:ngAatt2 = {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} 1567 root:myGlobals:Attenuators:ngAatt3 = {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} 1568 root:myGlobals:Attenuators:ngAatt4 = {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} 1569 root:myGlobals:Attenuators:ngAatt5 = {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} 1570 root:myGlobals:Attenuators:ngAatt6 = {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} 1571 root:myGlobals:Attenuators:ngAatt7 = {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} 1572 root:myGlobals:Attenuators:ngAatt8 = {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} 1573 root:myGlobals:Attenuators:ngAatt9 = {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} 1574 // root:myGlobals:Attenuators:ngAatt10 = {} 1575 1576 // percent errors as measured, Jan 2013 values 1577 // zero error for zero attenuators, large values put in for unknown values (either 2% or 5%) 1578 root:myGlobals:Attenuators:ngAatt0_err = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 } 1579 root:myGlobals:Attenuators:ngAatt1_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} 1580 root:myGlobals:Attenuators:ngAatt2_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} 1581 root:myGlobals:Attenuators:ngAatt3_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} 1582 root:myGlobals:Attenuators:ngAatt4_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} 1583 root:myGlobals:Attenuators:ngAatt5_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} 1584 root:myGlobals:Attenuators:ngAatt6_err = {0.402066,0.470239,0.410136,0.432342,0.523241,0.389247,0.333352,0.325301,0.517036,0.539386,2,2,5} 1585 root:myGlobals:Attenuators:ngAatt7_err = {0.542334,0.549954,0.45554,0.497426,0.624473,0.454971,0.432225,0.464043,0.752858,2,5,5,5} 1586 root:myGlobals:Attenuators:ngAatt8_err = {0.704775,0.673556,0.537178,0.62027,0.814375,0.582449,0.662811,2,2,5,5,5,5} 1587 root:myGlobals:Attenuators:ngAatt9_err = {2,2,0.583513,0.685477,0.901413,0.767115,2,5,5,5,5,5,5} 1588 // root:myGlobals:Attenuators:ngAatt10_err = {} 1594 1589 1595 1590 End … … 1703 1698 // Mar 2010 - abs() added to attStr to account for ICE reporting -0.0001 as an attenuator position, which truncates to "-0" 1704 1699 // 1705 // JAN 2013 -- a duplication of the NG7 table, needs to be updated after the attenuation factors 1706 // are measured - Note that the wavelength range is larger here than for the 30m instruments 1707 // 1708 // TODO_10m:::: 1700 // JAN 2013 -- now correct, NGA table has been added, allowing for 3A to 30A 1701 // 1709 1702 Function LookupAttenNGA(lambda,attenNo,atten_err) 1710 1703 Variable lambda, attenNo, &atten_err … … 1770 1763 break 1771 1764 case "NGA": 1772 Print "Using the NG7 table for NGA *** this needs to be updated ***"1773 1765 attenFactor = LookupAttenNGA(lam,attenNo,atten_err) 1774 1766 break -
sans/Dev/trunk/NCNR_User_Procedures/Reduction/SANS/SASCALC.ipf
r888 r889 40 40 // -- For the 10m SANS... 41 41 // 42 // - how many guides are there43 // - no lenses? focusing pinholes?44 // - aperture sizes?42 // x- how many guides are there 43 // x- no lenses? focusing pinholes? 44 // x- aperture sizes? 45 45 // - flux values 46 // - huber/sample chamber is inline, so get rid of this for 10m (gray out?)47 // - does this hook into anywhere in the main program? Attenuators, etc.46 // x- huber/sample chamber is inline, so get rid of this for 10m (gray out?) 47 // x- does this hook into anywhere in the main program? Attenuators, etc. 48 48 // where knowledge of the 10m SANS is necessary?? 49 // - setting the instrument "number" is done here as "10". This will have a trickle-down effect for the places that use49 // x- setting the instrument "number" is done here as "10". This will have a trickle-down effect for the places that use 50 50 // the global -- root:Packages:NIST:SAS:instrument (search for it everywhere...) 51 // - repair the naming/numbering scheme to look for the string "NGx" and switch on that, not a number, which is unreliable and confusing.51 // x- repair the naming/numbering scheme to look for the string "NGx" and switch on that, not a number, which is unreliable and confusing. 52 52 // 53 53 // use str2hex(str) (my function) to convert "A" to 10 … … 176 176 root:Packages:NIST:SAS:tickSDDNGA = {106,200,300,400,525} 177 177 root:Packages:NIST:SAS:lblSDDNGA = {"106","200","300","400","525"} 178 // root:Packages:NIST:SAS:tickSDDNGA = {106,200,300,400,500,525} 179 // root:Packages:NIST:SAS:lblSDDNGA = {"106","200","300","400","500","525"} 178 180 179 181 //for the fake dependency … … 328 330 // reserving NGB for the moved NG3 instrument 329 331 // which may be simpler here to keep functions from breaking... 330 331 // *** check ALL of these values to make sure they are correct. They were copied from NG3 and 332 // most are completey wrong for the 10m SANS 333 // 334 // TODO_10m: 332 // 333 // Updated 24 JAN 2013 with current flux numbers from John 334 // 335 335 Function initNGA() 336 336 … … 345 345 Variable/G del_r = 0.5 346 346 Variable/G det_width = 64.0 347 Variable/G lambda_t = 5.50 347 Variable/G lambda_t = 5.50 //good, Jan 2013 348 348 Variable/G l2r_lower = 106 349 349 Variable/G l2r_upper = 525 350 350 Variable/G lambda_lower = 3.0 351 351 Variable/G lambda_upper = 30.0 352 Variable/G d_upper = 25.0 //**353 Variable/G bs_factor = 1.05 //**354 Variable/G t1 = 0.63 //** 355 Variable/G t2 = 1.0 //** 356 Variable/G t3 = 0.75 //** 357 Variable/G l_gap = 1 00.0 //**358 Variable/G guide_width = 6.0 //**352 Variable/G d_upper = 25.0 353 Variable/G bs_factor = 1.05 354 Variable/G t1 = 0.63 //**good, Jan 2013 355 Variable/G t2 = 1.0 //**good, Jan 2013 356 Variable/G t3 = 0.75 //**good, Jan 2013 357 Variable/G l_gap = 165 //**good, Jan 2013 358 Variable/G guide_width = 5.0 //**good, Jan 2013 359 359 Variable/G idmax = 100.0 //** max count rate per pixel 360 // //old values, from 3/2002 361 // Variable/G phi_0 = 2.95e13 362 // Variable/G b = 0.023 363 // Variable/G c = 0.023 364 365 //new values, from 11/2009 --- BeamFluxReport_2009.ifn 366 Variable/G phi_0 = 2.42e13 367 Variable/G b = 0.0 368 Variable/G c = -0.0243 369 Variable/G gGuide_loss = 0.924 360 // current values -- Jan 2013 361 Variable/G phi_0 = 2.5e13 362 Variable/G b = 0.03 363 Variable/G c = 0.03 364 365 Variable/G gGuide_loss = 0.95 370 366 371 367 // //fwhm values (new variables) (+3, 0, -3, calibrated 2009) … … 449 445 End 450 446 451 // TODO_10m: verify that controls have the proper limits for 10m SANS (see UpdateControls())447 // 452 448 Window SASCALC_Panel() 453 449 … … 591 587 // set the wavelength spread popup 592 588 // 593 // TODO_10m:594 589 Function UpdateControls() 595 590 //poll the controls on the panel, and change needed values … … 691 686 break 692 687 693 case "NGA": // 10m SANS // TODO_10m: update values in this section688 case "NGA": // 10m SANS 694 689 if(ng>2) 695 690 ng=2 … … 886 881 // currently, the 17.2 A for lens/prism @ ng3 must be typed in 887 882 // 888 // TODO_10m: verify operation, no lenses @ 10m889 883 Function LensCheckProc(ctrlName,checked) : CheckBoxControl 890 884 String ctrlName … … 1740 1734 // Incorporates eqn. 3-15 from J. Appl. Cryst. (1995) v. 28 p105-114 1741 1735 // 1742 // TODO_10m: verify, and does this match the "main" getResolution function? gravity?1743 1736 Function/S S_getResolution(inQ,lambda,lambdaWidth,DDet,apOff,S1,S2,L1,L2,BS,del_r,SigmaQ,QBar,fSubS) 1744 1737 Variable inQ, lambda, lambdaWidth, DDet, apOff, S1, S2, L1, L2, BS, del_r … … 1979 1972 //parses the control for A1 diam 1980 1973 // updates the wave 1981 // TODO_10m: verify that this reads correctly (after I know the values)1982 1974 Function sourceApertureDiam() 1983 1975 ControlInfo/W=SASCALC popup0 … … 2064 2056 // 10m SANS handled differently 2065 2057 // s12 == 0 by definition 2066 // TODO_10m:-- 16JAN13 - these are now correct values2058 // -- 16JAN13 - these are now correct values 2067 2059 if(ng==0) 2068 2060 SSD = 513 - L2diff … … 2086 2078 // SSD in meters 2087 2079 // 2088 // TODO_10m -- for the 10m SANS - all of the numbers here are hard-wired and are WRONG2089 // -- need to re-write this to take a second parameter, a string with the instrument, or something2090 // else needs to be changed in GetHeaderInfoToWave() which calls this function2091 //2092 //2093 // TODO_10m: correct values, verify2094 2080 Function numGuides(SSD) 2095 2081 variable SSD … … 2112 2098 case "NGA": 2113 2099 // 10m SANS handled differently 2114 // TODO_10m:-- 16JAN13 - these are now correct values2100 // -- 16JAN13 - these are now correct values 2115 2101 Ng = 513 - NGA_gap - SSD*100 -5 2116 2102 Ng /= 150 … … 2159 2145 // relative to the chamber) 2160 2146 // updates the wave 2161 // TODO_10m: verify2162 2147 Function sampleToDetectorDist() 2163 2148 … … 2223 2208 // 2224 2209 // - in an approximate way, account for lenses 2225 // TODO_10m: verify2226 2210 Function beamstopDiam() 2227 2211 … … 2362 2346 // other values are changed in the initialization routines 2363 2347 // 2364 //2365 // TODO_10m -- for the 10m SANS - all of the numbers need to be updated in the initialization2366 2348 Function beamIntensity() 2367 2349 … … 2408 2390 2409 2391 //estimate the number of pixels in the beam, and enforce the maximum countrate per pixel (idmax) 2410 // TODO_10m: verify2411 2392 Function attenuatorTransmission() 2412 2393
Note: See TracChangeset
for help on using the changeset viewer.