Changeset 704 for sans/Dev/trunk/NCNR_User_Procedures
- Timestamp:
- May 4, 2010 10:47:11 AM (13 years ago)
- Location:
- sans/Dev/trunk/NCNR_User_Procedures
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
sans/Dev/trunk/NCNR_User_Procedures/Analysis/Packages/GeneticOptimization/NCNR_GenFitUtils.ipf
r570 r704 180 180 WAVE/Z bar.ffsWaves[0] = fs.resW //will not exist for 3-column data sets 181 181 182 182 183 //need to parse limits, or make up some defaults 183 184 // limits is (n,2) … … 243 244 244 245 Variable t0 = stopMStimer(-2) 245 Variable/G root:num_evals=0 246 Variable/G root:V_chisq,root:V_npnts 247 NVAR chi = root:V_chisq 248 NVAR pt = root:V_npnts 249 NVAR num=root:num_evals 250 246 247 248 249 Variable/G root:num_evals //for my own tracking 250 NVAR num = root:num_evals 251 251 num=0 252 252 … … 278 278 279 279 if(useRes && useCursors) 280 GenCurveFit /STRC=bar /X=bar.x[0] /I=1 /TOL=(kGenOp_tol) /W=trimS /D=fitYw GeneticFit_SmearedModel,bar.y,bar.w,holdStr,limits280 GenCurveFit/MAT /STRC=bar /X=bar.x[0] /I=1 /TOL=(kGenOp_tol) /W=trimS /D=fitYw GeneticFit_SmearedModel,bar.y,bar.w,holdStr,limits 281 281 break 282 282 endif 283 283 if(useRes) 284 GenCurveFit /STRC=bar /X=bar.x[0] /I=1 /TOL=(kGenOp_tol) /W=sw /D=fitYw GeneticFit_SmearedModel,bar.y,bar.w,holdStr,limits284 GenCurveFit/MAT /STRC=bar /X=bar.x[0] /I=1 /TOL=(kGenOp_tol) /W=sw /D=fitYw GeneticFit_SmearedModel,bar.y,bar.w,holdStr,limits 285 285 break 286 286 endif … … 288 288 //no resolution 289 289 if(!useRes && useCursors) 290 GenCurveFit /STRC=bar /X=bar.x[0] /I=1 /TOL=(kGenOp_tol) /W=trimS /D=fitYw GeneticFit_UnSmearedModel,bar.y,bar.w,holdStr,limits290 GenCurveFit/MAT /STRC=bar /X=bar.x[0] /I=1 /TOL=(kGenOp_tol) /W=trimS /D=fitYw GeneticFit_UnSmearedModel,bar.y,bar.w,holdStr,limits 291 291 break 292 292 endif 293 293 if(!useRes) 294 GenCurveFit /STRC=bar /X=bar.x[0] /I=1 /TOL=(kGenOp_tol) /W=sw /D=fitYw GeneticFit_UnSmearedModel,bar.y,bar.w,holdStr,limits294 GenCurveFit/MAT /STRC=bar /X=bar.x[0] /I=1 /TOL=(kGenOp_tol) /W=sw /D=fitYw GeneticFit_UnSmearedModel,bar.y,bar.w,holdStr,limits 295 295 break 296 296 endif … … 299 299 #endif 300 300 301 // NVAR V_chisq = V_chisq 302 // NVAR V_npnts = V_npnts 303 // NVAR V_fitIters = V_fitIters 304 WAVE/Z W_sigma = W_sigma 305 306 val = V_npnts //return this as a parameter 301 307 302 308 t0 = (stopMSTimer(-2) - t0)*1e-6 303 309 Printf "fit time = %g seconds\r\r",t0 304 310 Print W_sigma 311 Print "number of iterations = ",V_fitIters 305 312 Print "number of function evaluations = ",num 306 307 return(chi) 313 Print "Chi-squared = ",V_chisq 314 315 return(V_chisq) 308 316 end -
sans/Dev/trunk/NCNR_User_Procedures/Analysis/Packages/Wrapper_v40.ipf
r693 r704 868 868 869 869 do 870 //Variable t0 = stopMStimer(-2) // corresponding print is at the end of the do-while loop (outside)870 Variable t0 = stopMStimer(-2) // corresponding print is at the end of the do-while loop (outside) 871 871 872 872 … … 988 988 while(0) 989 989 990 //t0 = (stopMSTimer(-2) - t0)*1e-6991 //Printf "fit time = %g seconds\r\r",t0990 t0 = (stopMSTimer(-2) - t0)*1e-6 991 Printf "fit time = %g seconds\r\r",t0 992 992 993 993 // append the fit … … 1049 1049 DoUpdate //force an update of the graph before making a copy of it for the report 1050 1050 1051 //if GenCurveFit used, V_startRow and V_endRow may not exist - so read the cursors? but the cursors may not be used, so 1052 // there won't be anything on the graph... 1053 // 1051 1054 W_GenerateReport(funcStr,folderStr,$parStr,cw,yesSave,V_chisq,W_sigma,V_npnts,V_FitError,V_FitQuitReason,V_startRow,V_endRow,topGraph) 1052 1055 endif -
sans/Dev/trunk/NCNR_User_Procedures/Reduction/USANS/U_CALC.ipf
r689 r704 529 529 NVAR Incr = $("root:Packages:NIST:USANS:Globals:U_Sim:"+"gIncr"+ns) 530 530 531 NumPts = trunc( (thetaMax - ThetaMin) / incr ) 531 NumPts = trunc( (thetaMax - ThetaMin) / incr ) + 1 //+1 to count both ends of the interval 532 532 533 533 CalcTotalCountTime() … … 580 580 581 581 // new way - to spread the points out over the specified angle range 582 incr = (thetaMax - thetaMin) / numpts582 incr = (thetaMax - thetaMin) /( numpts -1 ) //-1 since end points are both counted 583 583 584 584 CalcTotalCountTime()
Note: See TracChangeset
for help on using the changeset viewer.