- Timestamp:
- Feb 6, 2019 12:25:46 PM (4 years ago)
- Location:
- sans/Dev/trunk
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
sans/Dev/trunk/NCNR_Igor_Procedures/NCNR_Package_Loader.ipf
r1061 r1122 429 429 Execute/P ("DoIgorMenu \"Control\" \"Retrieve All Windows\"") 430 430 431 Execute/P ("Show_Preferences_Panel()") 432 Execute/P ("PrefTabProc(\"PrefTab\", 2)") //show the USANS tab 433 431 434 // change the facility label, disable the others 432 435 gMenuStr3a = "Hide NCNR USANS Reduction Macros" -
sans/Dev/trunk/NCNR_User_Procedures/Common/Packages/PlotManager/PlotUtilsMacro_v40.ipf
r1100 r1122 1428 1428 1429 1429 /// items for USANS Reduction 1430 1430 val = NumVarOrDefault("root:Packages:NIST:gUseNICEDataFormat", 1 ) 1431 Variable/G root:Packages:NIST:gUseNICEDataFormat=val 1431 1432 1432 1433 /// items for everyone … … 1494 1495 gVal = checked 1495 1496 End 1497 1498 Function UseNICEDataFormat(ctrlName,checked) : CheckBoxControl 1499 String ctrlName 1500 Variable checked 1501 1502 NVAR gVal = root:Packages:NIST:gUseNICEDataFormat 1503 gVal = checked 1504 End 1505 1506 1496 1507 1497 1508 Function PrefDoneButtonProc(ctrlName) : ButtonControl … … 1553 1564 1554 1565 //on tab(2) - USANS 1555 GroupBox PrefCtrl_2a pos={21,100},size={1,1},title="nothing to set",fSize=12 1556 1557 GroupBox PrefCtrl_2a,disable=1 1566 // GroupBox PrefCtrl_2a pos={21,100},size={1,1},title="nothing to set",fSize=12 1567 // GroupBox PrefCtrl_2a,disable=1 1568 CheckBox PrefCtrl_2a,pos={21,100},size={171,14},proc=UseNICEDataFormat,title="Read New NICE data format" 1569 CheckBox PrefCtrl_2a,help={"Check this if raw data was collected using NICE. If data was collected using ICP, leave this unchecked."} 1570 CheckBox PrefCtrl_2a,value= root:Packages:NIST:gUseNICEDataFormat 1571 1572 1573 CheckBox PrefCtrl_2a,disable=1 1574 1558 1575 1559 1576 … … 1611 1628 return(0) 1612 1629 End 1630 1631 1632 1633 1634 1613 1635 1614 1636 -
sans/Dev/trunk/NCNR_User_Procedures/Reduction/USANS/BT5_Loader.ipf
r907 r1122 76 76 // print BT5Date2Secs(filedt) 77 77 // print date2secs(2010,11,7) 78 79 // as of Feb 6 2019, USANS is using NICE for data collection rather than ICP 80 // as a consequence, the data file is somewhat different. Specifically, the 81 // order of the detectors in the comma-delimited list is different, with the 82 // 5 main detectors all listed in order, rather than separated. 83 // --- I can either flag on the date, or set a global to switch 84 // I also do not know if there will be any other changes in the data file format 85 86 Variable useNewDataFormat 87 88 // test by date 89 // Variable thisFileSecs,switchSecs 90 // switchSecs = date2secs(2019,2,6) 91 // thisFileSecs = BT5Date2Secs(filedt) // could use BT5DateTime2Secs() to include HR:MIN 92 // if(thisFileSecs >= switchSecs) 93 // useNewDataFormat = 1 94 // else 95 // useNewDataFormat = 0 96 // endif 97 98 // or use the global 99 NVAR gVal = root:Packages:NIST:gUseNICEDataFormat 100 useNewDataFormat = gVal 101 78 102 79 103 USANS_DetectorDeadtime(filedt,MainDeadTime,TransDeadTime) … … 106 130 //valuesRead = V_flag 107 131 //print valuesRead 108 MonCts[numlinesloaded] = v1 //monitor 109 v2 = v2/(1.0-V2*MainDeadTime/countTime) // Deadtime correction 110 v3 = v3/(1.0-V3*MainDeadTime/countTime) // Deadtime correction 111 v5 = v5/(1.0-V5*MainDeadTime/countTime) // Deadtime correction 112 v6 = v6/(1.0-V6*MainDeadTime/countTime) // Deadtime correction 113 v7 = v7/(1.0-V7*MainDeadTime/countTime) // Deadtime correction 114 DetCts[numlinesloaded] = v2 + v3 + v5 + v6 + v7 //5 detectors 115 TransCts[numlinesloaded] = v4/(1.0-V4*TransDeadTime/countTime) //trans detector+deadtime correction 116 ErrDetCts[numlinesloaded] = sqrt(detCts[numlinesloaded]) 117 //values 8-16 are always zero 132 if(useNewDataFormat == 1) 133 // new order is MonCt, det1,det2,det3,det4,det5, Trans 134 MonCts[numlinesloaded] = v1 //monitor 135 v2 = v2/(1.0-v2*MainDeadTime/countTime) // Deadtime correction 136 v3 = v3/(1.0-v3*MainDeadTime/countTime) // Deadtime correction 137 v4 = v6/(1.0-v4*MainDeadTime/countTime) // Deadtime correction 138 v5 = v5/(1.0-v5*MainDeadTime/countTime) // Deadtime correction 139 v6 = v6/(1.0-v6*MainDeadTime/countTime) // Deadtime correction 140 DetCts[numlinesloaded] = v2 + v3 + v4 + v5 + v6 //5 detectors 141 TransCts[numlinesloaded] = v7/(1.0-v7*TransDeadTime/countTime) //trans detector+deadtime correction 142 ErrDetCts[numlinesloaded] = sqrt(detCts[numlinesloaded]) 143 //values 8-16 are always zero 144 else 145 // this is the original format from ICP 146 MonCts[numlinesloaded] = v1 //monitor 147 v2 = v2/(1.0-v2*MainDeadTime/countTime) // Deadtime correction 148 v3 = v3/(1.0-v3*MainDeadTime/countTime) // Deadtime correction 149 v5 = v5/(1.0-v5*MainDeadTime/countTime) // Deadtime correction 150 v6 = v6/(1.0-v6*MainDeadTime/countTime) // Deadtime correction 151 v7 = v7/(1.0-v7*MainDeadTime/countTime) // Deadtime correction 152 DetCts[numlinesloaded] = v2 + v3 + v5 + v6 + v7 //5 detectors 153 TransCts[numlinesloaded] = v4/(1.0-v4*TransDeadTime/countTime) //trans detector+deadtime correction 154 ErrDetCts[numlinesloaded] = sqrt(detCts[numlinesloaded]) 155 //values 8-16 are always zero 156 endif 157 118 158 numlinesloaded += 1 //2 lines in file read, one "real" line of data 119 159 while(1) -
sans/Dev/trunk/NCNR_User_Procedures/Reduction/VSANS/V_Protocol_Reduction.ipf
r1121 r1122 1326 1326 // can't do this, or it will simply bypass the missing parameter dialog! 1327 1327 // V_GetAvgInfo(av_typ,autoSave,autoName,binType,qCtr,qDelta,detGroup) 1328 av_typ = StringByKey("AVTYPE", gAvgInfoStr ,"=",";")1329 autoSave = StringByKey("SAVE", gAvgInfoStr ,"=",";")1330 autoName = StringByKey("NAME", gAvgInfoStr ,"=",";")1331 binType = StringByKey("BINTYPE", gAvgInfoStr ,"=",";")1332 qCtr = NumberByKey("QCENTER", gAvgInfoStr ,"=",";")1333 qDelta = NumberByKey("QDELTA", gAvgInfoStr ,"=",";")1334 detGroup = StringByKey("DETGROUP", gAvgInfoStr ,"=",";")1335 phi = NumberByKey("PHI", gAvgInfoStr ,"=",";")1336 dphi = NumberByKey("DPHI", gAvgInfoStr ,"=",";")1328 av_typ = StringByKey("AVTYPE", gAvgInfoStr ,"=",";") 1329 autoSave = StringByKey("SAVE", gAvgInfoStr ,"=",";") 1330 autoName = StringByKey("NAME", gAvgInfoStr ,"=",";") 1331 binType = StringByKey("BINTYPE", gAvgInfoStr ,"=",";") 1332 qCtr = NumberByKey("QCENTER", gAvgInfoStr ,"=",";") 1333 qDelta = NumberByKey("QDELTA", gAvgInfoStr ,"=",";") 1334 detGroup = StringByKey("DETGROUP", gAvgInfoStr ,"=",";") 1335 phi = NumberByKey("PHI", gAvgInfoStr ,"=",";") 1336 dphi = NumberByKey("DPHI", gAvgInfoStr ,"=",";") 1337 1337 1338 1338 // Execute "V_GetAvgInfo_Full()" … … 1350 1350 // Prompt autoPlot,"Plot the averaged Data?",popup,"Yes;No" 1351 1351 Prompt side,"Include detector halves?",popup,"both;right;left" 1352 Prompt phi,"Orientation Angle ( -90,90) degrees (Rectangular or Sector)"1353 Prompt dphi, " Azimuthal range (0,45) degrees(Sector only)"1352 Prompt phi,"Orientation Angle (0,359) degrees (Rectangular or Sector)" 1353 Prompt dphi, "Sector range (+/-) degrees (0,45) (Sector only)" 1354 1354 // Prompt width, "Width of Rectangular average (1,128)" 1355 1355 Prompt binType,"Binning Type?",popup,ksBinTypeStr
Note: See TracChangeset
for help on using the changeset viewer.