Changeset 647
- Timestamp:
- Mar 23, 2010 3:59:52 PM (12 years ago)
- Location:
- sans/Dev/trunk/NCNR_User_Procedures/Reduction/SANS
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
sans/Dev/trunk/NCNR_User_Procedures/Reduction/SANS/CatVSTable.ipf
r641 r647 166 166 KillWaves/Z notRAWlist 167 167 // 168 Print "Total time (s) = ",(ticks - t1)/60.15169 Print "Time per raw data file (s) = ",(ticks - t1)/60.15/(numItems-numpnts(notRawList))168 // Print "Total time (s) = ",(ticks - t1)/60.15 169 // Print "Time per raw data file (s) = ",(ticks - t1)/60.15/(numItems-numpnts(notRawList)) 170 170 return(0) 171 171 End -
sans/Dev/trunk/NCNR_User_Procedures/Reduction/SANS/HFIR_Utils.ipf
r642 r647 270 270 String fullName="",partialName="",item="" 271 271 //get list of raw data files in folder that match "num" (add leading zeros) 272 if( (num>9999) || (num< =0) )272 if( (num>9999) || (num<0) ) 273 273 //Print "error in FindFileFromRunNumber(num), file number too large or too small" 274 274 Return ("") … … 280 280 numStr = num2str(num) 281 281 endif 282 if(num > 99 )282 if(num > 99 && num < 1000) 283 283 numStr = "0"+num2str(num) 284 284 endif 285 if(num > 9 )285 if(num > 9 && num < 100) 286 286 numStr = "00"+num2str(num) 287 else 287 endif 288 if(num < 10) 288 289 numStr = "000"+num2Str(num) 289 290 endif 290 291 if(num == 0) 292 numStr = "0000" 293 endif 294 291 295 //make sure that path exists 292 296 PathInfo catPathName -
sans/Dev/trunk/NCNR_User_Procedures/Reduction/SANS/Includes_v520.ipf
r646 r647 96 96 "Help for Beta Operations",DisplayHelpTopic/Z/K=1 "Beta SANS Tools" 97 97 "-" 98 "FillEMPUsingSelection" 98 // "FillEMPUsingSelection" // Transmission utilities have been added directly to the panel 99 99 // "GuessEveryTransFile" 100 100 // "GuessSelectedTransFiles" 101 "ClearSelectedTransAssignments"102 "-"101 // "ClearSelectedTransAssignments" 102 // "-" 103 103 //// "CreateRunNumList" 104 104 //// "TransList" … … 106 106 //// "RemoveRunFromList" 107 107 // "FillMREDList" 108 "-"108 // "-" 109 109 //// "Set3NSORTFiles" 110 110 "CreateTableToCombine" -
sans/Dev/trunk/NCNR_User_Procedures/Reduction/SANS/SANS_Utilities.ipf
r646 r647 232 232 233 233 Proc FillEMPUsingSelection() 234 FillEMPFilenameWSelection( )234 FillEMPFilenameWSelection("") 235 235 End 236 236 … … 246 246 247 247 Proc ClearSelectedTransAssignments() 248 ClearSelectedAssignments( )248 ClearSelectedAssignments("") 249 249 End 250 250 -
sans/Dev/trunk/NCNR_User_Procedures/Reduction/SANS/Transmission.ipf
r577 r647 1035 1035 Proc Trans_Panel() 1036 1036 PauseUpdate; Silent 1 // building window... 1037 NewPanel /W=(173,197,54 0,424)/K=1 as "Calculate Transmissions"1037 NewPanel /W=(173,197,548,444) /K=1 as "Calculate Transmissions" 1038 1038 DoWindow/C Trans_Panel 1039 1039 ModifyPanel cbRGB=(49807,47186,38011) … … 1041 1041 SetDrawLayer UserBack 1042 1042 DrawLine 0,56,368,56 1043 DrawLine 0,1 25,368,1251044 Button pick_emp,pos={4,65},size={105,20},proc=PickEMPTransButton,title="set BCENTfile"1043 DrawLine 0,142,368,142 1044 Button pick_emp,pos={4,65},size={105,20},proc=PickEMPTransButton,title="set EMPTY file" 1045 1045 Button pick_emp,help={"This button will set the file selected in the Transmission file table to be the empty beam file."} 1046 1046 SetVariable empStr,pos={114,67},size={250,17},title="file:" … … 1048 1048 SetVariable empStr,fSize=10 1049 1049 SetVariable empStr,limits={-Inf,Inf,0},value= root:myGlobals:TransHeaderInfo:gEMP 1050 Button Trn_button_1,pos={5, 101},size={90,20},proc=Trn_SetXYBoxButton,title="Set XY Box"1050 Button Trn_button_1,pos={5,91},size={90,20},proc=Trn_SetXYBoxButton,title="Set XY Box" 1051 1051 Button Trn_button_1,help={"Sets the XY box to sum over"} 1052 Button Trn_button_2,pos={174,1 39},size={110,20},proc=Trn_SortFilesByDate,title="Sort by Date"1052 Button Trn_button_2,pos={174,156},size={110,20},proc=Trn_SortFilesByDate,title="Sort by Date" 1053 1053 Button Trn_button_2,help={"Sort the scattering and transmission files by creation date."} 1054 Button Trn_button_3,pos={174,1 69},size={110,20},proc=Trn_SortFilesByLabel,title="Sort by Label"1054 Button Trn_button_3,pos={174,186},size={110,20},proc=Trn_SortFilesByLabel,title="Sort by Label" 1055 1055 Button Trn_button_3,help={"Sort the scattering and transmission files by label."} 1056 Button Trn_button_4,pos={295,139},size={67,20},proc=Trn_ShowHelpProc,title="Help" 1057 Button Trn_button_4,help={"Show a help notebook for calculating transmissions."} 1058 SetVariable Trn_setvar_1,pos={135,100},size={227,17},title="Box is " 1056 SetVariable Trn_setvar_1,pos={135,90},size={227,17},title="Box is " 1059 1057 SetVariable Trn_setvar_1,help={"Box coordinates to sum over"},fSize=10 1060 1058 SetVariable Trn_setvar_1,limits={-Inf,Inf,0},value= root:myGlobals:TransHeaderInfo:gBox … … 1066 1064 SetVariable Trn_setvar_0,help={"Currently selected data path"},fSize=10 1067 1065 SetVariable Trn_setvar_0,limits={-Inf,Inf,0},value= root:myGlobals:TransHeaderInfo:gCatPathStr 1068 Button Trn_button_5,pos={5,1 69},size={161,20},proc=Trn_CalcAllFilesButton,title="Calculate All Files"1066 Button Trn_button_5,pos={5,186},size={161,20},proc=Trn_CalcAllFilesButton,title="Calculate All Files" 1069 1067 Button Trn_button_5,help={"Calculate transmission and patch headers of ALL files in the Scattering File Table."} 1070 Button Trn_button_6,pos={295, 198},size={67,20},proc=Trn_PanelDoneButtonProc,title="Done"1068 Button Trn_button_6,pos={295,215},size={67,20},proc=Trn_PanelDoneButtonProc,title="Done" 1071 1069 Button Trn_button_6,help={"Close the panel when done calculating transmissions"} 1072 1070 Button Trn_button_7,pos={67,32},size={214,20},proc=Trn_RefreshProc,title="List Files" 1073 1071 Button Trn_button_7,help={"Generate or refresh the tables of files."} 1074 Button Trn_button_8,pos={5,1 39},size={161,20},proc=Trn_CalcSelectedFilesButton,title="Calculate Selected Files"1072 Button Trn_button_8,pos={5,156},size={161,20},proc=Trn_CalcSelectedFilesButton,title="Calculate Selected Files" 1075 1073 Button Trn_button_8,help={"Calculate transmission and patch headers of selected files in the Scattering File Table."} 1076 Button Trn_button_10,pos={5, 198}, size={161,20},proc=TotalTransButtonProc1074 Button Trn_button_10,pos={5,215}, size={161,20},proc=TotalTransButtonProc 1077 1075 Button Trn_button_10 title="Calculate Total Trans" 1078 1076 Button Trn_button_10 help={"Calculate transmission over the whole detector and patch headers of ALL files in the data folder."} 1077 Button setEmpForAll,pos={4,117},size={120,20},proc=FillEMPFilenameWSelection,title="Use EMP for ALL" 1078 Button setEmpForAll,help={"This button will set the file selected in the Transmission file table to be the empty beam file."} 1079 Button ClearTrans,pos={175,215},size={110,20},proc=ClearSelectedAssignments,title="Clear Selection" 1080 Button ClearTrans,help={"This button will set the file selected in the Transmission file table to be the empty beam file."} 1079 1081 EndMacro 1080 1082 … … 1570 1572 // 1571 1573 ///// 1572 Function FillEMPFilenameWSelection() 1573 1574 GetSelection table,TransFileTable,3 1575 Variable row=V_startRow //ony need the selected row, we know the column names and location 1574 // March 2010: 1575 // changed from the previous beta menu operation, now uses the text from the file name box 1576 // rather than requiring a selection on the table (since you just set the box...) 1577 // 1578 Function FillEMPFilenameWSelection(ctrlName) 1579 String ctrlName 1580 1581 // GetSelection table,TransFileTable,3 1582 // Variable row=V_startRow //ony need the selected row, we know the column names and location 1583 1584 SVAR empName = root:myGlobals:TransHeaderInfo:gEMP 1585 if(strlen(empName)==0 || cmpstr(empName,"no path selected")==0) 1586 DoAlert 0,"Please select and set an empty beam file" 1587 return(0) 1588 endif 1576 1589 Wave/T fw = root:myGlobals:TransHeaderInfo:T_FileNames //trans files 1577 1590 Wave/T ew = root:myGlobals:TransHeaderInfo:T_EMP_FileNames //empty beam reference files 1578 1591 1579 ew[] = fw[row]1592 ew[] = empName 1580 1593 1581 1594 return(0) … … 1939 1952 End 1940 1953 1941 Function ClearSelectedAssignments() 1942 1943 String winStr = WinList("*", ";", "WIN:" ) //returns the target window 1954 // now a button on the Transmission Panel 1955 Function ClearSelectedAssignments(ctrlName) 1956 String ctrlName 1957 1958 /// old way, from the menu - takes the selection from the top window, have it now return the top table. 1959 // String winStr = WinList("*", ";", "WIN:" ) //returns the top window (with a trailing semicolon!) 1960 String winStr = WinName(0,2,1) //returns the top visible table 1944 1961 Variable scatterTableExists, transTableExists 1945 Print winStr1946 scatterTableExists = cmpstr(winStr,"ScatterFileTable ;")1962 // Print winStr 1963 scatterTableExists = cmpstr(winStr,"ScatterFileTable") 1947 1964 if (scatterTableExists == 0) 1948 1965 GetSelection table,ScatterFileTable,1 … … 1950 1967 endif 1951 1968 1952 transTableExists = cmpstr(winStr,"TransFileTable ;")1969 transTableExists = cmpstr(winStr,"TransFileTable") 1953 1970 if (transTableExists == 0) 1954 1971 GetSelection table,TransFileTable,1 … … 1956 1973 endif 1957 1974 1975 ///////// new method, presents a clunky dialog - don't use this way unless I absolutely need to 1976 // Variable whichTable=1 1977 // Prompt whichTable,"Which Table?",popup,"Transmission Files;Scattering Files;" 1978 // DoPrompt "Which Selection to Clear",whichTable 1979 // if (V_Flag) 1980 // return 0 // user canceled 1981 // endif 1982 // 1983 // if (whichTable == 1) //the Transmission Table 1984 // GetSelection table,TransFileTable,1 1985 // fClearSelectedAssignments(V_startRow,V_endRow,2) 1986 // else 1987 // //the Scattering Files table 1988 // GetSelection table,ScatterFileTable,1 1989 // fClearSelectedAssignments(V_startRow,V_endRow,1) 1990 // endif 1958 1991 return(0) 1959 1992 End
Note: See TracChangeset
for help on using the changeset viewer.