Changeset 1016 for sans/Dev/trunk/NCNR_User_Procedures/Reduction/SANS
- Timestamp:
- Nov 4, 2016 2:26:28 PM (6 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/MaskUtils.ipf
r665 r1016 62 62 Killwaves/Z data,data0 //kill the old data, if it exists 63 63 64 // String cmd = "GBLoadWave/N=data/T={72,72}/O/S=4/W=1/U=16384 /Q \"" + fname +"\"" 65 String cmd = "GBLoadWave/N=data/T={72,72}/O/S=4/W=1/U=" 66 cmd += num2istr(pixelsX*pixelsY) + " /Q \"" + fname +"\"" 67 64 // String cmd = "GBLoadWave/N=data/T={72,72}/O/S=4/W=1/U=" 65 // cmd += num2istr(pixelsX*pixelsY) + " /Q \"" + fname +"\"" 66 67 String cmd = "GBLoadWave/N=data/T={72,72}/O/S=4/W=1/P=catPathName/U=" 68 cmd += num2istr(pixelsX*pixelsY) + " /Q \"" + ParseFilePath(0, fname, ":", 1, 0) +"\"" 69 68 70 Execute cmd 69 71 SetDataFolder root:Packages:NIST:MSK //make sure correct data folder is set … … 396 398 SetDataFolder root:myGlobals:DrawMask 397 399 Killwaves/Z data,data0,tempMask //kill the old data, if it exists 398 // String cmd = "GBLoadWave/N=data/T={72,72}/O/S=4/W=1/U=16384 /Q \"" + fname +"\"" 399 String cmd = "GBLoadWave/N=data/T={72,72}/O/S=4/W=1/U=" 400 cmd += num2istr(pixelsX*pixelsY) + " /Q \"" + fname +"\"" 401 400 401 // String cmd = "GBLoadWave/N=data/T={72,72}/O/S=4/W=1/U=" 402 // cmd += num2istr(pixelsX*pixelsY) + " /Q \"" + fname +"\"" 403 404 String cmd = "GBLoadWave/N=data/T={72,72}/O/S=4/W=1/P=catPathName/U=" 405 cmd += num2istr(pixelsX*pixelsY) + " /Q \"" + ParseFilePath(0, fname, ":", 1, 0) +"\"" 406 402 407 Execute cmd 403 408 SetDataFolder root:myGlobals:DrawMask //make sure correct data folder is set -
sans/Dev/trunk/NCNR_User_Procedures/Reduction/SANS/NCNR_DataReadWrite.ipf
r947 r1016 244 244 //FBinRead Cannot handle 32 bit VAX floating point 245 245 //GBLoadWave, however, can properly read it 246 String GBLoadStr="GBLoadWave/O/N=tempGBwave/T={2,2}/J=2/W=1/Q "246 String GBLoadStr="GBLoadWave/O/N=tempGBwave/T={2,2}/J=2/W=1/Q/P=catPathName" 247 247 String strToExecute 248 248 //append "/S=offset/U=numofreals" to control the read … … 255 255 256 256 // 4 R*4 values 257 strToExecute = GBLoadStr + "/S=39/U=4" + "\"" + fname+ "\""257 strToExecute = GBLoadStr + "/S=39/U=4" + "\"" + ParseFilePath(0, fname, ":", 1, 0) + "\"" 258 258 Execute strToExecute 259 259 Wave w=$"root:Packages:NIST:RAW:tempGBWave0" … … 264 264 // 4 R*4 values 265 265 SetDataFolder curPath 266 strToExecute = GBLoadStr + "/S=158/U=4" + "\"" + fname+ "\""266 strToExecute = GBLoadStr + "/S=158/U=4" + "\"" + ParseFilePath(0, fname, ":", 1, 0) + "\"" 267 267 Execute strToExecute 268 268 b=4 … … 273 273 // 2 R*4 values 274 274 SetDataFolder curPath 275 strToExecute = GBLoadStr + "/S=186/U=2" + "\"" + fname+ "\""275 strToExecute = GBLoadStr + "/S=186/U=2" + "\"" + ParseFilePath(0, fname, ":", 1, 0) + "\"" 276 276 Execute strToExecute 277 277 b=2 … … 281 281 // 6 R*4 values 282 282 SetDataFolder curPath 283 strToExecute = GBLoadStr + "/S=220/U=6" + "\"" + fname+ "\""283 strToExecute = GBLoadStr + "/S=220/U=6" + "\"" + ParseFilePath(0, fname, ":", 1, 0) + "\"" 284 284 Execute strToExecute 285 285 b=6 … … 289 289 // 13 R*4 values 290 290 SetDataFolder curPath 291 strToExecute = GBLoadStr + "/S=252/U=13" + "\"" + fname+ "\""291 strToExecute = GBLoadStr + "/S=252/U=13" + "\"" + ParseFilePath(0, fname, ":", 1, 0) + "\"" 292 292 Execute strToExecute 293 293 b=13 … … 297 297 // 3 R*4 values 298 298 SetDataFolder curPath 299 strToExecute = GBLoadStr + "/S=320/U=3" + "\"" + fname+ "\""299 strToExecute = GBLoadStr + "/S=320/U=3" + "\"" + ParseFilePath(0, fname, ":", 1, 0) + "\"" 300 300 Execute strToExecute 301 301 b=3 … … 305 305 // 7 R*4 values 306 306 SetDataFolder curPath 307 strToExecute = GBLoadStr + "/S=348/U=7" + "\"" + fname+ "\""307 strToExecute = GBLoadStr + "/S=348/U=7" + "\"" + ParseFilePath(0, fname, ":", 1, 0) + "\"" 308 308 Execute strToExecute 309 309 b=7 … … 313 313 // 4 R*4 values 314 314 SetDataFolder curPath 315 strToExecute = GBLoadStr + "/S=388/U=4" + "\"" + fname+ "\""315 strToExecute = GBLoadStr + "/S=388/U=4" + "\"" + ParseFilePath(0, fname, ":", 1, 0) + "\"" 316 316 Execute strToExecute 317 317 b=4 … … 321 321 // 2 R*4 values 322 322 SetDataFolder curPath 323 strToExecute = GBLoadStr + "/S=450/U=2" + "\"" + fname+ "\""323 strToExecute = GBLoadStr + "/S=450/U=2" + "\"" + ParseFilePath(0, fname, ":", 1, 0) + "\"" 324 324 Execute strToExecute 325 325 b=2 … … 329 329 // 2 R*4 values 330 330 SetDataFolder curPath 331 strToExecute = GBLoadStr + "/S=470/U=2" + "\"" + fname+ "\""331 strToExecute = GBLoadStr + "/S=470/U=2" + "\"" + ParseFilePath(0, fname, ":", 1, 0) + "\"" 332 332 Execute strToExecute 333 333 b=2 … … 337 337 // 5 R*4 values 338 338 SetDataFolder curPath 339 strToExecute = GBLoadStr + "/S=494/U=5" + "\"" + fname+ "\""339 strToExecute = GBLoadStr + "/S=494/U=5" + "\"" + ParseFilePath(0, fname, ":", 1, 0) + "\"" 340 340 Execute strToExecute 341 341 b=5 … … 358 358 SetDataFolder curPath 359 359 //read in the data 360 strToExecute = "GBLoadWave/O/N=tempGBwave/B/T={16,2}/S=514/Q " + "\"" + fname+ "\""360 strToExecute = "GBLoadWave/O/N=tempGBwave/B/T={16,2}/S=514/Q/P=catPathName" + "\"" + ParseFilePath(0, fname, ":", 1, 0) + "\"" 361 361 Execute strToExecute 362 362 … … 652 652 //FBinRead Cannot handle 32 bit VAX floating point 653 653 //GBLoadWave, however, can properly read it 654 String GBLoadStr="GBLoadWave/O/N=tempGBwave/T={2,2}/J=2/W=1/Q "654 String GBLoadStr="GBLoadWave/O/N=tempGBwave/T={2,2}/J=2/W=1/Q/P=catPathName" 655 655 String strToExecute 656 656 //append "/S=offset/U=numofreals" to control the read … … 662 662 SetDataFolder curPath 663 663 // 4 R*4 values 664 strToExecute = GBLoadStr + "/S=39/U=4" + "\"" + fname+ "\""664 strToExecute = GBLoadStr + "/S=39/U=4" + "\"" + ParseFilePath(0, fname, ":", 1, 0) + "\"" 665 665 Execute strToExecute 666 666 … … 673 673 // 4 R*4 values 674 674 SetDataFolder curPath 675 strToExecute = GBLoadStr + "/S=158/U=4" + "\"" + fname+ "\""675 strToExecute = GBLoadStr + "/S=158/U=4" + "\"" + ParseFilePath(0, fname, ":", 1, 0) + "\"" 676 676 Execute strToExecute 677 677 b=4 … … 682 682 // 2 R*4 values 683 683 SetDataFolder curPath 684 strToExecute = GBLoadStr + "/S=186/U=2" + "\"" + fname+ "\""684 strToExecute = GBLoadStr + "/S=186/U=2" + "\"" + ParseFilePath(0, fname, ":", 1, 0) + "\"" 685 685 Execute strToExecute 686 686 b=2 … … 690 690 // 6 R*4 values 691 691 SetDataFolder curPath 692 strToExecute = GBLoadStr + "/S=220/U=6" + "\"" + fname+ "\""692 strToExecute = GBLoadStr + "/S=220/U=6" + "\"" + ParseFilePath(0, fname, ":", 1, 0) + "\"" 693 693 Execute strToExecute 694 694 b=6 … … 698 698 // 13 R*4 values 699 699 SetDataFolder curPath 700 strToExecute = GBLoadStr + "/S=252/U=13" + "\"" + fname+ "\""700 strToExecute = GBLoadStr + "/S=252/U=13" + "\"" + ParseFilePath(0, fname, ":", 1, 0) + "\"" 701 701 Execute strToExecute 702 702 b=13 … … 706 706 // 3 R*4 values 707 707 SetDataFolder curPath 708 strToExecute = GBLoadStr + "/S=320/U=3" + "\"" + fname+ "\""708 strToExecute = GBLoadStr + "/S=320/U=3" + "\"" + ParseFilePath(0, fname, ":", 1, 0) + "\"" 709 709 Execute strToExecute 710 710 b=3 … … 714 714 // 7 R*4 values 715 715 SetDataFolder curPath 716 strToExecute = GBLoadStr + "/S=348/U=7" + "\"" + fname+ "\""716 strToExecute = GBLoadStr + "/S=348/U=7" + "\"" + ParseFilePath(0, fname, ":", 1, 0) + "\"" 717 717 Execute strToExecute 718 718 b=7 … … 722 722 // 4 R*4 values 723 723 SetDataFolder curPath 724 strToExecute = GBLoadStr + "/S=388/U=4" + "\"" + fname+ "\""724 strToExecute = GBLoadStr + "/S=388/U=4" + "\"" + ParseFilePath(0, fname, ":", 1, 0) + "\"" 725 725 Execute strToExecute 726 726 b=4 … … 730 730 // 2 R*4 values 731 731 SetDataFolder curPath 732 strToExecute = GBLoadStr + "/S=450/U=2" + "\"" + fname+ "\""732 strToExecute = GBLoadStr + "/S=450/U=2" + "\"" + ParseFilePath(0, fname, ":", 1, 0) + "\"" 733 733 Execute strToExecute 734 734 b=2 … … 738 738 // 2 R*4 values 739 739 SetDataFolder curPath 740 strToExecute = GBLoadStr + "/S=470/U=2" + "\"" + fname+ "\""740 strToExecute = GBLoadStr + "/S=470/U=2" + "\"" + ParseFilePath(0, fname, ":", 1, 0) + "\"" 741 741 Execute strToExecute 742 742 b=2 … … 746 746 // 5 R*4 values 747 747 SetDataFolder curPath 748 strToExecute = GBLoadStr + "/S=494/U=5" + "\"" + fname+ "\""748 strToExecute = GBLoadStr + "/S=494/U=5" + "\"" + ParseFilePath(0, fname, ":", 1, 0) + "\"" 749 749 Execute strToExecute 750 750 b=5 … … 766 766 767 767 //read in the data 768 GBLoadStr="GBLoadWave/O/N=tempGBwave/T={2,2}/J=2/W=1/Q "768 GBLoadStr="GBLoadWave/O/N=tempGBwave/T={2,2}/J=2/W=1/Q/P=catPathName" 769 769 770 770 curPath = "root:Packages:NIST:"+cur_folder … … 793 793 SetDataFolder curPath 794 794 795 strToExecute = GBLoadStr + "/S="+num2str(offset)+"/U=511" + "\"" + fname+ "\""795 strToExecute = GBLoadStr + "/S="+num2str(offset)+"/U=511" + "\"" + ParseFilePath(0, fname, ":", 1, 0) + "\"" 796 796 Execute strToExecute 797 797 //Print strToExecute … … 802 802 offset += 511*4 +2 803 803 804 strToExecute = GBLoadStr + "/S="+num2str(offset)+"/U=510" + "\"" + fname+ "\""804 strToExecute = GBLoadStr + "/S="+num2str(offset)+"/U=510" + "\"" + ParseFilePath(0, fname, ":", 1, 0) + "\"" 805 805 SetDataFolder curPath 806 806 Execute strToExecute … … 819 819 // 16336 values have been read in -- 820 820 //read in last 64 values 821 strToExecute = GBLoadStr + "/S="+num2str(offset)+"/U=48" + "\"" + fname+ "\""821 strToExecute = GBLoadStr + "/S="+num2str(offset)+"/U=48" + "\"" + ParseFilePath(0, fname, ":", 1, 0) + "\"" 822 822 823 823 SetDataFolder curPath … … 1496 1496 1497 1497 // read a single real value with GBLoadWave 1498 // SRK 2016 changed to use the path, which may be UNC (that is starting with \\ on windows 10) 1499 // 1500 // 1498 1501 Function getRealValueFromHeader(fname,start) 1499 1502 String fname 1500 1503 Variable start 1501 1504 1502 String GBLoadStr="GBLoadWave/O/N=tempGBwave/T={2,2}/J=2/W=1/Q" 1503 1504 GBLoadStr += "/S="+num2str(start)+"/U=1" + "\"" + fname + "\"" 1505 // original, if fname is the full path:name 1506 // String GBLoadStr="GBLoadWave/O/N=tempGBwave/T={2,2}/J=2/W=1/Q" 1507 // GBLoadStr += "/S="+num2str(start)+"/U=1" + "\"" + fname + "\"" 1508 1509 String GBLoadStr="GBLoadWave/O/N=tempGBwave/T={2,2}/J=2/W=1/Q/P=catPathName" 1510 // String fileOnly = ParseFilePath(0, fname, ":", 1, 0) 1511 GBLoadStr += "/S="+num2str(start)+"/U=1" + "\"" + ParseFilePath(0, fname, ":", 1, 0) + "\"" 1512 1513 1505 1514 Execute GBLoadStr 1506 1515 Wave w=$"tempGBWave0" -
sans/Dev/trunk/NCNR_User_Procedures/Reduction/SANS/NCNR_Utils.ipf
r1003 r1016 990 990 991 991 SetDataFolder root: 992 String GBLoadStr="GBLoadWave/O/N=tempGBwave/T={2,2}/J=2/W=1/Q" 992 // String GBLoadStr="GBLoadWave/O/N=tempGBwave/T={2,2}/J=2/W=1/Q" 993 String GBLoadStr="GBLoadWave/O/N=tempGBwave/T={2,2}/J=2/W=1/Q/P=catPathName" 993 994 String strToExecute="" 994 995 // 1 R*4 value 995 strToExecute = GBLoadStr + "/S=368/U=1" + "\"" + fname + "\"" 996 // strToExecute = GBLoadStr + "/S=368/U=1" + "\"" + fname + "\"" 997 strToExecute = GBLoadStr + "/S=368/U=1" + "\"" + ParseFilePath(0, fname, ":", 1, 0) + "\"" //use the path and just the file name 996 998 Execute strToExecute 997 999 Wave w=$"root:tempGBWave0" -
sans/Dev/trunk/NCNR_User_Procedures/Reduction/SANS/RealTimeUpdate_RT.ipf
r873 r1016 852 852 //FBinRead Cannot handle 32 bit VAX floating point 853 853 //GBLoadWave, however, can properly read it 854 String GBLoadStr="GBLoadWave/O/N=tempGBwave/T={2,2}/J=2/W=1/Q "854 String GBLoadStr="GBLoadWave/O/N=tempGBwave/T={2,2}/J=2/W=1/Q/P=catPathName" 855 855 String strToExecute 856 856 //append "/S=offset/U=numofreals" to control the read … … 863 863 864 864 // 4 R*4 values 865 strToExecute = GBLoadStr + "/S=39/U=4" + "\"" + fname+ "\""865 strToExecute = GBLoadStr + "/S=39/U=4" + "\"" + ParseFilePath(0, fname, ":", 1, 0) + "\"" 866 866 Execute/Z strToExecute 867 867 Wave w=$"root:Packages:NIST:RealTime:tempGBWave0" … … 872 872 // 4 R*4 values 873 873 SetDataFolder curPath 874 strToExecute = GBLoadStr + "/S=158/U=4" + "\"" + fname+ "\""874 strToExecute = GBLoadStr + "/S=158/U=4" + "\"" + ParseFilePath(0, fname, ":", 1, 0) + "\"" 875 875 Execute/Z strToExecute 876 876 b=4 … … 881 881 // 2 R*4 values 882 882 SetDataFolder curPath 883 strToExecute = GBLoadStr + "/S=186/U=2" + "\"" + fname+ "\""883 strToExecute = GBLoadStr + "/S=186/U=2" + "\"" + ParseFilePath(0, fname, ":", 1, 0) + "\"" 884 884 Execute/Z strToExecute 885 885 b=2 … … 889 889 // 6 R*4 values 890 890 SetDataFolder curPath 891 strToExecute = GBLoadStr + "/S=220/U=6" + "\"" + fname+ "\""891 strToExecute = GBLoadStr + "/S=220/U=6" + "\"" + ParseFilePath(0, fname, ":", 1, 0) + "\"" 892 892 Execute/Z strToExecute 893 893 b=6 … … 897 897 // 13 R*4 values 898 898 SetDataFolder curPath 899 strToExecute = GBLoadStr + "/S=252/U=13" + "\"" + fname+ "\""899 strToExecute = GBLoadStr + "/S=252/U=13" + "\"" + ParseFilePath(0, fname, ":", 1, 0) + "\"" 900 900 Execute/Z strToExecute 901 901 b=13 … … 905 905 // 3 R*4 values 906 906 SetDataFolder curPath 907 strToExecute = GBLoadStr + "/S=320/U=3" + "\"" + fname+ "\""907 strToExecute = GBLoadStr + "/S=320/U=3" + "\"" + ParseFilePath(0, fname, ":", 1, 0) + "\"" 908 908 Execute/Z strToExecute 909 909 b=3 … … 913 913 // 7 R*4 values 914 914 SetDataFolder curPath 915 strToExecute = GBLoadStr + "/S=348/U=7" + "\"" + fname+ "\""915 strToExecute = GBLoadStr + "/S=348/U=7" + "\"" + ParseFilePath(0, fname, ":", 1, 0) + "\"" 916 916 Execute/Z strToExecute 917 917 b=7 … … 921 921 // 4 R*4 values 922 922 SetDataFolder curPath 923 strToExecute = GBLoadStr + "/S=388/U=4" + "\"" + fname+ "\""923 strToExecute = GBLoadStr + "/S=388/U=4" + "\"" + ParseFilePath(0, fname, ":", 1, 0) + "\"" 924 924 Execute/Z strToExecute 925 925 b=4 … … 929 929 // 2 R*4 values 930 930 SetDataFolder curPath 931 strToExecute = GBLoadStr + "/S=450/U=2" + "\"" + fname+ "\""931 strToExecute = GBLoadStr + "/S=450/U=2" + "\"" + ParseFilePath(0, fname, ":", 1, 0) + "\"" 932 932 Execute/Z strToExecute 933 933 b=2 … … 937 937 // 2 R*4 values 938 938 SetDataFolder curPath 939 strToExecute = GBLoadStr + "/S=470/U=2" + "\"" + fname+ "\""939 strToExecute = GBLoadStr + "/S=470/U=2" + "\"" + ParseFilePath(0, fname, ":", 1, 0) + "\"" 940 940 Execute/Z strToExecute 941 941 b=2 … … 945 945 // 5 R*4 values 946 946 SetDataFolder curPath 947 strToExecute = GBLoadStr + "/S=494/U=5" + "\"" + fname+ "\""947 strToExecute = GBLoadStr + "/S=494/U=5" + "\"" + ParseFilePath(0, fname, ":", 1, 0) + "\"" 948 948 Execute/Z strToExecute 949 949 b=5 … … 966 966 SetDataFolder curPath 967 967 //read in the data 968 strToExecute = "GBLoadWave/O/N=tempGBwave/B/T={16,2}/S=514/Q " + "\"" + fname+ "\""968 strToExecute = "GBLoadWave/O/N=tempGBwave/B/T={16,2}/S=514/Q/P=catPathName" + "\"" + ParseFilePath(0, fname, ":", 1, 0) + "\"" 969 969 Execute/Z strToExecute 970 970 -
sans/Dev/trunk/NCNR_User_Procedures/Reduction/SANS/Transmission.ipf
r950 r1016 742 742 Variable x1,x2,y1,y2,err,attenEmp,attenSam,empty_ct_err,sam_ct_err,samAttenFactor,empAttenFactor,trans_err 743 743 String suffix = "",pathName,textStr,abortStr,emptyFile,transFile,samFileStr 744 String GBLoadStr="GBLoadWave/O/N=tempGBwave/T={2,2}/J=2/W=1/Q" 745 String strToExecute 744 746 745 747 746 num_t_files = numpnts(T_GFilenames) … … 870 869 Variable x1,x2,y1,y2,err,attenEmp,attenSam,empty_ct_err,sam_ct_err,emp_atten_err,sam_atten_err 871 870 String suffix = "",pathName,textStr,abortStr,emptyFile,transFile,samFileStr 872 String GBLoadStr="GBLoadWave/O/N=tempGBwave/T={2,2}/J=2/W=1/Q" 873 String strToExecute 871 874 872 875 873 num_t_files = numpnts(T_GFilenames) … … 1002 1000 Variable x1,x2,y1,y2,err,attenEmp,attenSam,empty_ct_err,sam_ct_err,emp_atten_err,sam_atten_err 1003 1001 String suffix = "",pathName,textStr,abortStr,emptyFile,transFile,samFileStr 1004 String GBLoadStr="GBLoadWave/O/N=tempGBwave/T={2,2}/J=2/W=1/Q"1005 String strToExecute1006 1002 1007 1003 num_t_files = numpnts(T_GFilenames)
Note: See TracChangeset
for help on using the changeset viewer.