Changeset 747
- Timestamp:
- Sep 23, 2010 3:11:58 PM (12 years ago)
- Location:
- sans/Dev/trunk/NCNR_User_Procedures
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
sans/Dev/trunk/NCNR_User_Procedures/Analysis/Packages/Wrapper_v40.ipf
r743 r747 1370 1370 return(0) 1371 1371 endif 1372 1373 //if in 2D mode, just exit 1374 ControlInfo/W=WrapperPanel check_3 1375 if(V_Value == 1) 1376 return (0) 1377 endif 1372 1378 1373 1379 String ciStr = CsrInfo(A , topGraph) … … 1402 1408 endif 1403 1409 1404 HideInfo 1410 HideInfo/W=$topGraph 1405 1411 Cursor/K A 1406 1412 Cursor/K B -
sans/Dev/trunk/NCNR_User_Procedures/Common/Packages/PlotManager/PlotUtils2D_v40.ipf
r708 r747 18 18 // -- subject to change -- 19 19 // 20 // look for either the old-style 3-column (no resolution information) or the newer 8-column format 20 21 Proc LoadQxQy() 21 22 … … 28 29 String n0,n1,n2,n3,n4,n5,n6,n7 29 30 30 // put the names of the three loaded waves into local names 31 n0 = StringFromList(0, S_waveNames ,";" ) 32 n1 = StringFromList(1, S_waveNames ,";" ) 33 n2 = StringFromList(2, S_waveNames ,";" ) 34 n3 = StringFromList(3, S_waveNames ,";" ) 35 n4 = StringFromList(4, S_waveNames ,";" ) 36 n5 = StringFromList(5, S_waveNames ,";" ) 37 n6 = StringFromList(6, S_waveNames ,";" ) 38 n7 = StringFromList(7, S_waveNames ,";" ) 39 40 //remove the semicolon AND period from files from the VAX 41 w0 = CleanupName((S_fileName + "_qx"),0) 42 w1 = CleanupName((S_fileName + "_qy"),0) 43 w2 = CleanupName((S_fileName + "_i"),0) 44 w3 = CleanupName((S_fileName + "_iErr"),0) 45 w4 = CleanupName((S_fileName + "_qz"),0) 46 w5 = CleanupName((S_fileName + "_sQpl"),0) 47 w6 = CleanupName((S_fileName + "_sQpp"),0) 48 w7 = CleanupName((S_fileName + "_fs"),0) 49 50 String baseStr=w1[0,strlen(w1)-4] 51 if(DataFolderExists("root:"+baseStr)) 52 DoAlert 1,"The file "+S_filename+" has already been loaded. Do you want to load the new data file, overwriting the data in memory?" 53 if(V_flag==2) //user selected No, don't load the data 54 SetDataFolder root: 55 KillWaves $n0,$n1,$n2,$n3,$n4,$n5,$n6,$n7 // kill the default waveX that were loaded 56 return //quits the macro 57 endif 58 SetDataFolder $("root:"+baseStr) 59 else 60 NewDataFolder/S $("root:"+baseStr) 61 endif 62 63 //read in the 18 lines of header (18th line starts w/ ASCII... 19th line is blank) 64 Make/O/T/N=18 header 65 Variable refnum,ii 66 string tmpStr="" 67 Open/R refNum as (path+filename) 68 ii=0 69 do 70 tmpStr = "" 71 FReadLine refNum, tmpStr 72 header[ii] = tmpStr 73 ii+=1 74 while(ii < 18) 75 Close refnum 76 77 // ? parse to get nice variable names? put these in a structure just for fun? 78 79 80 ////overwrite the existing data, if it exists 81 Duplicate/O $("root:"+n0), $w0 82 Duplicate/O $("root:"+n1), $w1 83 Duplicate/O $("root:"+n2), $w2 84 Duplicate/O $("root:"+n3), $w3 85 Duplicate/O $("root:"+n4), $w4 86 Duplicate/O $("root:"+n5), $w5 87 Duplicate/O $("root:"+n6), $w6 88 Duplicate/O $("root:"+n7), $w7 31 if(numCols == 8) 32 // put the names of the 8 loaded waves into local names 33 n0 = StringFromList(0, S_waveNames ,";" ) 34 n1 = StringFromList(1, S_waveNames ,";" ) 35 n2 = StringFromList(2, S_waveNames ,";" ) 36 n3 = StringFromList(3, S_waveNames ,";" ) 37 n4 = StringFromList(4, S_waveNames ,";" ) 38 n5 = StringFromList(5, S_waveNames ,";" ) 39 n6 = StringFromList(6, S_waveNames ,";" ) 40 n7 = StringFromList(7, S_waveNames ,";" ) 41 42 //remove the semicolon AND period from file names 43 w0 = CleanupName((S_fileName + "_qx"),0) 44 w1 = CleanupName((S_fileName + "_qy"),0) 45 w2 = CleanupName((S_fileName + "_i"),0) 46 w3 = CleanupName((S_fileName + "_iErr"),0) 47 w4 = CleanupName((S_fileName + "_qz"),0) 48 w5 = CleanupName((S_fileName + "_sQpl"),0) 49 w6 = CleanupName((S_fileName + "_sQpp"),0) 50 w7 = CleanupName((S_fileName + "_fs"),0) 51 52 String baseStr=w1[0,strlen(w1)-4] 53 if(DataFolderExists("root:"+baseStr)) 54 DoAlert 1,"The file "+S_filename+" has already been loaded. Do you want to load the new data file, overwriting the data in memory?" 55 if(V_flag==2) //user selected No, don't load the data 56 SetDataFolder root: 57 KillWaves/Z $n0,$n1,$n2,$n3,$n4,$n5,$n6,$n7 // kill the default waveX that were loaded 58 return //quits the macro 59 endif 60 SetDataFolder $("root:"+baseStr) 61 else 62 NewDataFolder/S $("root:"+baseStr) 63 endif 64 65 //read in the 18 lines of header (18th line starts w/ ASCII... 19th line is blank) 66 Make/O/T/N=18 header 67 Variable refnum,ii 68 string tmpStr="" 69 Open/R refNum as (path+filename) 70 ii=0 71 do 72 tmpStr = "" 73 FReadLine refNum, tmpStr 74 header[ii] = tmpStr 75 ii+=1 76 while(ii < 18) 77 Close refnum 78 79 ////overwrite the existing data, if it exists 80 Duplicate/O $("root:"+n0), $w0 81 Duplicate/O $("root:"+n1), $w1 82 Duplicate/O $("root:"+n2), $w2 83 Duplicate/O $("root:"+n3), $w3 84 Duplicate/O $("root:"+n4), $w4 85 Duplicate/O $("root:"+n5), $w5 86 Duplicate/O $("root:"+n6), $w6 87 Duplicate/O $("root:"+n7), $w7 88 89 endif //8-columns 90 91 if(numCols == 3) 92 // put the names of the 3 loaded waves into local names 93 n0 = StringFromList(0, S_waveNames ,";" ) 94 n1 = StringFromList(1, S_waveNames ,";" ) 95 n2 = StringFromList(2, S_waveNames ,";" ) 96 97 //remove the semicolon AND period from file names 98 w0 = CleanupName((S_fileName + "_qx"),0) 99 w1 = CleanupName((S_fileName + "_qy"),0) 100 w2 = CleanupName((S_fileName + "_i"),0) 101 102 String baseStr=w1[0,strlen(w1)-4] 103 if(DataFolderExists("root:"+baseStr)) 104 DoAlert 1,"The file "+S_filename+" has already been loaded. Do you want to load the new data file, overwriting the data in memory?" 105 if(V_flag==2) //user selected No, don't load the data 106 SetDataFolder root: 107 KillWaves/Z $n0,$n1,$n2 // kill the default waveX that were loaded 108 return //quits the macro 109 endif 110 SetDataFolder $("root:"+baseStr) 111 else 112 NewDataFolder/S $("root:"+baseStr) 113 endif 114 115 //read in the 18 lines of header (18th line starts w/ ASCII... 19th line is blank) 116 Make/O/T/N=18 header 117 Variable refnum,ii 118 string tmpStr="" 119 Open/R refNum as (path+filename) 120 ii=0 121 do 122 tmpStr = "" 123 FReadLine refNum, tmpStr 124 header[ii] = tmpStr 125 ii+=1 126 while(ii < 18) 127 Close refnum 128 129 ////overwrite the existing data, if it exists 130 Duplicate/O $("root:"+n0), $w0 131 Duplicate/O $("root:"+n1), $w1 132 Duplicate/O $("root:"+n2), $w2 133 134 endif //3-columns 135 136 137 /// do this for all 2D data, whether or not resolution information was read in 89 138 90 139 Variable/G gIsLogScale = 0 … … 101 150 SetDataFolder root: 102 151 KillWaves/Z $n0,$n1,$n2,$n3,$n4,$n5,$n6,$n7 152 103 153 EndMacro 104 154 -
sans/Dev/trunk/NCNR_User_Procedures/Reduction/SANS/WriteQIS.ipf
r708 r747 641 641 642 642 // NEW additions - May 2009 643 //ASCII export of data as 7-columns qx-qy-Intensity-qz-sigmaQ_parall-sigmaQ_perp-fShad 644 //limited header information? 645 // 646 // *** DEC 2009 *** 647 // Removed the SAVE of the 2D resolution waves - I'm not sure they are correct. Can't verify the 648 // smearing of the 2D data yet. For a future minor release... 649 // -- when the Qz and resolution are written, be sure to change the tw[15] in the header back to the 650 // proper labels 643 //ASCII export of data as 8-columns qx-qy-Intensity-err-qz-sigmaQ_parall-sigmaQ_perp-fShad 644 // + limited header information 645 // 651 646 // - May 2010: 652 647 // now the smearing is correct, and is now defined in terms of Q_parallel and Q_perpendicular … … 856 851 #endif 857 852 858 KillWaves/Z qx_val_s,qy_val_s,z_val_s,qz_val_s,SigmaQx_s,SigmaQy_s,fSubS_s 853 KillWaves/Z qx_val_s,qy_val_s,z_val_s,qz_val_s,SigmaQx_s,SigmaQy_s,fSubS_s,sw,sw_s,proto 859 854 860 855 Killwaves/Z spWave,labelWave,qx_val,qy_val,z_val,qval,qz_val,sigmaQx,SigmaQy,fSubS,phi,r_dist
Note: See TracChangeset
for help on using the changeset viewer.