Ignore:
Timestamp:
Jan 24, 2013 12:42:19 PM (10 years ago)
Author:
srkline
Message:

Added the attenuator table and flux values for the 10m SANS instrument as measured by John Barker. Other changes to the code for the 10m SANS appear to be complete, pending some more thorough testing.

File:
1 edited

Legend:

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

    r888 r889  
    4040// -- For the 10m SANS... 
    4141// 
    42 //              - how many guides are there 
    43 //              - no lenses? focusing pinholes? 
    44 //              - aperture sizes? 
     42//              x- how many guides are there 
     43//              x- no lenses? focusing pinholes? 
     44//              x- aperture sizes? 
    4545//              - 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. 
    4848//                      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 use 
     49//              x- setting the instrument "number" is done here as "10". This will have a trickle-down effect for the places that use 
    5050//              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. 
    5252// 
    5353// use str2hex(str) (my function) to convert "A" to 10 
     
    176176        root:Packages:NIST:SAS:tickSDDNGA = {106,200,300,400,525} 
    177177        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"} 
    178180                 
    179181        //for the fake dependency 
     
    328330// reserving NGB for the moved NG3 instrument 
    329331// 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// 
    335335Function initNGA() 
    336336 
     
    345345        Variable/G del_r = 0.5 
    346346        Variable/G det_width = 64.0 
    347         Variable/G lambda_t = 5.50 
     347        Variable/G lambda_t = 5.50                              //good, Jan 2013 
    348348        Variable/G l2r_lower = 106 
    349349        Variable/G l2r_upper =  525 
    350350        Variable/G lambda_lower = 3.0 
    351351        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 = 100.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 
    359359        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 
    370366         
    371367//      //fwhm values (new variables) (+3, 0, -3, calibrated 2009) 
     
    449445End 
    450446 
    451 // TODO_10m: verify that controls have the proper limits for 10m SANS (see UpdateControls()) 
     447// 
    452448Window SASCALC_Panel() 
    453449 
     
    591587// set the wavelength spread popup 
    592588// 
    593 // TODO_10m: 
    594589Function UpdateControls() 
    595590        //poll the controls on the panel, and change needed values 
     
    691686                        break 
    692687                         
    693                 case "NGA":             // 10m SANS // TODO_10m: update values in this section 
     688                case "NGA":             // 10m SANS  
    694689                        if(ng>2) 
    695690                                ng=2 
     
    886881// currently, the 17.2 A for lens/prism @ ng3 must be typed in 
    887882// 
    888 // TODO_10m: verify operation, no lenses @ 10m 
    889883Function LensCheckProc(ctrlName,checked) : CheckBoxControl 
    890884        String ctrlName 
     
    17401734// Incorporates eqn. 3-15 from J. Appl. Cryst. (1995) v. 28 p105-114 
    17411735// 
    1742 // TODO_10m: verify, and does this match the "main" getResolution function? gravity? 
    17431736Function/S S_getResolution(inQ,lambda,lambdaWidth,DDet,apOff,S1,S2,L1,L2,BS,del_r,SigmaQ,QBar,fSubS) 
    17441737        Variable inQ, lambda, lambdaWidth, DDet, apOff, S1, S2, L1, L2, BS, del_r 
     
    19791972//parses the control for A1 diam 
    19801973// updates the wave 
    1981 // TODO_10m: verify that this reads correctly (after I know the values) 
    19821974Function sourceApertureDiam() 
    19831975        ControlInfo/W=SASCALC popup0 
     
    20642056                        // 10m SANS handled differently 
    20652057                        // s12 == 0 by definition 
    2066                         // TODO_10m:  -- 16JAN13 - these are now correct values 
     2058                        // -- 16JAN13 - these are now correct values 
    20672059                        if(ng==0) 
    20682060                                SSD = 513 - L2diff 
     
    20862078// SSD in meters 
    20872079// 
    2088 // TODO_10m -- for the 10m SANS - all of the numbers here are hard-wired and are WRONG 
    2089 // -- need to re-write this to take a second parameter, a string with the instrument, or something 
    2090 // else needs to be changed in GetHeaderInfoToWave() which calls this function 
    2091 // 
    2092 // 
    2093 // TODO_10m: correct values, verify 
    20942080Function numGuides(SSD) 
    20952081        variable SSD 
     
    21122098                case "NGA": 
    21132099                        // 10m SANS handled differently 
    2114                         // TODO_10m:  -- 16JAN13 - these are now correct values 
     2100                        // -- 16JAN13 - these are now correct values 
    21152101                        Ng = 513 - NGA_gap - SSD*100 -5 
    21162102                        Ng /= 150 
     
    21592145//  relative to the chamber) 
    21602146// updates the wave 
    2161 // TODO_10m: verify 
    21622147Function sampleToDetectorDist() 
    21632148 
     
    22232208// 
    22242209// - in an approximate way, account for lenses 
    2225 // TODO_10m: verify 
    22262210Function beamstopDiam() 
    22272211 
     
    23622346// other values are changed in the initialization routines 
    23632347// 
    2364 // 
    2365 // TODO_10m -- for the 10m SANS - all of the numbers need to be updated in the initialization 
    23662348Function beamIntensity() 
    23672349 
     
    24082390 
    24092391//estimate the number of pixels in the beam, and enforce the maximum countrate per pixel (idmax) 
    2410 // TODO_10m: verify 
    24112392Function attenuatorTransmission() 
    24122393 
Note: See TracChangeset for help on using the changeset viewer.