- Timestamp:
- Jan 24, 2013 12:42:19 PM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
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.