- Timestamp:
- Oct 23, 2008 5:39:12 PM (14 years ago)
- Location:
- sans/Dev/trunk/NCNR_User_Procedures
- Files:
-
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
sans/Dev/trunk/NCNR_User_Procedures/Common/Packages/PlotManager/PlotUtilsMacro_v40.ipf
r427 r431 77 77 //Running from SANS Analysis 78 78 Variable dQv = root:Packages:NIST:USANS_dQv 79 else 80 //running from somewhere else, probably SANS Reduction, which uses common loaders 81 Variable/G root:Packages:NIST:USANS_dQv = 0.117 79 82 endif 80 83 -
sans/Dev/trunk/NCNR_User_Procedures/Reduction/SANS/FIT_Ops.ipf
r412 r431 147 147 tempName = S_path + tempName 148 148 149 //load in the data (into the root directory)150 LoadOneDDataWithName(tempName)149 //load in the data (into the its own folder) 150 A_LoadOneDDataWithName(tempName,0) 151 151 //Print S_fileName 152 152 //Print tempName 153 153 154 String cleanLastFileName = "root:"+CleanupName(root:myGlobals:gLastFileName,0)155 156 tempName= cleanLastFileName+"_q"157 Duplicate/O $ tempNamexAxisWave158 tempName=cleanLastFileName+"_i"159 Duplicate/O $ tempNameyAxisWave160 tempName=cleanLastFileName+"_s"161 Duplicate/O $ tempNameyErrWave154 String cleanLastFileName = CleanupName(root:Packages:NIST:gLastFileName,0) 155 156 tempName="root:"+cleanLastFileName+":"+cleanLastFileName 157 Duplicate/O $(tempName+"_q") xAxisWave 158 //tempName=cleanLastFileName+"_i" 159 Duplicate/O $(tempName+"_i") yAxisWave 160 //tempName=cleanLastFileName+"_s" 161 Duplicate/O $(tempName+"_s") yErrWave 162 162 163 163 //Plot, and adjust the scaling to match the axis scaling set by the popups … … 248 248 //get the filename from the global as it's loaded, rather from the popup - as version numbers 249 249 // do cause problems here. This global is also used later in this function 250 SVAR gLastFileName = root:myGlobals:gLastFileName 251 252 Wave xw = $( CleanupName((gLastFileName + "_q"),0) ) 253 Wave yw = $( CleanupName((gLastFileName + "_i"),0) ) 254 Wave ew = $( CleanupName((gLastFileName + "_s"),0) ) 250 SVAR gLastFileName = root:Packages:NIST:gLastFileName 251 String tempStr = CleanupName(gLastFileName,0) 252 String tempName = "root:"+tempStr+":"+tempStr 253 254 Wave xw = $(tempName+"_q") 255 Wave yw = $(tempName+"_i") 256 Wave ew = $(tempName+"_s") 255 257 256 258 //variables set for each model to control look of graph … … 522 524 //ystr and xstr are the axis strings - filter with a do-loop 523 525 String ystr="",xstr="" 524 SVAR gLastFileName = root: myGlobals:gLastFileName526 SVAR gLastFileName = root:Packages:NIST:gLastFileName 525 527 SVAR aStr = root:myGlobals:gAngstStr 526 528 String tmpStr = CleanupName(gLastFileName,0) 527 529 //ControlInfo/W=FitPanel ywave 528 Wave xw = $( CleanupName((gLastFileName + "_q"),0))530 Wave xw = $("root:"+tmpStr+":"+tmpStr+"_q") 529 531 ControlInfo/W=FitPanel yModel 530 532 ystr = S_Value … … 841 843 String ctrlName 842 844 // 843 String cleanLastFileName = "root:"+CleanupName(root:myGlobals:gLastFileName,0) 844 String tempName 845 846 tempName=cleanLastFileName+"_q" 847 Duplicate/O $tempName xAxisWave 848 tempName=cleanLastFileName+"_i" 849 Duplicate/O $tempName yAxisWave 850 tempName=cleanLastFileName+"_s" 851 Duplicate/O $tempName yErrWave 852 Duplicate/O $tempName yWtWave 853 Duplicate/O $tempName residWave 845 String cleanLastFileName = CleanupName(root:Packages:NIST:gLastFileName,0) 846 String tmpStr = "root:"+cleanLastFileName+":"+cleanLastFileName 847 848 Duplicate/O $(tmpStr+"_q") xAxisWave 849 Duplicate/O $(tmpStr+"_i") yAxisWave 850 Duplicate/O $(tmpStr+"_s") yErrWave,yWtWave,residWave 851 854 852 yWtWave = 1/yErrWave 855 853 … … 1028 1026 1029 1027 //load in the data (into the root directory) 1030 LoadOneDDataWithName(tempName)1028 A_LoadOneDDataWithName(tempName,0) 1031 1029 //Print S_fileName 1032 1030 //Print tempName 1033 1031 1034 String cleanLastFileName = "root:"+CleanupName(root:myGlobals:gLastFileName,0) 1035 1036 tempName=cleanLastFileName+"_q" 1037 Duplicate/o $tempName xAxisWave 1038 tempName=cleanLastFileName+"_i" 1039 Duplicate/o $tempName yAxisWave 1040 tempName=cleanLastFileName+"_s" 1041 Duplicate/o $tempName yErrWave 1032 String cleanLastFileName = CleanupName(root:Packages:NIST:gLastFileName,0) 1033 String tmpStr = "root:"+cleanLastFileName+":"+cleanLastFileName 1034 1035 Duplicate/o $(tmpStr+"_q") xAxisWave 1036 Duplicate/o $(tmpStr+"_i") yAxisWave 1037 Duplicate/o $(tmpStr+"_s") yErrWave 1038 1042 1039 Variable xmin, xmax 1043 1040 WaveStats/Q xAxisWave -
sans/Dev/trunk/NCNR_User_Procedures/Reduction/SANS/Includes_v510.ipf
r429 r431 56 56 #include "MultScatter_MonteCarlo_2D" //Oct 2008 SRK for SASCALC simulation 57 57 58 #include "PlotManager_v40" //Oct 2008 as part of unifying the loading routines 59 #include "NIST_XML_v40" // - creates a cascade of dependencies to load files 60 #include "cansasXML_v11" 61 #include "GaussUtils_v40" 62 #include "USANS_SlitSmearing_v40" 63 58 64 // to include the analysis packages, uncomment the following 59 65 // include statement and click "compile" at the bottom of this window. -
sans/Dev/trunk/NCNR_User_Procedures/Reduction/SANS/MaskUtils.ipf
r418 r431 156 156 if(WaveExists($maskPath) == 1) 157 157 //duplicate the mask, which is named "data" 158 Duplicate/O root: MSK:data root:MSK:overlay159 Redimension/D root: MSK:overlay158 Duplicate/O root:Packages:NIST:MSK:data root:Packages:NIST:MSK:overlay 159 Redimension/D root:Packages:NIST:MSK:overlay 160 160 161 161 String tempStr = "root:Packages:NIST:MSK:overlay" -
sans/Dev/trunk/NCNR_User_Procedures/Reduction/SANS/MultScatter_MonteCarlo_2D.ipf
r430 r431 227 227 // DONE = 1 228 228 // phi and theta are random over the entire sphere of scattering 229 // !can't just choose random theta and phi, won't be random over sphere solid angle 229 230 230 231 ran = abs(enoise(1)) //[0,1] 231 theta = pi*ran232 theta = acos(2*ran-1) 232 233 233 234 ran = abs(enoise(1)) //[0,1] -
sans/Dev/trunk/NCNR_User_Procedures/Reduction/SANS/SASCALC.ipf
r430 r431 790 790 Duplicate/O aveint,$("aveint_"+num2str(ct)) 791 791 Duplicate/O qval,$("qval_"+num2str(ct)) 792 Duplicate/O sigave,$("sigave_"+num2str(ct)) 792 793 Appendtograph $("aveint_"+num2str(ct)) vs $("qval_"+num2str(ct)) 793 794 ModifyGraph mode=3 794 795 ModifyGraph marker=19 796 ModifyGraph msize($("aveint_"+num2str(ct)))=2 797 ErrorBars/T=0 $("aveint_"+num2str(ct)) Y,wave=($("sigave_"+num2str(ct)),$("sigave_"+num2str(ct))) 798 795 799 switch(mod(ct,10)) // 10 different colors - black is the unfrozen color 796 800 case 0: -
sans/Dev/trunk/NCNR_User_Procedures/Reduction/SANS/WorkFileUtils.ipf
r418 r431 985 985 //String str = "AAA;BBB;CCC;DDD;EEE;FFF;GGG;" 986 986 String str = "File_1;File_2;Result;" 987 NewDataFolder/O/S root: myGlobals:WorkMath987 NewDataFolder/O/S root:Packages:NIST:WorkMath 988 988 String/G gFolderList=str 989 989 Variable ii=0,num=itemsinlist(str) … … 1015 1015 1016 1016 String str1,str2,oper,dest = "Result" 1017 String pathStr,workMathStr=" myGlobals:WorkMath:"1017 String pathStr,workMathStr="WorkMath:" 1018 1018 1019 1019 //get the panel selections (these are the names of the files on disk) … … 1033 1033 1034 1034 //constants from globals 1035 NVAR const1=root: myGlobals:WorkMath:const11036 NVAR const2=root: myGlobals:WorkMath:const21035 NVAR const1=root:Packages:NIST:WorkMath:const1 1036 NVAR const2=root:Packages:NIST:WorkMath:const2 1037 1037 Printf "(%g)%s %s (%g)%s = %s\r", const1,str1,oper,const2,str2,dest 1038 1038 //check for proper folders (all 3 must be different) … … 1042 1042 Load_NamedASC_File(pathStr+str1,workMathStr+"File_1") 1043 1043 1044 NVAR pixelsX = root:myGlobals:gNPixelsX 1044 NVAR pixelsX = root:myGlobals:gNPixelsX //OK, location is correct 1045 1045 NVAR pixelsY = root:myGlobals:gNPixelsY 1046 1046 1047 1047 WAVE/Z data1=$("root:Packages:NIST:"+workMathStr+"File_1:data") 1048 1048 If(cmpstr(str2,"UNIT MATRIX")==0) 1049 Make/O/N=(pixelsX,pixelsY) root: myGlobals:WorkMath:data //don't put in File_2 folder1050 Wave/Z data2 = root: myGlobals:WorkMath:data //it's not real data!1049 Make/O/N=(pixelsX,pixelsY) root:Packages:NIST:WorkMath:data //don't put in File_2 folder 1050 Wave/Z data2 = root:Packages:NIST:WorkMath:data //it's not real data! 1051 1051 data2=1 1052 1052 else … … 1100 1100 //wipe out the data folder of globals 1101 1101 SVAR dataType=root:myGlobals:gDataDisplayType 1102 if(strsearch(dataType, " myGlobals", 0 ) != -1) //kill the SANS_Data graph if needed1102 if(strsearch(dataType, "WorkMath", 0 ) != -1) //kill the SANS_Data graph if needed 1103 1103 DoWindow/K SANS_Data 1104 1104 Endif 1105 KillDataFolder root: myGlobals:WorkMath1105 KillDataFolder root:Packages:NIST:WorkMath 1106 1106 End 1107 1107 … … 1114 1114 1115 1115 String destStr="" 1116 SVAR folderList=root: myGlobals:WorkMath:gFolderList1116 SVAR folderList=root:Packages:NIST:WorkMath:gFolderList 1117 1117 Prompt destStr,"Select the destination folder",popup,folderList 1118 1118 DoPrompt "Folder for ASC Load",destStr … … 1122 1122 Endif 1123 1123 1124 String destFolder = " myGlobals:WorkMath:"+destStr1124 String destFolder = "WorkMath:"+destStr 1125 1125 1126 1126 Load_ASC_File("Pick the ASC file",destFolder) … … 1139 1139 String popStr 1140 1140 1141 String folder=" myGlobals:WorkMath:",pathStr,str11141 String folder="WorkMath:",pathStr,str1 1142 1142 1143 1143 PathInfo catPathName … … 1192 1192 Button button3,help={"Show help file for math operations on 2-D data sets"} 1193 1193 SetVariable setvar0,pos={9,46},size={70,15},title=" " 1194 SetVariable setvar0,limits={-Inf,Inf,0},value= root: myGlobals:WorkMath:const11194 SetVariable setvar0,limits={-Inf,Inf,0},value= root:Packages:NIST:WorkMath:const1 1195 1195 SetVariable setvar0,help={"Multiplicative constant for the first dataset"} 1196 1196 PopupMenu popup0,pos={89,44},size={84,20},title="X " … … 1204 1204 PopupMenu popup2,help={"Selects the mathematical operator"} 1205 1205 SetVariable setvar1,pos={13,139},size={70,15},title=" " 1206 SetVariable setvar1,limits={-Inf,Inf,0},value= root: myGlobals:WorkMath:const21206 SetVariable setvar1,limits={-Inf,Inf,0},value= root:Packages:NIST:WorkMath:const2 1207 1207 SetVariable setvar1,help={"Multiplicative constant for the second dataset"} 1208 1208 // PopupMenu popup3,pos={27,167},size={124,20},title=" = Destination" 1209 // PopupMenu popup3,mode=1,popvalue="Destination",value= root: myGlobals:WorkMath:gFolderList1209 // PopupMenu popup3,mode=1,popvalue="Destination",value= root:Packages:NIST:WorkMath:gFolderList 1210 1210 // PopupMenu popup3,help={"Selects the destination folder"} 1211 1211 PopupMenu popup4,pos={55,204},size={103,20},proc=WorkMath_Display_PopMenuProc,title="Display" … … 1240 1240 //fileStr must be the FULL path and filename on disk 1241 1241 //destFolder is the path to the Igor folder where the data is to be deposited 1242 // - " myGlobals:WorkMath:File_1" for example, compatible with SANS_Data display type1242 // - "Packages:NIST:WorkMath:File_1" for example, compatible with SANS_Data display type 1243 1243 // 1244 1244 Function Load_NamedASC_File(fileStr,destFolder)
Note: See TracChangeset
for help on using the changeset viewer.