- Timestamp:
- Nov 25, 2014 3:10:21 PM (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sans/Dev/trunk/NCNR_User_Procedures/Reduction/SANS/Transmission.ipf
r949 r950 1844 1844 endif 1845 1845 1846 Variable num=numpnts(matchRows) 1847 String result="",tmpStr 1848 1846 1849 Wave/T sw = root:myGlobals:TransHeaderInfo:S_Labels //Sample file labels 1847 1850 Wave/T tw = root:myGlobals:TransHeaderInfo:T_Labels //trans file labels … … 1849 1852 Wave/T snam = root:myGlobals:TransHeaderInfo:S_TRANS_FileNames //Scattering - trans correspondence 1850 1853 Wave/T samfile = root:myGlobals:TransHeaderInfo:S_FileNames //Scattering file name 1851 1854 1855 //// set up as a list box 1856 Make/O/T/N=(num,4) root:myGlobals:TransHeaderInfo:T_ListWave="" 1857 Make/O/D/N=(num,4,2) root:myGlobals:TransHeaderInfo:T_selWave 1858 Make/O/T/N=4 root:myGlobals:TransHeaderInfo:T_titles // 4 rows to match 4-column ListWave 1859 Make/O/W/U/N=(2,3) root:myGlobals:TransHeaderInfo:T_Colors 1860 WAVE/T ListWave = root:myGlobals:TransHeaderInfo:T_ListWave 1861 WAVE selWave = root:myGlobals:TransHeaderInfo:T_selWave 1862 WAVE/T titles = root:myGlobals:TransHeaderInfo:T_titles 1863 WAVE colors = root:myGlobals:TransHeaderInfo:T_Colors 1864 1865 1866 colors[][] = 0 1867 colors[0][] = 65000 1868 colors[1][] = 60000 1869 1870 1852 1871 // can do fancy formatted string with ... 1853 1872 //"asdf* matches file: \\f01filen\\f00 \\K(52428,1,1)\\f01afdsfdd\\f00\\K(0,0,0)asdfasdfs" 1854 Variable num=numpnts(matchRows) 1855 String result="",tmpStr 1873 1856 1874 for(ii=0;ii<num;ii+=1) 1857 1875 sprintf tmpStr,"\\f01\\K(52428,1,1)%s\\K(0,0,0)\\f00* Matches file: \\f01%s\\f00 | \\K(52428,1,1)\\f01%s\\f00\\K(0,0,0)%s\r",(tw[row])[0,numChars-1],samfile[matchRows[ii]],(sw[matchRows[ii]])[0,numchars-1],(sw[matchRows[ii]])[numchars,59] 1858 1876 result += tmpStr 1877 listWave[ii][1] = (tw[row])[0,numChars-1] + "*" + (tw[row])[numChars,59] 1878 listWave[ii][2] = samfile[matchRows[ii]] 1879 listWave[ii][3] = (sw[matchRows[ii]])[0,numchars-1] + (sw[matchRows[ii]])[numchars,59] // ?? 1859 1880 endfor 1881 1860 1882 1861 1883 if(cmpstr(result,"")==0) … … 1867 1889 1868 1890 String/G root:myGlobals:TransHeaderInfo:gResultStr = result 1891 selWave[][][] = 0 1892 selWave[][0][] = 2^5 + 2^4 //if 2^4 also, it's selected --- if((val & 2^4) != 0), then the bit is set 1893 1894 selWave[][][1]= round(p/2-trunc(p/2)) // change the color index values 1895 SetDimLabel 2,1,backColors,selWave 1896 1897 titles[0] = "Keep Match?" 1898 titles[1] = "Match String" 1899 titles[2] = "Matching Sample File" 1900 titles[3] = "Matching Sample Label" 1901 1902 1869 1903 1870 1904 DoWindow/F ConfirmGuess //if being called recursively, the panel is already up … … 1872 1906 TitleBox title0,pos={9,5},variable=root:myGlobals:TransHeaderInfo:gResultStr 1873 1907 else 1874 NewPanel /W=(600,44,1 150,225) as "Confirm Guess"1908 NewPanel /W=(600,44,1200,270) as "Confirm Guess" 1875 1909 DoWindow/C ConfirmGuess 1876 TitleBox title0,pos={15,8},size={560,32} 1877 TitleBox title0,variable= root:myGlobals:TransHeaderInfo:gResultStr 1878 Button button0,pos={240,150},size={190,20},proc=DoAssignTransButtonProc,title="Assign Transmission Files" 1879 Button button1,pos={10,150},size={100,20},proc=DoTryAgainMoreButtonProc,title="Try Again (+)" 1880 Button button2,pos={120,150},size={100,20},proc=DoTryAgainFewerButtonProc,title="Try Again (-)" 1881 Button button3,pos={450,150},size={70,20},proc=SkipTransButtonProc,title="Skip" 1910 1911 ListBox list0,pos={1,2},size={580,180},listWave=ListWave,selWave=selWave,colorWave=colors 1912 ListBox list0,titleWave=titles,widths={70,180,150,180} 1913 1914 // TitleBox title0,pos={15,8},size={560,32} 1915 // TitleBox title0,variable= root:myGlobals:TransHeaderInfo:gResultStr 1916 1917 Button button0,pos={240,190},size={190,20},proc=DoAssignTransButtonProc,title="Assign Transmission Files" 1918 Button button1,pos={10,190},size={100,20},proc=DoTryAgainMoreButtonProc,title="Try Again (+)" 1919 Button button2,pos={120,190},size={100,20},proc=DoTryAgainFewerButtonProc,title="Try Again (-)" 1920 Button button3,pos={450,190},size={70,20},proc=SkipTransButtonProc,title="Skip" 1882 1921 endif 1883 1922 … … 1898 1937 num=numpnts(matchRows) //this may have changed 1899 1938 for(ii=0;ii<num;ii+=1) 1900 snam[matchRows[ii]] = tnam[row] 1901 AssignSelTransFilesToData(matchRows[ii],matchRows[ii]) 1902 CalcSelTransFromHeader(matchRows[ii],matchRows[ii]) //does only that sample file 1903 gMatchSamStr += samfile(matchRows[ii]) + ";" 1939 if((selWave[ii][0] & 2^4) != 0) //box is checked, make the assignment for this file 1940 snam[matchRows[ii]] = tnam[row] 1941 AssignSelTransFilesToData(matchRows[ii],matchRows[ii]) 1942 CalcSelTransFromHeader(matchRows[ii],matchRows[ii]) //does only that sample file 1943 gMatchSamStr += samfile(matchRows[ii]) + ";" // this is for later, when trying to guess whish sample files to combine 1944 endif 1904 1945 endfor 1905 1946 break … … 2032 2073 Make/O/D/N=0 root:myGlobals:TransHeaderInfo:matchRows 2033 2074 Wave matchRows=root:myGlobals:TransHeaderInfo:matchRows 2034 2075 2076 WAVE/T ListWave = root:myGlobals:TransHeaderInfo:T_ListWave 2077 WAVE selWave = root:myGlobals:TransHeaderInfo:T_selWave 2078 WAVE/T titles = root:myGlobals:TransHeaderInfo:T_titles 2079 2035 2080 //transTableExists = WinType("TransFileTable") 2036 2081 //if (transTableExists != 0) … … 2040 2085 2041 2086 num=numpnts(matchRows) 2087 2088 //Redimension the list box waves 2089 Redimension/N=(num,4) ListWave 2090 Redimension/N=(num,4,2) selWave 2091 ListWave = "" 2092 selWave[][][] = 0 2093 2094 selWave[][0][] = 2^5 + 2^4 2095 2096 selWave[][][1]= round(p/2-trunc(p/2)) // change the color index values 2042 2097 2043 2098 resultStr = "" … … 2045 2100 sprintf tmpStr,"\\f01\\K(52428,1,1)%s\\K(0,0,0)\\f00* Matches file: \\f01%s\\f00 | \\K(52428,1,1)\\f01%s\\f00\\K(0,0,0)%s\r",(tw[row])[0,numChars-1],samfile[matchRows[ii]],(sw[matchRows[ii]])[0,numchars-1],(sw[matchRows[ii]])[numchars,59] 2046 2101 resultStr += tmpStr 2102 listWave[ii][1] = (tw[row])[0,numChars-1] + "*" + (tw[row])[numChars,59] 2103 listWave[ii][2] = samfile[matchRows[ii]] 2104 listWave[ii][3] = (sw[matchRows[ii]])[0,numchars-1] + (sw[matchRows[ii]])[numchars,59] // ?? 2047 2105 endfor 2048 2106 … … 2085 2143 Make/O/D/N=0 root:myGlobals:TransHeaderInfo:matchRows 2086 2144 Wave matchRows=root:myGlobals:TransHeaderInfo:matchRows 2087 2145 2146 WAVE/T ListWave = root:myGlobals:TransHeaderInfo:T_ListWave 2147 WAVE selWave = root:myGlobals:TransHeaderInfo:T_selWave 2148 WAVE/T titles = root:myGlobals:TransHeaderInfo:T_titles 2149 2088 2150 //transTableExists = WinType("TransFileTable") 2089 2151 //if (transTableExists != 0) … … 2094 2156 num=numpnts(matchRows) 2095 2157 2158 //Redimension the list box waves 2159 Redimension/N=(num,4) ListWave 2160 Redimension/N=(num,4,2) selWave 2161 ListWave = "" 2162 selWave[][][] = 0 2163 2164 selWave[][0][] = 2^5 + 2^4 2165 2166 selWave[][][1]= round(p/2-trunc(p/2)) // change the color index values 2167 2096 2168 resultStr = "" 2097 2169 for(ii=0;ii<num;ii+=1) 2098 2170 sprintf tmpStr,"\\f01\\K(52428,1,1)%s\\K(0,0,0)\\f00* Matches file: \\f01%s\\f00 | \\K(52428,1,1)\\f01%s\\f00\\K(0,0,0)%s\r",(tw[row])[0,numChars-1],samfile[matchRows[ii]],(sw[matchRows[ii]])[0,numchars-1],(sw[matchRows[ii]])[numchars,59] 2099 2171 resultStr += tmpStr 2172 listWave[ii][1] = (tw[row])[0,numChars-1] + "*" + (tw[row])[numChars,59] 2173 listWave[ii][2] = samfile[matchRows[ii]] 2174 listWave[ii][3] = (sw[matchRows[ii]])[0,numchars-1] + (sw[matchRows[ii]])[numchars,59] // ?? 2100 2175 endfor 2101 2176
Note: See TracChangeset
for help on using the changeset viewer.