Changeset 875 for sans/Dev/trunk/NCNR_User_Procedures/Reduction
- Timestamp:
- Nov 16, 2012 12:06:27 PM (10 years ago)
- Location:
- sans/Dev/trunk/NCNR_User_Procedures/Reduction/SANS
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
sans/Dev/trunk/NCNR_User_Procedures/Reduction/SANS/EventModeProcessing.ipf
r874 r875 35 35 // 36 36 37 38 39 37 Proc Show_Event_Panel() 40 38 DoWindow/F EventModePanel … … 66 64 Variable/G root:Packages:NIST:gEvent_logint = 1 67 65 68 Variable/G root:Packages:NIST:gEvent_Mode = 1 // ==0 for "stream", ==1 for Oscillatory 66 Variable/G root:Packages:NIST:gEvent_Mode = 0 // ==0 for "stream", ==1 for Oscillatory 67 Variable/G root:Packages:NIST:gRemoveBadEvents = 1 // ==1 to remove "bad" events, ==0 to read "as-is" 69 68 70 69 NVAR nslices = root:Packages:NIST:gEvent_nslices … … 93 92 TitleBox tb1,variable=root:Packages:NIST:gEventDisplayString 94 93 95 CheckBox chkbox1,pos={170, 15},title="Oscillatory Mode?"94 CheckBox chkbox1,pos={170,8},title="Oscillatory Mode?" 96 95 CheckBox chkbox1,variable = root:Packages:NIST:gEvent_mode 96 CheckBox chkbox3,pos={170,27},title="Remove Bad Events?" 97 CheckBox chkbox3,variable = root:Packages:NIST:gRemoveBadEvents 98 97 99 Button doneButton,pos={435,12}, size={50,20},title="Done",fSize=12 98 100 Button doneButton,proc=EventDone_Proc … … 123 125 Display/W=(20,180,480,640)/HOST=EventModePanel/N=Event_slicegraph 124 126 AppendImage/W=EventModePanel#Event_slicegraph/T root:Packages:NIST:Event:dispsliceData 125 ModifyImage/W=EventModePanel#Event_slicegraph ''#0 ctab= {*,*, Grays,0}127 ModifyImage/W=EventModePanel#Event_slicegraph ''#0 ctab= {*,*,ColdWarm,0} 126 128 ModifyImage/W=EventModePanel#Event_slicegraph ''#0 ctabAutoscale=3 127 129 ModifyGraph margin(left)=14,margin(bottom)=14,margin(top)=14,margin(right)=14 … … 145 147 // click code here 146 148 Execute "ShowRescaledTimeGraph()" 149 // 150 DifferentiatedTime() 151 // 147 152 break 148 153 case -1: // control being killed … … 533 538 End 534 539 540 541 Function SortTimeData() 542 543 // now before binning, sort the data 544 545 //this is slow - undoing the sorting and starting over, but if you don't, 546 // you'll never be able to undo the sort 547 // 548 SetDataFolder root:Packages:NIST:Event: 549 550 KillWaves/Z OscSortIndex 551 // Print WaveExists($"root:Packages:NIST:Event:OscSortIndex") 552 553 if(WaveExists($"root:Packages:NIST:Event:OscSortIndex") == 0 ) 554 Duplicate/O rescaledTime OscSortIndex 555 MakeIndex rescaledTime OscSortIndex 556 IndexSort OscSortIndex, yLoc,xLoc,timePt,rescaledTime 557 Endif 558 559 SetDataFolder root: 560 return(0) 561 End 562 563 564 535 565 Function SetLinearBins(binEndTime,nslices,t_longest) 536 566 Wave binEndTime … … 631 661 endif 632 662 663 DifferentiatedTime() 664 633 665 return(0) 634 666 End … … 768 800 End 769 801 802 Function DifferentiatedTime() 803 804 Wave rescaledTime = root:Packages:NIST:Event:rescaledTime 805 806 Differentiate rescaledTime/D=rescaledTime_DIF 807 // Display rescaledTime,rescaledTime_DIF 808 DoWindow/F Differentiated_Time 809 if(V_flag == 0) 810 Display/N=Differentiated_Time/K=1 rescaledTime_DIF 811 Legend 812 Modifygraph gaps=0 813 ModifyGraph zero(left)=1 814 Label left "\\Z14Delta (dt/event)" 815 Label bottom "\\Z14Event number" 816 endif 817 818 return(0) 819 End 820 770 821 771 822 // 772 823 // for the bit shifts, see the decimal-binary conversion 773 824 // http://www.binaryconvert.com/convert_unsigned_int.html 825 // 826 // K0 = 536870912 827 // Print (K0 & 0x08000000)/134217728 //bit 27 only, shift by 2^27 828 // Print (K0 & 0x10000000)/268435456 //bit 28 only, shift by 2^28 829 // Print (K0 & 0x20000000)/536870912 //bit 29 only, shift by 2^29 830 // 774 831 // 775 832 Function LoadEvents() … … 786 843 Variable fileref 787 844 String buffer 845 String fileStr,tmpStr 788 846 Variable dataval,timeval,type,numLines,verbose,verbose3 789 Variable xval,yval,rollBit,nRoll,roll_time 847 Variable xval,yval,rollBit,nRoll,roll_time,bit29,bit28,bit27 848 Variable ii,flaggedEvent,rolloverHappened,numBad=0,tmpPP=0 790 849 Variable Xmax, yMax 850 791 851 xMax = 127 // number the detector from 0->127 792 852 yMax = 127 793 853 794 verbose3 = 1 854 verbose3 = 1 //prints out the rollover events (type==3) 795 855 verbose = 0 796 856 numLines = 0 797 857 798 // this gets me the number of lines. not terribly useful799 // Open/R fileref as filepathstr800 // do801 // numLines += 1802 // FReadLine fileref, buffer803 // if (strlen(buffer) == 0)804 // numLines -= 1 //last FReadLine wasn't really a line805 // break806 // endif807 // while(1)808 // Close fileref809 858 810 859 // what I really need is the number of XY events 811 Variable numXYevents,num1,num2,num3,num0,totBytes 860 Variable numXYevents,num1,num2,num3,num0,totBytes,numPP,numT0,numDL,numFF,numZero 812 861 numXYevents = 0 813 862 num0 = 0 … … 815 864 num2 = 0 816 865 num3 = 0 866 numPP = 0 867 numT0 = 0 868 numDL = 0 869 numFF = 0 870 numZero = 0 817 871 818 872 //tic() … … 826 880 //toc() 827 881 // 882 883 884 // do a "pre-scan to get some of the counts, so that I can allocate space. This does 885 // double the read time, but is still faster than adding points to waves as the file is read 886 // 887 828 888 tic() 829 889 830 890 Open/R fileref as filepathstr 831 891 do … … 842 902 // two most sig bits (31-30) 843 903 type = (dataval & 0xC0000000)/1073741824 //right shift by 2^30 844 904 845 905 if(type == 0) 846 906 num0 += 1 … … 858 918 endif 859 919 920 bit29 = (dataval & 0x20000000)/536870912 //bit 29 only , shift by 2^29 921 922 if(type==0 || type==2) 923 numPP += round(bit29) 924 endif 925 926 if(type==1 || type==3) 927 numT0 += round(bit29) 928 endif 929 930 if(dataval == 0) 931 numZero += 1 932 endif 933 860 934 while(1) 861 935 Close fileref 862 936 // done counting the number of XY events 863 864 937 toc() 938 939 865 940 // 866 941 // … … 870 945 // Printf "time MSW = num1 = %d\r",num1 871 946 // Printf "Rollover = num3 = %d\r",num3 872 873 947 // Printf "num0 + num2 = %d\r",num0+num2 874 948 875 String fileStr = ParseFilePath(0, filepathstr, ":", 1, 0),tmpStr 876 877 sprintf tmpStr, "%s: %d total bytes",fileStr,totBytes 949 // dispStr will be displayed on the panel 950 fileStr = ParseFilePath(0, filepathstr, ":", 1, 0) 951 952 sprintf tmpStr, "%s: %d total bytes\r",fileStr,totBytes 878 953 dispStr = tmpStr 879 s Printf tmpStr,"\rnumXYevents = %d\rXY = num0 = %d",numXYevents,num0954 sprintf tmpStr,"numXYevents = %d\r",numXYevents 880 955 dispStr += tmpStr 881 sPrintf tmpStr,"\rXY time = num2 = %d\rtime MSW = num1 = %d",num2,num1 956 // sprintf tmpStr,"XY = num0 = %d\r",num0 957 // dispStr += tmpStr 958 // sprintf tmpStr,"\rXY time = num2 = %d\rtime MSW = num1 = %d",num2,num1 959 // dispStr += tmpStr 960 // sprintf tmpStr,"XY time = num2 = %d\r",num2 961 // dispStr += tmpStr 962 // sprintf tmpStr,"time MSW = num1 = %d\r",num1 963 // dispStr += tmpStr 964 sprintf tmpStr,"PP = %d : ",numPP 882 965 dispStr += tmpStr 883 sPrintf tmpStr,"\rRollover = num3 = %d",num3 966 sprintf tmpStr,"ZeroData = %d\r",numZero 967 dispStr += tmpStr 968 sprintf tmpStr,"Rollover = %d",num3 884 969 dispStr += tmpStr 885 970 … … 890 975 // Make/O/U/N=(totBytes/4) xLoc,yLoc //too large, trim when done (bad idea) 891 976 // Make/O/D/N=(totBytes/4) timePt 977 Make/O/D/N=1000 badTimePt,badEventNum,PPTime,PPEventNum 978 badTimePt=0 979 badEventNum=0 980 PPTime=0 981 PPEventNum=0 892 982 xLoc=0 893 983 yLoc=0 894 984 timePt=0 895 896 897 Variable ii=0 985 898 986 nRoll = 0 //number of rollover events 899 987 roll_time = 2^26 //units of 10-7 sec 900 988 989 NVAR removeBadEvents = root:Packages:NIST:gRemoveBadEvents 990 901 991 time_msw=0 902 992 903 993 tic() 904 994 995 ii = 0 996 905 997 Open/R fileref as filepathstr 998 999 // remove events at the beginning up to a type==2 so that the msw and lsw times are reset properly 1000 if(RemoveBadEvents == 1) 1001 do 1002 do 1003 FReadLine fileref, buffer //skip the "blank" lines that have one character 1004 while(strlen(buffer) == 1) 1005 1006 if (strlen(buffer) == 0) 1007 break 1008 endif 1009 1010 sscanf buffer,"%x",dataval 1011 // two most sig bits (31-30) 1012 type = (dataval & 0xC0000000)/1073741824 //right shift by 2^30 1013 1014 if(type == 2) 1015 // this is the first event with a proper time value, so process the XY-time event as ususal 1016 // and then break to drop to the main loop, where the next event == type 1 1017 1018 xval = xMax - (dataval & 255) //last 8 bits (7-0) 1019 yval = (dataval & 65280)/256 //bits 15-8, right shift by 2^8 1020 1021 time_lsw = (dataval & 536805376)/65536 //13 bits, 28-16, right shift by 2^16 1022 1023 if(verbose) 1024 // printf "%u : %u : %u : %u\r",dataval,time_lsw,time_msw,timeval 1025 printf "%u : %u : %u : %u\r",dataval,timeval,xval,yval 1026 endif 1027 1028 // this is the first point, be sure that ii = 0 1029 ii = 0 1030 xLoc[ii] = xval 1031 yLoc[ii] = yval 1032 1033 Print "At beginning of file, numBad = ",numBad 1034 break // the next do loop processes the bulk of the file (** the next event == type 1 = MIR) 1035 else 1036 numBad += 1 1037 endif 1038 1039 //ii+=1 don't increment the counter 1040 while(1) 1041 endif 1042 1043 // now read the main portion of the file. 906 1044 do 907 1045 do … … 915 1053 sscanf buffer,"%x",dataval 916 1054 1055 1056 // type = (dataval & ~(2^32 - 2^30 -1))/2^30 1057 1058 // two most sig bits (31-30) 1059 type = (dataval & 0xC0000000)/1073741824 //right shift by 2^30 1060 1061 // // if the first event, read the time_msw, since this is not always reset. if the first event is XYM, then it's OK, 1062 // // but if the first event is XY, then the first few events will have msw=0 until an XYM forces a read of MSW in the 1063 // // subsequent MIR event. 1064 // // So do it now. 1065 // if(ii==0 && RemoveBadEvents == 1) 1066 // time_msw = (dataval & 536805376)/65536 //13 bits, 28-16, right shift by 2^16 1067 // endif 1068 917 1069 // 918 1070 //Constant ATXY = 0 … … 921 1073 //Constant ATMAR = 3 922 1074 // 923 // type = (dataval & ~(2^32 - 2^30 -1))/2^30 924 925 // two most sig bits (31-30) 926 type = (dataval & 0xC0000000)/1073741824 //right shift by 2^30 927 1075 928 1076 if(verbose > 0) 929 1077 verbose -= 1 … … 931 1079 // 932 1080 switch(type) 933 case ATXY: 1081 case ATXY: // 0 934 1082 if(verbose) 935 1083 printf "XY : " 936 1084 endif 1085 1086 // if the datavalue is == 0, just skip it now (it can only be interpreted as type 0, obviously 1087 if(dataval == 0 && RemoveBadEvents == 1) 1088 break //don't increment ii 1089 endif 1090 1091 // if it's a pileup event, skip it now (this can be either type 0 or 2) 1092 bit29 = (dataval & 0x20000000)/536870912 //bit 29 only , shift by 2^29 1093 if(bit29 == 1 && RemoveBadEvents == 1) 1094 PPTime[tmpPP] = timeval 1095 PPEventNum[tmpPP] = ii 1096 tmpPP += 1 1097 break //don't increment ii 1098 endif 1099 937 1100 // xval = ~(dataval & ~(2^32 - 2^8)) & 127 938 1101 // yval = ((dataval & ~(2^32 - 2^16 ))/2^8) & 127 … … 947 1110 t_longest = timeval 948 1111 endif 949 xLoc[ii] = xval 950 yLoc[ii] = yval 951 timePt[ii] = timeval 1112 1113 1114 // catch the "bad" events: 1115 // if an XY event follows a rollover, time_msw is 0 by definition, but does not immediately get 1116 // re-evalulated here. Throw out only the immediately following points where msw is still 8191 1117 if(rolloverHappened && RemoveBadEvents == 1) 1118 // maybe a bad event 1119 if(time_msw == 8191) 1120 badTimePt[numBad] = timeVal 1121 badEventNum[numBad] = ii 1122 numBad +=1 1123 else 1124 // time_msw has been reset, points are good now, so keep this one 1125 xLoc[ii] = xval 1126 yLoc[ii] = yval 1127 timePt[ii] = timeval 1128 1129 // if(xval == 127 && yval == 0) 1130 // // check bit 29 1131 // bit29 = (dataval & 0x20000000)/536870912 //bit 29 only , shift by 2^29 1132 // Print "XY=127,0 : bit29 = ",bit29 1133 // endif 1134 1135 ii+=1 1136 rolloverHappened = 0 1137 endif 1138 else 1139 // normal processing of good point, keep it 1140 xLoc[ii] = xval 1141 yLoc[ii] = yval 1142 timePt[ii] = timeval 1143 1144 // if(xval == 127 && yval == 0) 1145 // // check bit 29 1146 // bit29 = (dataval & 0x20000000)/536870912 //bit 29 only , shift by 2^29 1147 // Printf "XY=127,0 : bit29 = %u : d=%u\r",bit29,dataval 1148 // endif 1149 ii+=1 1150 endif 1151 952 1152 953 1153 if(verbose) … … 955 1155 printf "d=%u : t=%u : msw=%u : lsw=%u : %u : %u \r",dataval,timeval,time_msw,time_lsw,xval,yval 956 1156 endif 957 958 // b = FindBin(timeval,nslices) 959 // slicedData[xval][yval][b] += 1 960 961 ii+=1 962 1157 963 1158 // verbose = 0 964 1159 break 965 case ATXYM: 1160 case ATXYM: // 2 966 1161 if(verbose) 967 1162 printf "XYM : " 968 1163 endif 1164 1165 // if it's a pileup event, skip it now (this can be either type 0 or 2) 1166 // - but can I do this if this is an XY-time event? This will lead to a wrong time, and a time 1167 // assigned to an XY (0,0)... 1168 bit29 = (dataval & 0x20000000)/536870912 //bit 29 only , shift by 2^29 1169 if(bit29 == 1 && RemoveBadEvents == 1) 1170 Print "*****Bit 29 (PP) event set for Type==2, but not handled, ii = ",ii 1171 // break //don't increment ii 1172 endif 1173 969 1174 // xval = ~(dataval & ~(2^32 - 2^8)) & 127 970 1175 // yval = ((dataval & ~(2^32 - 2^16 ))/2^8) & 127 971 // time_lsw = (dataval & ~(2^32 - 2^29 ))/2^16 1176 // time_lsw = (dataval & ~(2^32 - 2^29 ))/2^16 //this method gives a FP result!! likely since the "^" operation gives FP result... 972 1177 973 1178 xval = xMax - (dataval & 255) //last 8 bits (7-0) 974 1179 yval = (dataval & 65280)/256 //bits 15-8, right shift by 2^8 975 1180 976 time_lsw = (dataval & 536805376)/65536 //13 bits, 28-16, right shift by 2^16 1181 time_lsw = (dataval & 536805376)/65536 //13 bits, 28-16, right shift by 2^16 (result is integer) 977 1182 978 1183 if(verbose) … … 983 1188 xLoc[ii] = xval 984 1189 yLoc[ii] = yval 985 1190 986 1191 // don't fill in the time yet, or increment the index ii 987 1192 // the next event MUST be ATMIR with the MSW time bits … … 989 1194 // verbose = 0 990 1195 break 991 case ATMIR: 1196 case ATMIR: // 1 992 1197 if(verbose) 993 1198 printf "MIR : " 994 1199 endif 995 // time_msw = (dataval & ~(2^32 - 2^29 ))/2^16 1200 996 1201 time_msw = (dataval & 536805376)/65536 //13 bits, 28-16, right shift by 2^16 997 1202 timeval = trunc( nRoll*roll_time + (time_msw * (8192)) + time_lsw ) … … 1006 1211 // the XY position was in the previous event ATXYM 1007 1212 timePt[ii] = timeval 1008 1213 1214 // bit29 = (dataval & 0x20000000)/536870912 //bit 29 only , shift by 2^29 1215 // if(bit29 != 0) 1216 // Printf "bit29 = 1 at ii = %d : type = %d\r",ii,type 1217 // endif 1218 1009 1219 ii+=1 1010 1011 // b = FindBin(timeval,nslices)1012 // slicedData[xval][yval][b] += 11013 1014 1220 // verbose = 0 1015 1221 break 1016 case ATMAR: 1222 case ATMAR: // 3 1017 1223 if(verbose3) 1018 1224 // verbose = 15 1019 verbose = 21225 // verbose = 2 1020 1226 printf "MAR : " 1021 1227 endif … … 1024 1230 1025 1231 // check bit 29 1026 rollBit= (dataval & 0x20000000)/536870912 //bit 29 only , shift by 2^291232 bit29 = (dataval & 0x20000000)/536870912 //bit 29 only , shift by 2^29 1027 1233 nRoll += 1 1028 1234 // not doing anything with these bits yet 1235 bit27 = (dataval & 0x08000000)/134217728 //bit 27 only, shift by 2^27 1236 bit28 = (dataval & 0x10000000)/268435456 //bit 28 only, shift by 2^28 1237 1029 1238 if(verbose3) 1030 printf " %u : %u : %u \r",dataval,rollBit,nRoll1239 printf "d=%u : b29=%u : b28=%u : b27=%u : #Roll=%u \r",dataval,bit29, bit28, bit27,nRoll 1031 1240 endif 1032 1241 1242 rolloverHappened = 1 1243 1033 1244 break 1034 1245 endswitch 1035 1246 1247 // if(ii<18) 1248 // printf "TYPE=%d : ii=%d : d=%u : t=%u : msw=%u : lsw=%u : %u : %u \r",type,ii,dataval,timeval,time_msw,time_lsw,xval,yval 1249 // endif 1250 1036 1251 while(1) 1037 1252 … … 1041 1256 toc() 1042 1257 1258 sPrintf tmpStr,"\rBad Events = numBad = %d (%g %% of events)",numBad,numBad/numXYevents*100 1259 dispStr += tmpStr 1260 1043 1261 SetDataFolder root: 1044 1262 … … 1050 1268 1051 1269 Proc BinEventBarGraph() 1052 PauseUpdate; Silent 1 // building window... 1053 String fldrSav0= GetDataFolder(1) 1054 SetDataFolder root:Packages:NIST:Event: 1055 Display /W=(110,705,610,1132)/K=1 binCount vs binEndTime 1056 SetDataFolder fldrSav0 1057 ModifyGraph mode=5 1058 ModifyGraph marker=19 1059 ModifyGraph lSize=2 1060 ModifyGraph rgb=(0,0,0) 1061 ModifyGraph msize=2 1062 ModifyGraph hbFill=2 1063 ModifyGraph gaps=0 1064 ModifyGraph usePlusRGB=1 1065 ModifyGraph toMode=1 1066 ModifyGraph useBarStrokeRGB=1 1067 // ModifyGraph log=1 1068 ModifyGraph standoff=0 1069 // SetAxis left 0.1,4189 1070 // SetAxis bottom 0.0001,180.84853 1071 End 1270 1271 DoWindow/F EventBarGraph 1272 if(V_flag == 0) 1273 PauseUpdate; Silent 1 // building window... 1274 String fldrSav0= GetDataFolder(1) 1275 SetDataFolder root:Packages:NIST:Event: 1276 Display /W=(110,705,610,1132)/N=EventBarGraph /K=1 binCount vs binEndTime 1277 SetDataFolder fldrSav0 1278 ModifyGraph mode=5 1279 ModifyGraph marker=19 1280 ModifyGraph lSize=2 1281 ModifyGraph rgb=(0,0,0) 1282 ModifyGraph msize=2 1283 ModifyGraph hbFill=2 1284 ModifyGraph gaps=0 1285 ModifyGraph usePlusRGB=1 1286 ModifyGraph toMode=1 1287 ModifyGraph useBarStrokeRGB=1 1288 // ModifyGraph log=1 1289 ModifyGraph standoff=0 1290 Label bottom "\\Z14Time (seconds)" 1291 Label left "\\Z14Number of Events" 1292 // SetAxis left 0.1,4189 1293 // SetAxis bottom 0.0001,180.84853 1294 endif 1295 End 1296 1072 1297 1073 1298 Proc ShowBinTable() : Table 1074 PauseUpdate; Silent 1 // building window... 1075 String fldrSav0= GetDataFolder(1) 1076 SetDataFolder root:Packages:NIST:Event: 1077 Edit/W=(498,699,1003,955) /K=1 binCount,binEndTime 1078 ModifyTable format(Point)=1,sigDigits(binEndTime)=16,width(binEndTime)=218 1079 SetDataFolder fldrSav0 1299 1300 DoWindow/F BinEventTable 1301 if(V_flag == 0) 1302 PauseUpdate; Silent 1 // building window... 1303 String fldrSav0= GetDataFolder(1) 1304 SetDataFolder root:Packages:NIST:Event: 1305 Edit/W=(498,699,1003,955) /K=1/N=BinEventTable binCount,binEndTime 1306 ModifyTable format(Point)=1,sigDigits(binEndTime)=16,width(binEndTime)=218 1307 SetDataFolder fldrSav0 1308 endif 1080 1309 EndMacro 1081 1310 … … 1084 1313 // 1085 1314 Proc ShowRescaledTimeGraph() : Graph 1086 PauseUpdate; Silent 1 // building window... 1087 String fldrSav0= GetDataFolder(1) 1088 SetDataFolder root:Packages:NIST:Event: 1089 Display /W=(25,44,486,356)/K=1 rescaledTime 1090 SetDataFolder fldrSav0 1091 ModifyGraph mode=4 1092 ModifyGraph marker=19 1093 ModifyGraph rgb(rescaledTime)=(0,0,0) 1094 ModifyGraph msize=2 1095 SetAxis/A=2 left //only autoscale the visible data (based on the bottom limits) 1096 SetAxis bottom 0,1500 1097 ErrorBars rescaledTime OFF 1098 ShowInfo 1315 1316 DoWindow/F RescaledTimeGraph 1317 if(V_flag == 0) 1318 PauseUpdate; Silent 1 // building window... 1319 String fldrSav0= GetDataFolder(1) 1320 SetDataFolder root:Packages:NIST:Event: 1321 Display /W=(25,44,486,356)/K=1/N=RescaledTimeGraph rescaledTime 1322 SetDataFolder fldrSav0 1323 ModifyGraph mode=4 1324 ModifyGraph marker=19 1325 ModifyGraph rgb(rescaledTime)=(0,0,0) 1326 ModifyGraph msize=2 1327 // SetAxis/A=2 left //only autoscale the visible data (based on the bottom limits) 1328 // SetAxis bottom 0,1500 1329 ErrorBars rescaledTime OFF 1330 Label left "\\Z14Time (seconds)" 1331 Label bottom "\\Z14Event number" 1332 ShowInfo 1333 endif 1334 1099 1335 EndMacro 1100 1336 -
sans/Dev/trunk/NCNR_User_Procedures/Reduction/SANS/SASCALC.ipf
r868 r875 485 485 CheckBox checkNG7,pos={66,19},size={36,14},proc=SelectInstrumentCheckProc,title="NG7" 486 486 CheckBox checkNG7,value=0,mode=1 487 488 CheckBox checkChamber,pos={172,48},size={57,14},proc=TableCheckProc,title="Chamber" 489 CheckBox checkChamber,value=1,mode=1 490 CheckBox checkHuber,pos={172,27},size={44,14},proc=TableCheckProc,title="Huber" 491 CheckBox checkHuber,value=0,mode=1 487 492 // -- hide/unhide the 10m SANS 488 493 if(show10mSANS) … … 490 495 CheckBox checkNG10,value=0,mode=1 491 496 endif 492 // 493 CheckBox checkChamber,pos={172,48},size={57,14},proc=TableCheckProc,title="Chamber" 494 CheckBox checkChamber,value=1,mode=1 495 CheckBox checkHuber,pos={172,27},size={44,14},proc=TableCheckProc,title="Huber" 496 CheckBox checkHuber,value=0,mode=1 497 // 497 498 PopupMenu popup0,pos={6,94},size={76,20},proc=SourceAperturePopMenuProc 498 499 PopupMenu popup0,mode=1,popvalue="3.81 cm",value= root:Packages:NIST:SAS:gSourceApString … … 604 605 Slider SC_Slider_1,win=SASCALC,limits={133,1317,1},userTicks={root:Packages:NIST:SAS:tickSDDNG3,root:Packages:NIST:SAS:lblSDDNG3 } 605 606 Slider SC_Slider_1,win=SASCALC,variable=root:Packages:NIST:SAS:gDetDist //forces update 606 607 608 // un-disable the sample table position 609 CheckBox checkChamber,win=SASCALC,disable=0 610 CheckBox checkHuber,win=SASCALC,disable=0 611 607 612 break 608 613 … … 624 629 SetVariable setvar0,win=SASCALC,limits={100,1531,1} 625 630 Slider SC_Slider_1,win=SASCALC,variable=root:Packages:NIST:SAS:gDetDist //forces update 631 632 // un-disable the sample table position 633 CheckBox checkChamber,win=SASCALC,disable=0 634 CheckBox checkHuber,win=SASCALC,disable=0 626 635 627 636 break … … 652 661 SetVariable setvar0,win=SASCALC,limits={100,500,1} 653 662 Slider SC_Slider_1,win=SASCALC,variable=root:Packages:NIST:SAS:gDetDist //forces update 663 664 // disable the sample table position, as long as the sample positions are identical for the 10 m 665 CheckBox checkChamber,win=SASCALC,disable=2 666 CheckBox checkHuber,win=SASCALC,disable=2 654 667 655 668 break … … 1971 1984 case 10: 1972 1985 // 10m SANS handled differently 1986 // s12 == 0 by definition 1973 1987 // TODO: -- put in CORRECT VALUES -- THESE ARE FICTIONAL 1974 SSD = 500 - 155*NG - s12*(2-tableposition()) - L2Diff1988 SSD = 470 - 155*NG - s12*(2-tableposition()) - L2Diff 1975 1989 break 1976 1990 default:
Note: See TracChangeset
for help on using the changeset viewer.