Changeset 899


Ignore:
Timestamp:
Feb 13, 2013 12:22:29 PM (9 years ago)
Author:
srkline
Message:

Changed all reference to "NGA" to "NGB" in hte reduction code and in SASCALC. Hopefully I've gotten everything. Most places were in stringswitch where I keyed on all three characters, so NGA dropped down to NGB with the correct result. Put placeholders in for the same behavior for "CGB" which will be the new name for NG3 after it moves, whenever congress allows.

Added Matt's description of the Rescaled Axis panel to the Analysis help file.

Location:
sans/Dev/trunk
Files:
5 edited

Legend:

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

    r898 r899  
    105105// -- scattering from an empty cell is NOT provided in 2D 
    106106 
    107 Menu "Macros" 
     107xMenu "Macros" 
    108108        Submenu "Simulation Scripting - Beta" 
    109109                "Save Configuration",Sim_saveConfProc() 
     
    491491//      NVAR DeadtimeNG5_ILL = root:myGlobals:DeadtimeNG5_ILL 
    492492//      NVAR DeadtimeNG7_ILL = root:myGlobals:DeadtimeNG7_ILL 
    493 //      NVAR DeadtimeNGA_ILL = root:myGlobals:DeadtimeNGA_ILL 
     493//      NVAR DeadtimeNGB_ILL = root:myGlobals:DeadtimeNGB_ILL 
    494494        NVAR DeadtimeNG3_ORNL_VAX = root:myGlobals:DeadtimeNG3_ORNL_VAX 
    495495//      NVAR DeadtimeNG3_ORNL_ICE = root:myGlobals:DeadtimeNG3_ORNL_ICE 
     
    497497        NVAR DeadtimeNG7_ORNL_VAX = root:myGlobals:DeadtimeNG7_ORNL_VAX 
    498498//      NVAR DeadtimeNG7_ORNL_ICE = root:myGlobals:DeadtimeNG7_ORNL_ICE 
    499         NVAR DeadtimeNGA_ORNL_ICE = root:myGlobals:DeadtimeNGA_ORNL_ICE 
     499        NVAR DeadtimeNGB_ORNL_ICE = root:myGlobals:DeadtimeNGB_ORNL_ICE 
    500500        NVAR DeadtimeDefault = root:myGlobals:DeadtimeDefault 
    501501 
    502502        DeadtimeNG3_ORNL_VAX = 1e-15 
    503503        DeadtimeNG7_ORNL_VAX = 1e-15 
    504         DeadtimeNGA_ORNL_ICE = 1e-15 
     504        DeadtimeNGB_ORNL_ICE = 1e-15 
    505505        DeadtimeDefault = 1e-15 
    506506         
     
    555555End 
    556556 
    557 // instrName = "checkNG3" or "checkNG7" or "checkNGA" 
     557// instrName = "checkNG3" or "checkNG7" or "checkNGB" 
    558558// these are the only allowable choices 
    559559Function Sim_SetInstrument(instrName) 
  • sans/Dev/trunk/NCNR_User_Procedures/Reduction/SANS/NCNR_Utils.ipf

    r890 r899  
    2525         
    2626        // as of Jan2008, detector pixel sizes are read directly from the file header, so they MUST 
    27         // be set correctly in instr.cfg 
     27        // be set correctly in instr.cfg - these values are not used, but declared to avoid errors 
    2828        Variable/G root:myGlobals:PixelResNG3_ILL = 1.0         //pixel resolution in cm 
    2929        Variable/G root:myGlobals:PixelResNG5_ILL = 1.0 
     
    3232        Variable/G root:myGlobals:PixelResNG5_ORNL = 0.5 
    3333        Variable/G root:myGlobals:PixelResNG7_ORNL = 0.5 
    34 //      Variable/G root:myGlobals:PixelResNGA_ORNL = 0.5 
     34        Variable/G root:myGlobals:PixelResNGB_ORNL = 0.5 
     35//      Variable/G root:myGlobals:PixelResCGB_ORNL = 0.5                // fiction 
    3536 
    3637        Variable/G root:myGlobals:PixelResDefault = 0.5 
     
    3940        Variable/G root:myGlobals:DeadtimeNG5_ILL = 3.0e-6 
    4041        Variable/G root:myGlobals:DeadtimeNG7_ILL = 3.0e-6 
    41         Variable/G root:myGlobals:DeadtimeNGA_ILL = 4.0e-6              // fictional 
     42        Variable/G root:myGlobals:DeadtimeNGB_ILL = 4.0e-6              // fictional 
    4243        Variable/G root:myGlobals:DeadtimeNG3_ORNL_VAX = 3.4e-6         //pre - 23-JUL-2009 used VAX 
    4344        Variable/G root:myGlobals:DeadtimeNG3_ORNL_ICE = 1.5e-6         //post - 23-JUL-2009 used ICE 
     
    4546        Variable/G root:myGlobals:DeadtimeNG7_ORNL_VAX = 3.4e-6         //pre 25-FEB-2010 used VAX 
    4647        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-2013 
     48        Variable/G root:myGlobals:DeadtimeNGB_ORNL_ICE = 4.0e-6         //per JGB 16-JAN-2013, best value we have for the oscillating data 
     49 
     50//      Variable/G root:myGlobals:DeadtimeCGB_ORNL_ICE = 1.5e-6         // fiction 
     51 
    4852        Variable/G root:myGlobals:DeadtimeDefault = 3.4e-6 
    49          
     53 
    5054        //new 11APR07 
    5155        Variable/G root:myGlobals:BeamstopXTol = -8                     // (cm) is BS Xpos is -5 cm or less, it's a trans measurement 
     
    413417        NVAR PixelResNG5_ILL = root:myGlobals:PixelResNG5_ILL 
    414418        NVAR PixelResNG7_ILL = root:myGlobals:PixelResNG7_ILL 
    415         NVAR PixelResNGA_ILL = root:myGlobals:PixelResNGA_ILL 
     419        NVAR PixelResNGB_ILL = root:myGlobals:PixelResNGB_ILL 
    416420        NVAR PixelResNG3_ORNL = root:myGlobals:PixelResNG3_ORNL 
    417421        NVAR PixelResNG5_ORNL = root:myGlobals:PixelResNG5_ORNL 
    418422        NVAR PixelResNG7_ORNL = root:myGlobals:PixelResNG7_ORNL 
    419         NVAR PixelResNGA_ORNL = root:myGlobals:PixelResNGA_ORNL 
     423        NVAR PixelResNGB_ORNL = root:myGlobals:PixelResNGB_ORNL 
     424//      NVAR PixelResCGB_ORNL = root:myGlobals:PixelResCGB_ORNL 
    420425        NVAR PixelResDefault = root:myGlobals:PixelResDefault 
    421426         
    422427        strswitch(instr) 
     428                case "CGB": 
    423429                case "NG3": 
    424430                        if(cmpstr(detStr, "ILL   ") == 0 ) 
     
    443449                        break 
    444450                case "NGA": 
     451                case "NGB": 
    445452                        if(cmpstr(detStr, "ILL   ") == 0 ) 
    446                                 DDet= PixelResNGA_ILL 
     453                                DDet= PixelResNGB_ILL 
    447454                        else 
    448                                 DDet = PixelResNGA_ORNL //detector is ordella-type 
     455                                DDet = PixelResNGB_ORNL //detector is ordella-type 
    449456                        endif 
    450457                        break 
     
    474481//      NG3                                                     DECEMBER 2009                           1.5 microseconds 
    475482//      NG7                                                     APRIL2010                                       2.3 microseconds 
    476 //      NGA                                                     JAN 2013                                        4 microseconds 
     483//      NGB                                                     JAN 2013                                        4 microseconds 
    477484// 
    478485// 
     
    493500        NVAR DeadtimeNG5_ILL = root:myGlobals:DeadtimeNG5_ILL 
    494501        NVAR DeadtimeNG7_ILL = root:myGlobals:DeadtimeNG7_ILL 
    495         NVAR DeadtimeNGA_ILL = root:myGlobals:DeadtimeNGA_ILL 
     502        NVAR DeadtimeNGB_ILL = root:myGlobals:DeadtimeNGB_ILL 
    496503        NVAR DeadtimeNG3_ORNL_VAX = root:myGlobals:DeadtimeNG3_ORNL_VAX 
    497504        NVAR DeadtimeNG3_ORNL_ICE = root:myGlobals:DeadtimeNG3_ORNL_ICE 
     505//      NVAR DeadtimeCGB_ORNL_ICE = root:myGlobals:DeadtimeCGB_ORNL_ICE 
    498506        NVAR DeadtimeNG5_ORNL = root:myGlobals:DeadtimeNG5_ORNL 
    499507        NVAR DeadtimeNG7_ORNL_VAX = root:myGlobals:DeadtimeNG7_ORNL_VAX 
    500508        NVAR DeadtimeNG7_ORNL_ICE = root:myGlobals:DeadtimeNG7_ORNL_ICE 
    501         NVAR DeadtimeNGA_ORNL_ICE = root:myGlobals:DeadtimeNGA_ORNL_ICE 
     509        NVAR DeadtimeNGB_ORNL_ICE = root:myGlobals:DeadtimeNGB_ORNL_ICE 
    502510        NVAR DeadtimeDefault = root:myGlobals:DeadtimeDefault 
    503511         
     
    514522         
    515523        strswitch(instr) 
     524                case "CGB": 
    516525                case "NG3": 
    517526                        if(cmpstr(detStr, "ILL   ") == 0 ) 
     
    544553                        break 
    545554                case "NGA": 
     555                case "NGB": 
    546556                        if(cmpstr(detStr, "ILL   ") == 0 ) 
    547                                 deadtime= DeadtimeNGA_ILL 
     557                                deadtime= DeadtimeNGB_ILL 
    548558                        else 
    549                                 deadtime = DeadtimeNGA_ORNL_ICE //detector is ordella-type, using ICE hardware 
     559                                deadtime = DeadtimeNGB_ORNL_ICE //detector is ordella-type, using ICE hardware 
    550560                        endif 
    551                         Print "Using fictional values for NGA dead time" 
     561//                      Print "Using fictional values for NGB dead time" 
    552562                        break 
    553563                default:                                                         
     
    15211531// JAN 2013 -- Using John's measured values from 23 JAN 2013 
    15221532// 
    1523 // there are 13 discrete wavelengths in ngALambda = 13 (only 10 used for 30m) 
     1533// there are 13 discrete wavelengths in NGBLambda = 13 (only 10 used for 30m) 
    15241534// there are only 9 attenuators, not 10 as in the 30m 
    15251535// 
    1526 Proc MakeNGAAttenTable() 
     1536Proc MakeNGBAttenTable() 
    15271537 
    15281538        NewDataFolder/O root:myGlobals:Attenuators 
     
    15301540        Variable num=13         //13 needed for tables to cover 3A - 30A 
    15311541         
    1532         Make/O/N=(num) root:myGlobals:Attenuators:ngAatt0 
    1533         Make/O/N=(num) root:myGlobals:Attenuators:ngAatt1 
    1534         Make/O/N=(num) root:myGlobals:Attenuators:ngAatt2 
    1535         Make/O/N=(num) root:myGlobals:Attenuators:ngAatt3 
    1536         Make/O/N=(num) root:myGlobals:Attenuators:ngAatt4 
    1537         Make/O/N=(num) root:myGlobals:Attenuators:ngAatt5 
    1538         Make/O/N=(num) root:myGlobals:Attenuators:ngAatt6 
    1539         Make/O/N=(num) root:myGlobals:Attenuators:ngAatt7 
    1540         Make/O/N=(num) root:myGlobals:Attenuators:ngAatt8 
    1541         Make/O/N=(num) root:myGlobals:Attenuators:ngAatt9 
    1542 //      Make/O/N=(num) root:myGlobals:Attenuators:ngAatt10 
     1542        Make/O/N=(num) root:myGlobals:Attenuators:NGBatt0 
     1543        Make/O/N=(num) root:myGlobals:Attenuators:NGBatt1 
     1544        Make/O/N=(num) root:myGlobals:Attenuators:NGBatt2 
     1545        Make/O/N=(num) root:myGlobals:Attenuators:NGBatt3 
     1546        Make/O/N=(num) root:myGlobals:Attenuators:NGBatt4 
     1547        Make/O/N=(num) root:myGlobals:Attenuators:NGBatt5 
     1548        Make/O/N=(num) root:myGlobals:Attenuators:NGBatt6 
     1549        Make/O/N=(num) root:myGlobals:Attenuators:NGBatt7 
     1550        Make/O/N=(num) root:myGlobals:Attenuators:NGBatt8 
     1551        Make/O/N=(num) root:myGlobals:Attenuators:NGBatt9 
     1552//      Make/O/N=(num) root:myGlobals:Attenuators:NGBatt10 
    15431553         
    15441554        // and a wave for the errors at each attenuation factor 
    1545         Make/O/N=(num) root:myGlobals:Attenuators:ngAatt0_err 
    1546         Make/O/N=(num) root:myGlobals:Attenuators:ngAatt1_err 
    1547         Make/O/N=(num) root:myGlobals:Attenuators:ngAatt2_err 
    1548         Make/O/N=(num) root:myGlobals:Attenuators:ngAatt3_err 
    1549         Make/O/N=(num) root:myGlobals:Attenuators:ngAatt4_err 
    1550         Make/O/N=(num) root:myGlobals:Attenuators:ngAatt5_err 
    1551         Make/O/N=(num) root:myGlobals:Attenuators:ngAatt6_err 
    1552         Make/O/N=(num) root:myGlobals:Attenuators:ngAatt7_err 
    1553         Make/O/N=(num) root:myGlobals:Attenuators:ngAatt8_err 
    1554         Make/O/N=(num) root:myGlobals:Attenuators:ngAatt9_err 
    1555 //      Make/O/N=(num) root:myGlobals:Attenuators:ngAatt10_err   
    1556          
    1557         //NGA wave has 13 elements, the transmission of att# at the wavelengths  
     1555        Make/O/N=(num) root:myGlobals:Attenuators:NGBatt0_err 
     1556        Make/O/N=(num) root:myGlobals:Attenuators:NGBatt1_err 
     1557        Make/O/N=(num) root:myGlobals:Attenuators:NGBatt2_err 
     1558        Make/O/N=(num) root:myGlobals:Attenuators:NGBatt3_err 
     1559        Make/O/N=(num) root:myGlobals:Attenuators:NGBatt4_err 
     1560        Make/O/N=(num) root:myGlobals:Attenuators:NGBatt5_err 
     1561        Make/O/N=(num) root:myGlobals:Attenuators:NGBatt6_err 
     1562        Make/O/N=(num) root:myGlobals:Attenuators:NGBatt7_err 
     1563        Make/O/N=(num) root:myGlobals:Attenuators:NGBatt8_err 
     1564        Make/O/N=(num) root:myGlobals:Attenuators:NGBatt9_err 
     1565//      Make/O/N=(num) root:myGlobals:Attenuators:NGBatt10_err   
     1566         
     1567        //NGB wave has 13 elements, the transmission of att# at the wavelengths  
    15581568        //lambda = 3A to 30A 
    15591569        // note that some of the higher attenuations and ALL of the 30A data is interpolated 
    15601570        // none of these values are expected to be used in reality since the flux would be too low in practice 
    1561         Make/O/N=(num) root:myGlobals:Attenuators:ngAlambda={3,4,5,6,7,8,10,12,14,17,20,25,30} 
     1571        Make/O/N=(num) root:myGlobals:Attenuators:NGBlambda={3,4,5,6,7,8,10,12,14,17,20,25,30} 
    15621572 
    15631573// 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 = {} 
     1574        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 = {} 
    15751585 
    15761586  // percent errors as measured, Jan 2013 values 
    15771587  // 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 = {}   
     1588        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 = {}   
    15891599   
    15901600End 
     
    16891699End 
    16901700 
    1691 //returns the transmission of the attenuator (at NGA) given the attenuator number 
     1701//returns the transmission of the attenuator (at NGB) given the attenuator number 
    16921702//which must be an integer(to select the wave) and given the wavelength. 
    16931703//the wavelength may be any value between 3 and 30 (A), and is interpolated 
     
    16981708// Mar 2010 - abs() added to attStr to account for ICE reporting -0.0001 as an attenuator position, which truncates to "-0" 
    16991709// 
    1700 // JAN 2013 -- now correct, NGA table has been added, allowing for 3A to 30A 
    1701 // 
    1702 Function LookupAttenNGA(lambda,attenNo,atten_err) 
     1710// JAN 2013 -- now correct, NGB table has been added, allowing for 3A to 30A 
     1711// 
     1712Function LookupAttenNGB(lambda,attenNo,atten_err) 
    17031713        Variable lambda, attenNo, &atten_err 
    17041714         
    17051715        Variable trans 
    1706         String attStr="root:myGlobals:Attenuators:ngAatt"+num2str(trunc(abs(attenNo))) 
    1707         String attErrWStr="root:myGlobals:Attenuators:ngAatt"+num2str(trunc(abs(attenNo)))+"_err" 
    1708         String lamStr = "root:myGlobals:Attenuators:ngAlambda" 
     1716        String attStr="root:myGlobals:Attenuators:NGBatt"+num2str(trunc(abs(attenNo))) 
     1717        String attErrWStr="root:myGlobals:Attenuators:NGBatt"+num2str(trunc(abs(attenNo)))+"_err" 
     1718        String lamStr = "root:myGlobals:Attenuators:NGBlambda" 
    17091719         
    17101720        if(attenNo == 0) 
     
    17171727         
    17181728        if(!(WaveExists($attStr)) || !(WaveExists($lamStr)) || !(WaveExists($attErrWStr))) 
    1719                 Execute "MakeNGAAttenTable()" 
     1729                Execute "MakeNGBAttenTable()" 
    17201730        Endif 
    17211731        //just in case creating the tables fails.... 
     
    17521762         
    17531763        strswitch(instr) 
     1764                case "CGB": 
    17541765                case "NG3": 
    17551766                        attenFactor = LookupAttenNG3(lam,attenNo,atten_err) 
     
    17631774                        break 
    17641775                case "NGA": 
    1765                         attenFactor = LookupAttenNGA(lam,attenNo,atten_err) 
     1776                case "NGB": 
     1777                        attenFactor = LookupAttenNGB(lam,attenNo,atten_err) 
    17661778                        break 
    17671779                default:                                                         
     
    18031815         
    18041816        strswitch(instr) 
     1817                case "CGB": 
    18051818                case "NG3": 
    18061819                        attenFactor = LookupAttenNG3(lam,attenNo,atten_err) 
     
    18141827                        break 
    18151828                case "NGA": 
    1816 //                      Print "Using the NG7 table for NGA *** this needs to be updated ***" 
    1817                         attenFactor = LookupAttenNGA(lam,attenNo,atten_err) 
     1829                case "NGB": 
     1830//                      Print "Using the NG7 table for NGB *** this needs to be updated ***" 
     1831                        attenFactor = LookupAttenNGB(lam,attenNo,atten_err) 
    18181832                        break 
    18191833                default:                                                         
  • sans/Dev/trunk/NCNR_User_Procedures/Reduction/SANS/ProDiv.ipf

    r895 r899  
    575575// of solid angle problems when generating a DIV file. 
    576576// 
    577 // TODO_10m: extra-wide tolerance for NGA = 10m SANS. Once "normal" beam centers are settled, then the tolerance can be adjusted here 
     577// TODO_10m: extra-wide tolerance for NGB = 10m SANS. Once "normal" beam centers are settled, then the tolerance can be adjusted here 
    578578Function CheckDIVBeamCenter(str,xc,yc) 
    579579        String str 
     
    594594        acct = getAcctName(fileStr) 
    595595        String instr=acct[1,3]  //filestr is "[NGnSANSn] " or "[NGnSANSnn]" (11 characters total)        
    596         if(cmpstr(instr,"NGA")==0) 
     596        if(cmpstr(instr,"NGA")==0 || cmpstr(instr,"NGB")==0 ) 
    597597                tol=20          //if the 10m SANS, give an extra-wide tolerance, and show an alert 
    598                 DoAlert 0,"NGA SANS instrument. Be sure that the correct beam centers are entered for all of the plex files." 
     598                DoAlert 0,"NGB SANS instrument. Be sure that the correct beam centers are entered for all of the plex files." 
    599599        endif 
    600600         
  • sans/Dev/trunk/NCNR_User_Procedures/Reduction/SANS/SASCALC.ipf

    r891 r899  
    115115        // for the panel 
    116116//      Variable/G root:Packages:NIST:SAS:gInst=3               //or 7 for NG7 
    117         String/G root:Packages:NIST:SAS:gInstStr="NG3"          //or "NG7" or "NGA"=10m or "NGB"=NG3 moved 
     117        String/G root:Packages:NIST:SAS:gInstStr="NG3"          //or "NG7" or "NGB"=10m or "CGB"=NG3 moved 
    118118        Variable/G root:Packages:NIST:SAS:gNg=0 
    119119        Variable/G root:Packages:NIST:SAS:gTable=2              //2=chamber, 1=table 
     
    177177        Make/O/D/N=5 root:Packages:NIST:SAS:tickSDDNG3,root:Packages:NIST:SAS:tickSDDNG7 
    178178        Make/O/T/N=5 root:Packages:NIST:SAS:lblSDDNG3,root:Packages:NIST:SAS:lblSDDNG7 
    179         Make/O/D/N=5 root:Packages:NIST:SAS:tickSDDNGA 
    180         Make/O/T/N=5 root:Packages:NIST:SAS:lblSDDNGA 
     179        Make/O/D/N=5 root:Packages:NIST:SAS:tickSDDNGB 
     180        Make/O/T/N=5 root:Packages:NIST:SAS:lblSDDNGB 
    181181        root:Packages:NIST:SAS:tickSDDNG3 = {133,400,700,1000,1317} 
    182182        root:Packages:NIST:SAS:lblSDDNG3 = {"133","400","700","1000","1317"} 
    183183        root:Packages:NIST:SAS:tickSDDNG7 = {100,450,800,1150,1530} 
    184184        root:Packages:NIST:SAS:lblSDDNG7 = {"100","450","800","1150","1530"} 
    185         root:Packages:NIST:SAS:tickSDDNGA = {106,200,300,400,525} 
    186         root:Packages:NIST:SAS:lblSDDNGA = {"106","200","300","400","525"} 
    187 //      root:Packages:NIST:SAS:tickSDDNGA = {106,200,300,400,500,525} 
    188 //      root:Packages:NIST:SAS:lblSDDNGA = {"106","200","300","400","500","525"} 
     185        root:Packages:NIST:SAS:tickSDDNGB = {106,200,300,400,525} 
     186        root:Packages:NIST:SAS:lblSDDNGB = {"106","200","300","400","525"} 
     187//      root:Packages:NIST:SAS:tickSDDNGB = {106,200,300,400,500,525} 
     188//      root:Packages:NIST:SAS:lblSDDNGB = {"106","200","300","400","500","525"} 
    189189                 
    190190        //for the fake dependency 
     
    336336 
    337337/// this is the (incomplete) definition of the 10m SANS instrument 
    338 // on NG-B, which will be referred to as NGA here to keep the NG(number) notation 
     338// on NG-B, which will be referred to as NGB here to keep the NG(number) notation 
    339339// reserving NGB for the moved NG3 instrument 
    340340// which may be simpler here to keep functions from breaking... 
     
    342342// Updated 24 JAN 2013 with current flux numbers from John 
    343343// 
    344 Function initNGA() 
     344Function initNGB() 
    345345 
    346346        SetDataFolder root:Packages:NIST:SAS 
    347347 
    348         String/G gSelectedInstrument="checkNGA"  
    349         String/G gInstStr = "NGA" 
     348        String/G gSelectedInstrument="checkNGB"  
     349        String/G gInstStr = "NGB" 
    350350 
    351351        Variable/G s12 = 0                      //**            no difference between sample and huber position 
     
    527527//      -- hide/unhide the 10m SANS 
    528528        if(show10mSANS) 
    529                 CheckBox checkNGA,pos={110,19},size={40,14},proc=SelectInstrumentCheckProc,title="NGA" 
    530                 CheckBox checkNGA,value=0,mode=1 
     529                CheckBox checkNGB,pos={110,19},size={40,14},proc=SelectInstrumentCheckProc,title="NGB" 
     530                CheckBox checkNGB,value=0,mode=1 
    531531        endif 
    532532//               
     
    695695                        break 
    696696                         
    697                 case "NGA":             // 10m SANS  
     697                case "NGB":             // 10m SANS  
    698698                        if(ng>2) 
    699699                                ng=2 
     
    713713                        dlStr = "0.10;0.132;0.154;0.25;" 
    714714                        Slider SC_Slider win=SASCALC,limits={0,2,1},ticks=2                     //number of guides different on 10m SANS, 3 ticks 
    715                         Slider SC_Slider_1,win=SASCALC,limits={106,525,1},userTicks={root:Packages:NIST:SAS:tickSDDNGA,root:Packages:NIST:SAS:lblSDDNGA } 
     715                        Slider SC_Slider_1,win=SASCALC,limits={106,525,1},userTicks={root:Packages:NIST:SAS:tickSDDNGB,root:Packages:NIST:SAS:lblSDDNGB } 
    716716                        SetVariable setvar0,win=SASCALC,limits={106,525,1} 
    717717 
     
    830830                        checkBox checkNG3,win=SASCALC, value=1 
    831831                        checkBox checkNG7,win=SASCALC, value=0 
    832                         checkBox checkNGA,win=SASCALC, value=0 
     832                        checkBox checkNGB,win=SASCALC, value=0 
    833833                        initNG3() 
    834834                        break                                            
     
    836836                        checkBox checkNG3,win=SASCALC, value=0 
    837837                        checkBox checkNG7,win=SASCALC, value=1 
    838                         checkBox checkNGA,win=SASCALC, value=0  
     838                        checkBox checkNGB,win=SASCALC, value=0  
    839839                        initNG7() 
    840840                        break 
    841                 case "checkNGA":                // 10m SANS 
     841                case "checkNGB":                // 10m SANS 
    842842                        checkBox checkNG3,win=SASCALC, value=0 
    843843                        checkBox checkNG7,win=SASCALC, value=0  
    844                         checkBox checkNGA,win=SASCALC, value=1 
    845                         initNGA() 
     844                        checkBox checkNGB,win=SASCALC, value=1 
     845                        initNGB() 
    846846                        break 
    847847                default:                                                        // optional default expression executed 
     
    957957                                 
    958958                                break 
    959                         case "NGA": 
     959                        case "NGB": 
    960960                                // 10m SANS - force no lenses for now 
    961961                                // TODO:  -- put in CORRECT VALUES -- THESE ARE FICTIONAL 
     
    10051005 
    10061006        // right now, if 10m instrument, no lenses allowed               
    1007                 if(cmpstr(selInstr,"NGA") == 0) 
     1007                if(cmpstr(selInstr,"NGB") == 0) 
    10081008                        lensNotAllowed=1 
    10091009                endif 
     
    20622062        SVAR selInstr = root:Packages:NIST:SAS:gInstStr 
    20632063 
    2064         Variable NGA_gap = 61.9         // extra distance between a1 and beginning of guide 1 on NGA 
     2064        Variable NGB_gap = 61.9         // extra distance between a1 and beginning of guide 1 on NGB 
    20652065         
    20662066        strswitch(selInstr)     // string switch 
     
    20702070                        SSD = 1632 - 155*NG - s12*(2-tableposition()) - L2Diff 
    20712071                        break 
    2072                 case "NGA": 
     2072                case "NGB": 
    20732073                        // 10m SANS handled differently 
    20742074                        // s12 == 0 by definition 
     
    20772077                                SSD = 513 - L2diff 
    20782078                        else                     
    2079                                 SSD = 513 - NGA_gap - 150*NG - s12*(2-tableposition()) - L2Diff 
     2079                                SSD = 513 - NGB_gap - 150*NG - s12*(2-tableposition()) - L2Diff 
    20802080                        endif 
    20812081                        break 
     
    21032103        SVAR selInstr = root:Packages:NIST:SAS:gInstStr 
    21042104 
    2105         Variable NGA_gap = 61.9         // extra distance between a1 and beginning of guide 1 on NGA 
     2105        Variable NGB_gap = 61.9         // extra distance between a1 and beginning of guide 1 on NGB 
    21062106 
    21072107        strswitch(selInstr)     // string switch 
     
    21132113         
    21142114                        break 
    2115                 case "NGA": 
     2115                case "NGB": 
    21162116                        // 10m SANS handled differently 
    21172117                        // -- 16JAN13 - these are now correct values 
    2118                         Ng = 513 - NGA_gap - SSD*100 -5 
     2118                        Ng = 513 - NGB_gap - SSD*100 -5 
    21192119                        Ng /= 150 
    21202120         
Note: See TracChangeset for help on using the changeset viewer.