Changeset 899 for sans/Dev/trunk/NCNR_User_Procedures/Reduction/SANS
- Timestamp:
- Feb 13, 2013 12:22:29 PM (10 years ago)
- Location:
- sans/Dev/trunk/NCNR_User_Procedures/Reduction/SANS
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
sans/Dev/trunk/NCNR_User_Procedures/Reduction/SANS/MC_SimulationScripting.ipf
r898 r899 105 105 // -- scattering from an empty cell is NOT provided in 2D 106 106 107 Menu "Macros"107 xMenu "Macros" 108 108 Submenu "Simulation Scripting - Beta" 109 109 "Save Configuration",Sim_saveConfProc() … … 491 491 // NVAR DeadtimeNG5_ILL = root:myGlobals:DeadtimeNG5_ILL 492 492 // NVAR DeadtimeNG7_ILL = root:myGlobals:DeadtimeNG7_ILL 493 // NVAR DeadtimeNG A_ILL = root:myGlobals:DeadtimeNGA_ILL493 // NVAR DeadtimeNGB_ILL = root:myGlobals:DeadtimeNGB_ILL 494 494 NVAR DeadtimeNG3_ORNL_VAX = root:myGlobals:DeadtimeNG3_ORNL_VAX 495 495 // NVAR DeadtimeNG3_ORNL_ICE = root:myGlobals:DeadtimeNG3_ORNL_ICE … … 497 497 NVAR DeadtimeNG7_ORNL_VAX = root:myGlobals:DeadtimeNG7_ORNL_VAX 498 498 // NVAR DeadtimeNG7_ORNL_ICE = root:myGlobals:DeadtimeNG7_ORNL_ICE 499 NVAR DeadtimeNG A_ORNL_ICE = root:myGlobals:DeadtimeNGA_ORNL_ICE499 NVAR DeadtimeNGB_ORNL_ICE = root:myGlobals:DeadtimeNGB_ORNL_ICE 500 500 NVAR DeadtimeDefault = root:myGlobals:DeadtimeDefault 501 501 502 502 DeadtimeNG3_ORNL_VAX = 1e-15 503 503 DeadtimeNG7_ORNL_VAX = 1e-15 504 DeadtimeNG A_ORNL_ICE = 1e-15504 DeadtimeNGB_ORNL_ICE = 1e-15 505 505 DeadtimeDefault = 1e-15 506 506 … … 555 555 End 556 556 557 // instrName = "checkNG3" or "checkNG7" or "checkNG A"557 // instrName = "checkNG3" or "checkNG7" or "checkNGB" 558 558 // these are the only allowable choices 559 559 Function Sim_SetInstrument(instrName) -
sans/Dev/trunk/NCNR_User_Procedures/Reduction/SANS/NCNR_Utils.ipf
r890 r899 25 25 26 26 // 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 28 28 Variable/G root:myGlobals:PixelResNG3_ILL = 1.0 //pixel resolution in cm 29 29 Variable/G root:myGlobals:PixelResNG5_ILL = 1.0 … … 32 32 Variable/G root:myGlobals:PixelResNG5_ORNL = 0.5 33 33 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 35 36 36 37 Variable/G root:myGlobals:PixelResDefault = 0.5 … … 39 40 Variable/G root:myGlobals:DeadtimeNG5_ILL = 3.0e-6 40 41 Variable/G root:myGlobals:DeadtimeNG7_ILL = 3.0e-6 41 Variable/G root:myGlobals:DeadtimeNG A_ILL = 4.0e-6 // fictional42 Variable/G root:myGlobals:DeadtimeNGB_ILL = 4.0e-6 // fictional 42 43 Variable/G root:myGlobals:DeadtimeNG3_ORNL_VAX = 3.4e-6 //pre - 23-JUL-2009 used VAX 43 44 Variable/G root:myGlobals:DeadtimeNG3_ORNL_ICE = 1.5e-6 //post - 23-JUL-2009 used ICE … … 45 46 Variable/G root:myGlobals:DeadtimeNG7_ORNL_VAX = 3.4e-6 //pre 25-FEB-2010 used VAX 46 47 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 48 52 Variable/G root:myGlobals:DeadtimeDefault = 3.4e-6 49 53 50 54 //new 11APR07 51 55 Variable/G root:myGlobals:BeamstopXTol = -8 // (cm) is BS Xpos is -5 cm or less, it's a trans measurement … … 413 417 NVAR PixelResNG5_ILL = root:myGlobals:PixelResNG5_ILL 414 418 NVAR PixelResNG7_ILL = root:myGlobals:PixelResNG7_ILL 415 NVAR PixelResNG A_ILL = root:myGlobals:PixelResNGA_ILL419 NVAR PixelResNGB_ILL = root:myGlobals:PixelResNGB_ILL 416 420 NVAR PixelResNG3_ORNL = root:myGlobals:PixelResNG3_ORNL 417 421 NVAR PixelResNG5_ORNL = root:myGlobals:PixelResNG5_ORNL 418 422 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 420 425 NVAR PixelResDefault = root:myGlobals:PixelResDefault 421 426 422 427 strswitch(instr) 428 case "CGB": 423 429 case "NG3": 424 430 if(cmpstr(detStr, "ILL ") == 0 ) … … 443 449 break 444 450 case "NGA": 451 case "NGB": 445 452 if(cmpstr(detStr, "ILL ") == 0 ) 446 DDet= PixelResNG A_ILL453 DDet= PixelResNGB_ILL 447 454 else 448 DDet = PixelResNG A_ORNL //detector is ordella-type455 DDet = PixelResNGB_ORNL //detector is ordella-type 449 456 endif 450 457 break … … 474 481 // NG3 DECEMBER 2009 1.5 microseconds 475 482 // NG7 APRIL2010 2.3 microseconds 476 // NG AJAN 2013 4 microseconds483 // NGB JAN 2013 4 microseconds 477 484 // 478 485 // … … 493 500 NVAR DeadtimeNG5_ILL = root:myGlobals:DeadtimeNG5_ILL 494 501 NVAR DeadtimeNG7_ILL = root:myGlobals:DeadtimeNG7_ILL 495 NVAR DeadtimeNG A_ILL = root:myGlobals:DeadtimeNGA_ILL502 NVAR DeadtimeNGB_ILL = root:myGlobals:DeadtimeNGB_ILL 496 503 NVAR DeadtimeNG3_ORNL_VAX = root:myGlobals:DeadtimeNG3_ORNL_VAX 497 504 NVAR DeadtimeNG3_ORNL_ICE = root:myGlobals:DeadtimeNG3_ORNL_ICE 505 // NVAR DeadtimeCGB_ORNL_ICE = root:myGlobals:DeadtimeCGB_ORNL_ICE 498 506 NVAR DeadtimeNG5_ORNL = root:myGlobals:DeadtimeNG5_ORNL 499 507 NVAR DeadtimeNG7_ORNL_VAX = root:myGlobals:DeadtimeNG7_ORNL_VAX 500 508 NVAR DeadtimeNG7_ORNL_ICE = root:myGlobals:DeadtimeNG7_ORNL_ICE 501 NVAR DeadtimeNG A_ORNL_ICE = root:myGlobals:DeadtimeNGA_ORNL_ICE509 NVAR DeadtimeNGB_ORNL_ICE = root:myGlobals:DeadtimeNGB_ORNL_ICE 502 510 NVAR DeadtimeDefault = root:myGlobals:DeadtimeDefault 503 511 … … 514 522 515 523 strswitch(instr) 524 case "CGB": 516 525 case "NG3": 517 526 if(cmpstr(detStr, "ILL ") == 0 ) … … 544 553 break 545 554 case "NGA": 555 case "NGB": 546 556 if(cmpstr(detStr, "ILL ") == 0 ) 547 deadtime= DeadtimeNG A_ILL557 deadtime= DeadtimeNGB_ILL 548 558 else 549 deadtime = DeadtimeNG A_ORNL_ICE //detector is ordella-type, using ICE hardware559 deadtime = DeadtimeNGB_ORNL_ICE //detector is ordella-type, using ICE hardware 550 560 endif 551 Print "Using fictional values for NGAdead time"561 // Print "Using fictional values for NGB dead time" 552 562 break 553 563 default: … … 1521 1531 // JAN 2013 -- Using John's measured values from 23 JAN 2013 1522 1532 // 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) 1524 1534 // there are only 9 attenuators, not 10 as in the 30m 1525 1535 // 1526 Proc MakeNG AAttenTable()1536 Proc MakeNGBAttenTable() 1527 1537 1528 1538 NewDataFolder/O root:myGlobals:Attenuators … … 1530 1540 Variable num=13 //13 needed for tables to cover 3A - 30A 1531 1541 1532 Make/O/N=(num) root:myGlobals:Attenuators: ngAatt01533 Make/O/N=(num) root:myGlobals:Attenuators: ngAatt11534 Make/O/N=(num) root:myGlobals:Attenuators: ngAatt21535 Make/O/N=(num) root:myGlobals:Attenuators: ngAatt31536 Make/O/N=(num) root:myGlobals:Attenuators: ngAatt41537 Make/O/N=(num) root:myGlobals:Attenuators: ngAatt51538 Make/O/N=(num) root:myGlobals:Attenuators: ngAatt61539 Make/O/N=(num) root:myGlobals:Attenuators: ngAatt71540 Make/O/N=(num) root:myGlobals:Attenuators: ngAatt81541 Make/O/N=(num) root:myGlobals:Attenuators: ngAatt91542 // Make/O/N=(num) root:myGlobals:Attenuators: ngAatt101542 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 1543 1553 1544 1554 // and a wave for the errors at each attenuation factor 1545 Make/O/N=(num) root:myGlobals:Attenuators: ngAatt0_err1546 Make/O/N=(num) root:myGlobals:Attenuators: ngAatt1_err1547 Make/O/N=(num) root:myGlobals:Attenuators: ngAatt2_err1548 Make/O/N=(num) root:myGlobals:Attenuators: ngAatt3_err1549 Make/O/N=(num) root:myGlobals:Attenuators: ngAatt4_err1550 Make/O/N=(num) root:myGlobals:Attenuators: ngAatt5_err1551 Make/O/N=(num) root:myGlobals:Attenuators: ngAatt6_err1552 Make/O/N=(num) root:myGlobals:Attenuators: ngAatt7_err1553 Make/O/N=(num) root:myGlobals:Attenuators: ngAatt8_err1554 Make/O/N=(num) root:myGlobals:Attenuators: ngAatt9_err1555 // Make/O/N=(num) root:myGlobals:Attenuators: ngAatt10_err1556 1557 //NG Awave has 13 elements, the transmission of att# at the wavelengths1555 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 1558 1568 //lambda = 3A to 30A 1559 1569 // note that some of the higher attenuations and ALL of the 30A data is interpolated 1560 1570 // 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} 1562 1572 1563 1573 // 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 = {} 1575 1585 1576 1586 // percent errors as measured, Jan 2013 values 1577 1587 // 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 = {} 1589 1599 1590 1600 End … … 1689 1699 End 1690 1700 1691 //returns the transmission of the attenuator (at NG A) given the attenuator number1701 //returns the transmission of the attenuator (at NGB) given the attenuator number 1692 1702 //which must be an integer(to select the wave) and given the wavelength. 1693 1703 //the wavelength may be any value between 3 and 30 (A), and is interpolated … … 1698 1708 // Mar 2010 - abs() added to attStr to account for ICE reporting -0.0001 as an attenuator position, which truncates to "-0" 1699 1709 // 1700 // JAN 2013 -- now correct, NG Atable has been added, allowing for 3A to 30A1701 // 1702 Function LookupAttenNG A(lambda,attenNo,atten_err)1710 // JAN 2013 -- now correct, NGB table has been added, allowing for 3A to 30A 1711 // 1712 Function LookupAttenNGB(lambda,attenNo,atten_err) 1703 1713 Variable lambda, attenNo, &atten_err 1704 1714 1705 1715 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" 1709 1719 1710 1720 if(attenNo == 0) … … 1717 1727 1718 1728 if(!(WaveExists($attStr)) || !(WaveExists($lamStr)) || !(WaveExists($attErrWStr))) 1719 Execute "MakeNG AAttenTable()"1729 Execute "MakeNGBAttenTable()" 1720 1730 Endif 1721 1731 //just in case creating the tables fails.... … … 1752 1762 1753 1763 strswitch(instr) 1764 case "CGB": 1754 1765 case "NG3": 1755 1766 attenFactor = LookupAttenNG3(lam,attenNo,atten_err) … … 1763 1774 break 1764 1775 case "NGA": 1765 attenFactor = LookupAttenNGA(lam,attenNo,atten_err) 1776 case "NGB": 1777 attenFactor = LookupAttenNGB(lam,attenNo,atten_err) 1766 1778 break 1767 1779 default: … … 1803 1815 1804 1816 strswitch(instr) 1817 case "CGB": 1805 1818 case "NG3": 1806 1819 attenFactor = LookupAttenNG3(lam,attenNo,atten_err) … … 1814 1827 break 1815 1828 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) 1818 1832 break 1819 1833 default: -
sans/Dev/trunk/NCNR_User_Procedures/Reduction/SANS/ProDiv.ipf
r895 r899 575 575 // of solid angle problems when generating a DIV file. 576 576 // 577 // TODO_10m: extra-wide tolerance for NG A= 10m SANS. Once "normal" beam centers are settled, then the tolerance can be adjusted here577 // TODO_10m: extra-wide tolerance for NGB = 10m SANS. Once "normal" beam centers are settled, then the tolerance can be adjusted here 578 578 Function CheckDIVBeamCenter(str,xc,yc) 579 579 String str … … 594 594 acct = getAcctName(fileStr) 595 595 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 ) 597 597 tol=20 //if the 10m SANS, give an extra-wide tolerance, and show an alert 598 DoAlert 0,"NG ASANS 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." 599 599 endif 600 600 -
sans/Dev/trunk/NCNR_User_Procedures/Reduction/SANS/SASCALC.ipf
r891 r899 115 115 // for the panel 116 116 // Variable/G root:Packages:NIST:SAS:gInst=3 //or 7 for NG7 117 String/G root:Packages:NIST:SAS:gInstStr="NG3" //or "NG7" or "NG A"=10m or "NGB"=NG3 moved117 String/G root:Packages:NIST:SAS:gInstStr="NG3" //or "NG7" or "NGB"=10m or "CGB"=NG3 moved 118 118 Variable/G root:Packages:NIST:SAS:gNg=0 119 119 Variable/G root:Packages:NIST:SAS:gTable=2 //2=chamber, 1=table … … 177 177 Make/O/D/N=5 root:Packages:NIST:SAS:tickSDDNG3,root:Packages:NIST:SAS:tickSDDNG7 178 178 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:tickSDDNG A180 Make/O/T/N=5 root:Packages:NIST:SAS:lblSDDNG A179 Make/O/D/N=5 root:Packages:NIST:SAS:tickSDDNGB 180 Make/O/T/N=5 root:Packages:NIST:SAS:lblSDDNGB 181 181 root:Packages:NIST:SAS:tickSDDNG3 = {133,400,700,1000,1317} 182 182 root:Packages:NIST:SAS:lblSDDNG3 = {"133","400","700","1000","1317"} 183 183 root:Packages:NIST:SAS:tickSDDNG7 = {100,450,800,1150,1530} 184 184 root:Packages:NIST:SAS:lblSDDNG7 = {"100","450","800","1150","1530"} 185 root:Packages:NIST:SAS:tickSDDNG A= {106,200,300,400,525}186 root:Packages:NIST:SAS:lblSDDNG A= {"106","200","300","400","525"}187 // root:Packages:NIST:SAS:tickSDDNG A= {106,200,300,400,500,525}188 // root:Packages:NIST:SAS:lblSDDNG A= {"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"} 189 189 190 190 //for the fake dependency … … 336 336 337 337 /// this is the (incomplete) definition of the 10m SANS instrument 338 // on NG-B, which will be referred to as NG Ahere to keep the NG(number) notation338 // on NG-B, which will be referred to as NGB here to keep the NG(number) notation 339 339 // reserving NGB for the moved NG3 instrument 340 340 // which may be simpler here to keep functions from breaking... … … 342 342 // Updated 24 JAN 2013 with current flux numbers from John 343 343 // 344 Function initNG A()344 Function initNGB() 345 345 346 346 SetDataFolder root:Packages:NIST:SAS 347 347 348 String/G gSelectedInstrument="checkNG A"349 String/G gInstStr = "NG A"348 String/G gSelectedInstrument="checkNGB" 349 String/G gInstStr = "NGB" 350 350 351 351 Variable/G s12 = 0 //** no difference between sample and huber position … … 527 527 // -- hide/unhide the 10m SANS 528 528 if(show10mSANS) 529 CheckBox checkNG A,pos={110,19},size={40,14},proc=SelectInstrumentCheckProc,title="NGA"530 CheckBox checkNG A,value=0,mode=1529 CheckBox checkNGB,pos={110,19},size={40,14},proc=SelectInstrumentCheckProc,title="NGB" 530 CheckBox checkNGB,value=0,mode=1 531 531 endif 532 532 // … … 695 695 break 696 696 697 case "NG A": // 10m SANS697 case "NGB": // 10m SANS 698 698 if(ng>2) 699 699 ng=2 … … 713 713 dlStr = "0.10;0.132;0.154;0.25;" 714 714 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:tickSDDNG A,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 } 716 716 SetVariable setvar0,win=SASCALC,limits={106,525,1} 717 717 … … 830 830 checkBox checkNG3,win=SASCALC, value=1 831 831 checkBox checkNG7,win=SASCALC, value=0 832 checkBox checkNG A,win=SASCALC, value=0832 checkBox checkNGB,win=SASCALC, value=0 833 833 initNG3() 834 834 break … … 836 836 checkBox checkNG3,win=SASCALC, value=0 837 837 checkBox checkNG7,win=SASCALC, value=1 838 checkBox checkNG A,win=SASCALC, value=0838 checkBox checkNGB,win=SASCALC, value=0 839 839 initNG7() 840 840 break 841 case "checkNG A": // 10m SANS841 case "checkNGB": // 10m SANS 842 842 checkBox checkNG3,win=SASCALC, value=0 843 843 checkBox checkNG7,win=SASCALC, value=0 844 checkBox checkNG A,win=SASCALC, value=1845 initNG A()844 checkBox checkNGB,win=SASCALC, value=1 845 initNGB() 846 846 break 847 847 default: // optional default expression executed … … 957 957 958 958 break 959 case "NG A":959 case "NGB": 960 960 // 10m SANS - force no lenses for now 961 961 // TODO: -- put in CORRECT VALUES -- THESE ARE FICTIONAL … … 1005 1005 1006 1006 // right now, if 10m instrument, no lenses allowed 1007 if(cmpstr(selInstr,"NG A") == 0)1007 if(cmpstr(selInstr,"NGB") == 0) 1008 1008 lensNotAllowed=1 1009 1009 endif … … 2062 2062 SVAR selInstr = root:Packages:NIST:SAS:gInstStr 2063 2063 2064 Variable NG A_gap = 61.9 // extra distance between a1 and beginning of guide 1 on NGA2064 Variable NGB_gap = 61.9 // extra distance between a1 and beginning of guide 1 on NGB 2065 2065 2066 2066 strswitch(selInstr) // string switch … … 2070 2070 SSD = 1632 - 155*NG - s12*(2-tableposition()) - L2Diff 2071 2071 break 2072 case "NG A":2072 case "NGB": 2073 2073 // 10m SANS handled differently 2074 2074 // s12 == 0 by definition … … 2077 2077 SSD = 513 - L2diff 2078 2078 else 2079 SSD = 513 - NG A_gap - 150*NG - s12*(2-tableposition()) - L2Diff2079 SSD = 513 - NGB_gap - 150*NG - s12*(2-tableposition()) - L2Diff 2080 2080 endif 2081 2081 break … … 2103 2103 SVAR selInstr = root:Packages:NIST:SAS:gInstStr 2104 2104 2105 Variable NG A_gap = 61.9 // extra distance between a1 and beginning of guide 1 on NGA2105 Variable NGB_gap = 61.9 // extra distance between a1 and beginning of guide 1 on NGB 2106 2106 2107 2107 strswitch(selInstr) // string switch … … 2113 2113 2114 2114 break 2115 case "NG A":2115 case "NGB": 2116 2116 // 10m SANS handled differently 2117 2117 // -- 16JAN13 - these are now correct values 2118 Ng = 513 - NG A_gap - SSD*100 -52118 Ng = 513 - NGB_gap - SSD*100 -5 2119 2119 Ng /= 150 2120 2120
Note: See TracChangeset
for help on using the changeset viewer.