- Timestamp:
- Jul 6, 2010 5:17:53 PM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sans/Dev/trunk/NCNR_User_Procedures/Reduction/SANS/NSORT.ipf
r700 r715 1457 1457 1458 1458 //lowQ menu 1459 absStr = pref+ ThreeDigitString(low)+ext1459 absStr = pref+RunDigitString(low)+ext 1460 1460 popNum = WhichListItem(absStr,lowQPopStr,";",0) 1461 1461 if(popNum == -1) … … 1466 1466 1467 1467 //medQ (a different list for the popup) 1468 absStr = pref+ ThreeDigitString(med)+ext1468 absStr = pref+RunDigitString(med)+ext 1469 1469 popNum = WhichListItem(absStr,medHiQPopStr,";",0) 1470 1470 if(popNum == -1) … … 1477 1477 //highQ (same pop list as medQ) 1478 1478 if(hi != 0) 1479 absStr = pref+ ThreeDigitString(hi)+ext1479 absStr = pref+RunDigitString(hi)+ext 1480 1480 popNum = WhichListItem(absStr,medHiQPopStr,";",0) 1481 1481 if(popNum == -1) … … 1487 1487 PopupMenu popup_3,win=NSORT_Panel,mode=(1) 1488 1488 endif 1489 End1490 1491 //make a three character string of the run number1492 Function/S ThreeDigitString(num)1493 Variable num1494 1495 String numStr=""1496 if(num<10)1497 numStr = "00"+num2str(num)1498 else1499 if(num<100)1500 numStr = "0"+num2str(num)1501 else1502 numStr = num2str(num)1503 Endif1504 Endif1505 //Print "numstr = ",numstr1506 return(numstr)1507 1489 End 1508 1490 … … 1864 1846 end 1865 1847 1866 //given a filename of a SANS data filename of the form1867 //TTTTTnnn.SAn_TTT_Txxx1868 //returns the prefix "TTTTT" as some number of characters1869 //returns "" as an invalid file prefix1870 //1871 // NCNR-specifc, does not really belong here - but it's a beta procedure anyhow...1872 //1873 Function/S GetPrefixStrFromFile(item)1874 String item1875 String invalid = "" //"" is not a valid run prefix, since it's text1876 Variable num=-11877 1878 //find the "dot"1879 String runStr=""1880 Variable pos = strsearch(item,".",0)1881 if(pos == -1)1882 //"dot" not found1883 return (invalid)1884 else1885 //found, skip the three characters preceeding it1886 if (pos <=3)1887 //not enough characters1888 return (invalid)1889 else1890 runStr = item[0,pos-4]1891 return (runStr)1892 Endif1893 Endif1894 End1895 1848 1896 1849 ////////////////////////
Note: See TracChangeset
for help on using the changeset viewer.