Changeset 239
 Timestamp:
 Jan 14, 2008 5:37:21 PM (15 years ago)
 File:

 1 edited
Legend:
 Unmodified
 Added
 Removed

sans/Analysis/branches/ajj_23APR07/IGOR_Package_Files/Put in User Procedures/SANS_Models_v3.00/USANS_SlitSmearing.ipf
r238 r239 22 22 Variable/G USANS_N=numpnts($(basestr+"_q")) 23 23 Variable/G USANS_dQv = dQv 24 String/G root: myGlobals:USANS_basestr = basestr24 String/G root:Packages:NIST:USANS_basestr = basestr 25 25 26 26 Make/D/O/N=(USANS_N,USANS_N) $(basestr+"_res") … … 32 32 //Variable/G USANS_m = EnterSlope(baseStr) 33 33 Variable/G USANS_m = 4 34 Variable/G USANS_slope_numpnts = 1034 Variable/G USANS_slope_numpnts = 25 35 35 36 36 Print " Calculating Weighting Matrix for USANS Data " … … 82 82 Button button_OK,pos={294,317},size={100,20},title="Accept Slope",font="Geneva" 83 83 Button button_OK,proc=USANS_Slope_ButtonProc 84 //Button button_Cancel,pos={233,317},size={55,20},title="Cancel",font="Geneva"85 //Button button_Cancel,proc=USANS_Slope_ButtonProc84 Button button_SlopeCalc,pos={233,317},size={55,20},title="Calculate Slope",font="Geneva" 85 Button button_SlopeCalc,proc=USANS_Slope_ButtonProc 86 86 SetVariable setvar_numpnts, pos={43,350}, size={150,19}, title="# Points",fSize=13 87 87 SetVariable setvar_numpnts, value= USANS_slope_numpnts … … 95 95 //Print TraceNameList("USANS_Slope#SlopePlot",";",1) 96 96 97 USANS_CalculateSlope(basestr,USANS_slope_numpnts)97 //USANS_CalculateSlope(basestr,USANS_slope_numpnts) 98 98 99 99 PauseForUser USANS_Slope … … 102 102 End 103 103 104 Function USANS_CalculateSlope(basestr, calcpoints)104 Function USANS_CalculateSlope(basestr, nend) 105 105 String basestr 106 Variable calcpoints106 Variable nend 107 107 108 108 Wave iw = $(basestr+"_i") 109 Wave qw = $(basestr+"_ i")110 Wave sw = $(basestr+"_ i")109 Wave qw = $(basestr+"_q") 110 Wave sw = $(basestr+"_s") 111 111 112 112 Variable num_extr=25 113 NVAR nend = USANS_slope_numpnts114 113 // Make extra waves for extrapolation 115 114 // Taken from DSM_SetExtrWaves … … 146 145 extr_hqi=P_coef[0]+P_coef[1]*extr_hqq^P_coef[2] 147 146 147 AppendToGraph/W=USANS_Slope#SlopePlot extr_hqi vs extr_hqq 148 148 149 Printf "Smeared Power law exponent = %g\r",P_coef[2] 149 150 Printf "**** For Desmearing, use a Power law exponent of %5.1f\r",P_coef[2]1 … … 158 159 String ctrlName 159 160 160 NVAR USANS_m 161 SVAR basestr = root:Packages:NIST:USANS_basestr 162 NVAR USANS_m, USANS_slope_numpnts 161 163 162 164 strswitch (ctrlName) … … 165 167 DoWindow/K USANS_Slope 166 168 break 167 case "button_ Cancel":168 DoWindow/K USANS_Slope169 USANS_m = 999169 case "button_SlopeCalc": 170 USANS_m = USANS_CalculateSlope(basestr, USANS_slope_numpnts) 171 ControlUpdate/W=USANS_Slope setvar_Slope 170 172 break 171 173 endswitch … … 177 179 178 180 Variable i,j 179 SVAR USANS_basestr=root: myGlobals:USANS_basestr181 SVAR USANS_basestr=root:Packages:NIST:USANS_basestr 180 182 SetDataFolder $("root:"+USANS_basestr) 181 183 … … 204 206 Variable i,j 205 207 206 SVAR USANS_basestr=root: myGlobals:USANS_basestr208 SVAR USANS_basestr=root:Packages:NIST:USANS_basestr 207 209 SetDataFolder $("root:"+USANS_basestr) 208 210 … … 231 233 Variable i 232 234 233 SVAR USANS_basestr=root: myGlobals:USANS_basestr235 SVAR USANS_basestr=root:Packages:NIST:USANS_basestr 234 236 SetDataFolder $("root:"+USANS_basestr) 235 237 … … 263 265 Variable i 264 266 265 SVAR USANS_basestr=root: myGlobals:USANS_basestr267 SVAR USANS_basestr=root:Packages:NIST:USANS_basestr 266 268 SetDataFolder $("root:"+USANS_basestr) 267 269
Note: See TracChangeset
for help on using the changeset viewer.