Changeset 200 for sans/Analysis/branches
- Timestamp:
- Nov 15, 2007 11:27:16 AM (15 years ago)
- Location:
- sans/Analysis/branches/ajj_23APR07/IGOR_Package_Files/Put in User Procedures/SANS_Models_v3.00
- Files:
-
- 9 edited
Legend:
- Unmodified
- Added
- Removed
-
sans/Analysis/branches/ajj_23APR07/IGOR_Package_Files/Put in User Procedures/SANS_Models_v3.00/Models_2D/CoreShellCyl2D.ipf
r198 r200 25 25 26 26 // Setup parameter table for model function 27 make/O/T/N=15 parameters_CSCyl2D 28 Make/O/D/N=15 coef_CSCyl2D 27 // make/O/T/N=15 parameters_CSCyl2D 28 // Make/O/D/N=15 coef_CSCyl2D 29 make/O/T/N=14 parameters_CSCyl2D 30 Make/O/D/N=14 coef_CSCyl2D 29 31 30 32 coef_CSCyl2D[0] = 1.0 … … 42 44 coef_CSCyl2D[12] = 0.0 43 45 coef_CSCyl2D[13] = 0.0 44 coef_CSCyl2D[14] = 10 46 //hard-wire the number of integration points 47 // coef_CSCyl2D[14] = 10 45 48 46 49 parameters_CSCyl2D[0] = "Scale" … … 58 61 parameters_CSCyl2D[12] = "Sigma of polydisp in Theta [rad]" 59 62 parameters_CSCyl2D[13] = "Sigma of polydisp in Phi [rad]" 60 parameters_CSCyl2D[14] = "Num of polydisp points"63 // parameters_CSCyl2D[14] = "Num of polydisp points" 61 64 62 65 Edit parameters_CSCyl2D,coef_CSCyl2D … … 103 106 // 104 107 //#if exists("CoreShellCylinderModel_D") 105 // zw = CoreShellCylinderModel_D(cw,xw,yw) 108 // Make/O/D/N=15 CSCyl2D_tmp 109 // CSCyl2D_tmp = cw 110 // CSCyl2D_tmp[14] = 25 111 // 112 // zw = CoreShellCylinderModel_D(CSCyl2D_tmp,xw,yw) 113 // 114 //// zw = CoreShellCylinderModel_D(cw,xw,yw) 106 115 //#else 107 116 // Abort "You do not have the SANS Analysis XOP installed" … … 117 126 118 127 #if exists("CoreShellCylinderModel_D") //to hide the function if XOP not installed 119 zw[p1,p2]= CoreShellCylinderModel_D(cw,xw,yw) 128 129 Make/O/D/N=15 CSCyl2D_tmp 130 CSCyl2D_tmp = cw 131 CSCyl2D_tmp[14] = 25 132 133 zw[p1,p2]= CoreShellCylinderModel_D(CSCyl2D_tmp,xw,yw) 134 120 135 #endif 121 136 -
sans/Analysis/branches/ajj_23APR07/IGOR_Package_Files/Put in User Procedures/SANS_Models_v3.00/Models_2D/Cylinder_2D.ipf
r198 r200 2 2 #pragma IgorVersion=6.0 3 3 4 // "simple" version of 2D function5 4 // 6 5 // The plotting macro sets up TWO dependencies … … 25 24 SetDataFolder $("root:"+str) 26 25 27 28 26 // NOTE THAT THE COEFFICIENTS [N] ARE IN A DIFFERENT ORDER !!! 29 27 // Setup parameter table for model function 30 make/O/T/N=11 parameters_Cyl2D 31 Make/O/D/N=11 coef_Cyl2D 28 // make/O/T/N=11 parameters_Cyl2D 29 // Make/O/D/N=11 coef_Cyl2D 30 make/O/T/N=10 parameters_Cyl2D 31 Make/O/D/N=10 coef_Cyl2D 32 32 coef_Cyl2D[0] = 1.0 33 33 coef_Cyl2D[1] = 20.0 … … 40 40 coef_Cyl2D[8] = 0.0 41 41 coef_Cyl2D[9] = 0.0 42 coef_Cyl2D[10] = 25 42 43 // currently, the number of integration points is hard-wired to be 25 in Cylinder2D_T 44 //coef_Cyl2D[10] = 25 43 45 // 44 46 parameters_Cyl2D[0] = "Scale" … … 54 56 parameters_Cyl2D[7] = "Sigma of polydisp in Radius [A]" //***** 55 57 56 parameters_Cyl2D[10] = "number of integration points"58 // parameters_Cyl2D[10] = "number of integration points" 57 59 58 60 Edit parameters_Cyl2D,coef_Cyl2D … … 99 101 // 100 102 //#if exists("CylinderModel_D") 101 // zw = CylinderModel_D(cw,xw,yw) 103 // 104 // Make/O/D/N=11 Cyl2D_tmp // there seems to be no speed penalty for doing this... 105 // Cyl2D_tmp = cw 106 // Cyl2D_tmp[10] = 25 // hard-wire the number of integration points 107 // 108 // zw= CylinderModel_D(Cyl2D_tmp,xw,yw) 109 // 110 // //zw = CylinderModel_D(cw,xw,yw) 102 111 //#else 103 112 // Abort "You do not have the SANS Analysis XOP installed" … … 113 122 114 123 #if exists("CylinderModel_D") //to hide the function if XOP not installed 115 zw[p1,p2]= CylinderModel_D(cw,xw,yw) 124 125 Make/O/D/N=11 Cyl2D_tmp // there seems to be no speed penalty for doing this... 126 Cyl2D_tmp = cw 127 Cyl2D_tmp[10] = 25 // hard-wire the number of integration points 128 129 zw[p1,p2]= CylinderModel_D(Cyl2D_tmp,xw,yw) 130 116 131 #endif 117 132 … … 134 149 variable mt= ThreadGroupCreate(nthreads) 135 150 151 // Variable t1=StopMSTimer(-2) 152 136 153 for(i=0;i<nthreads;i+=1) 137 154 // Print (i*npt/nthreads),((i+1)*npt/nthreads-1) … … 145 162 variable dummy= ThreadGroupRelease(mt) 146 163 164 // Print "elapsed time = ",(StopMSTimer(-2) - t1)/1e6 165 147 166 return(0) 148 167 End -
sans/Analysis/branches/ajj_23APR07/IGOR_Package_Files/Put in User Procedures/SANS_Models_v3.00/Models_2D/Ellipsoid2D.ipf
r198 r200 2 2 #pragma IgorVersion=6.0 3 3 4 // 5 // !!! FOR THE ELLIPSOID, THE ANGLE THETA IS DEFINED FROM ???? 4 6 // 5 7 // The plotting macro sets up TWO dependencies … … 25 27 26 28 // Setup parameter table for model function 27 make/O/T/N=12 parameters_Ellip2D 28 Make/O/D/N=12 coef_Ellip2D 29 // make/O/T/N=12 parameters_Ellip2D 30 // Make/O/D/N=12 coef_Ellip2D 31 make/O/T/N=11 parameters_Ellip2D 32 Make/O/D/N=11 coef_Ellip2D 29 33 30 34 coef_Ellip2D[0] = 1.0 … … 39 43 coef_Ellip2D[9] = 0.0 40 44 coef_Ellip2D[10] = 0.0 41 coef_Ellip2D[11] = 10 45 // hard-wire the number of integration points 46 // coef_Ellip2D[11] = 10 42 47 43 48 parameters_Ellip2D[0] = "Scale" … … 52 57 parameters_Ellip2D[9] = "Sigma of polydisp in Theta [rad]" 53 58 parameters_Ellip2D[10] = "Sigma of polydisp in Phi [rad]" 54 parameters_Ellip2D[11] = "Num of polydisp points" 59 60 // parameters_Ellip2D[11] = "Num of polydisp points" 55 61 56 62 … … 98 104 // 99 105 //#if exists("EllipsoidModel_D") 100 // zw = EllipsoidModel_D(cw,xw,yw) 106 // 107 // Make/O/D/N=12 Ellip2D_tmp 108 // Ellip2D_tmp = cw 109 // Ellip2D_tmp[11] = 25 110 // 111 // zw = EllipsoidModel_D(Ellip2D_tmp,xw,yw) 112 // 113 //// zw = EllipsoidModel_D(cw,xw,yw) 101 114 //#else 102 115 // Abort "You do not have the SANS Analysis XOP installed" … … 112 125 113 126 #if exists("EllipsoidModel_D") //to hide the function if XOP not installed 114 zw[p1,p2]= EllipsoidModel_D(cw,xw,yw) 127 128 Make/O/D/N=12 Ellip2D_tmp 129 Ellip2D_tmp = cw 130 Ellip2D_tmp[11] = 25 131 132 zw[p1,p2]= EllipsoidModel_D(Ellip2D_tmp,xw,yw) 133 115 134 #endif 116 135 -
sans/Analysis/branches/ajj_23APR07/IGOR_Package_Files/Put in User Procedures/SANS_Models_v3.00/Models_2D/EllipticalCylinder2D.ipf
r198 r200 25 25 26 26 // Setup parameter table for model function 27 make/O/T/N=14 parameters_EllCyl2D 28 Make/O/D/N=14 coef_EllCyl2D 29 27 //make/O/T/N=14 parameters_EllCyl2D 28 //Make/O/D/N=14 coef_EllCyl2D 29 make/O/T/N=13 parameters_EllCyl2D 30 Make/O/D/N=13 coef_EllCyl2D 31 30 32 coef_EllCyl2D[0] = 1.0 31 33 coef_EllCyl2D[1] = 20.0 … … 41 43 coef_EllCyl2D[11] = 0.0 42 44 coef_EllCyl2D[12] = 0.0 43 coef_EllCyl2D[13] = 10 45 46 // now hard-wire the # of integration points 47 //coef_EllCyl2D[13] = 25 44 48 45 49 parameters_EllCyl2D[0] = "Scale" … … 56 60 parameters_EllCyl2D[11] = "Sigma of polydisp in Theta [rad]" 57 61 parameters_EllCyl2D[12] = "Sigma of polydisp in Phi [rad]" 58 parameters_EllCyl2D[13] = "Num of polydisp points"62 //parameters_EllCyl2D[13] = "Num of polydisp points" 59 63 60 64 Edit parameters_EllCyl2D,coef_EllCyl2D … … 101 105 // 102 106 //#if exists("EllipticalCylinderModel_D") 103 // zw = EllipticalCylinderModel_D(cw,xw,yw) 107 // 108 // Make/O/D/N=14 EllCyl2D_tmp 109 // EllCyl2D_tmp = cw 110 // EllCyl2D_tmp[13] = 25 111 // 112 // zw = EllipticalCylinderModel_D(EllCyl2D_tmp,xw,yw) 113 // 114 //// zw = EllipticalCylinderModel_D(cw,xw,yw) 104 115 //#else 105 116 // Abort "You do not have the SANS Analysis XOP installed" … … 115 126 116 127 #if exists("EllipticalCylinderModel_D") //to hide the function if XOP not installed 117 zw[p1,p2]= EllipticalCylinderModel_D(cw,xw,yw) 128 129 Make/O/D/N=14 EllCyl2D_tmp 130 EllCyl2D_tmp = cw 131 EllCyl2D_tmp[13] = 25 132 133 zw[p1,p2]= EllipticalCylinderModel_D(EllCyl2D_tmp,xw,yw) 134 118 135 #endif 119 136 -
sans/Analysis/branches/ajj_23APR07/IGOR_Package_Files/Put in User Procedures/SANS_Models_v3.00/Packages/ModelPicker/SANSModelPicker.ipf
r184 r200 117 117 ////paste here... after deleting the old make statement and list 118 118 119 Make/O/T/N=6 3SANS_Model_List119 Make/O/T/N=66 SANS_Model_List 120 120 121 121 SANS_Model_List[0] = "Beaucage.ipf" … … 182 182 SANS_Model_List[61] = "Vesicle_UL_and_Struct.ipf" 183 183 SANS_Model_List[62] = "Cylinder_2D.ipf" 184 184 185 SANS_Model_List[63] = "CoreShellCyl2D.ipf" 186 SANS_Model_List[64] = "Ellipsoid2D.ipf" 187 SANS_Model_List[65] = "EllipticalCylinder2D.ipf" 188 185 189 ///end paste here 186 190 End -
sans/Analysis/branches/ajj_23APR07/IGOR_Package_Files/Put in User Procedures/SANS_Models_v3.00/Packages/PlotUtils2D.ipf
r198 r200 304 304 End 305 305 306 Macro AdjustColorTables() 307 308 ModifyGizmo ModifyObject=surface1 property={ srcMode,0} 309 ModifyGizmo ModifyObject=surface1 property={ surfaceCTab,Rainbow} 310 ModifyGizmo setDisplayList=3, object=surface1 311 // ModifyGizmo SETQUATERNION={0.565517,-0.103105,-0.139134,0.806350} 312 ModifyGizmo autoscaling=1 313 ModifyGizmo currentGroupObject="" 314 ModifyGizmo compile 315 316 end 306 // would be nice, but I can't get this to work... 307 // 308 //Macro AdjustColorTables() 309 // 310 // ModifyGizmo ModifyObject=surface1 property={ srcMode,0} 311 // ModifyGizmo ModifyObject=surface1 property={ surfaceCTab,Rainbow} 312 // ModifyGizmo setDisplayList=3, object=surface1 313 //// ModifyGizmo SETQUATERNION={0.565517,-0.103105,-0.139134,0.806350} 314 // ModifyGizmo autoscaling=1 315 // ModifyGizmo currentGroupObject="" 316 // ModifyGizmo compile 317 // 318 //end 317 319 318 320 Function LogToggle2DButtonProc(ba) : ButtonControl … … 734 736 String folderStr,funcStr,coefStr,cmdStr="" 735 737 738 Variable killWhat=0 //kill nothing as default 739 736 740 switch( ba.eventCode ) 737 741 case 2: // mouse up … … 766 770 Function_PopMenuProc(pa) 767 771 772 KillWhat = 2 //kill just the table, leave the 2d visible for now 773 KillTopGraphAndTable(killWhat) // crude 774 768 775 break 769 776 endswitch -
sans/Analysis/branches/ajj_23APR07/IGOR_Package_Files/Put in User Procedures/SANS_Models_v3.00/Packages/SumModel/SumSANSModels.ipf
r168 r200 97 97 list = RemoveFromList(tmp, list ,";") 98 98 99 tmp = FunctionList("f*",";","KIND:10") //point calculations 99 // Print list 100 tmp = GrepList(FunctionList("f*",";","KIND:10"),"^f") 101 // tmp = FunctionList("f*",";","KIND:10") //point calculations 102 103 // Print tmp 104 100 105 list = RemoveFromList(tmp, list ,";") 101 106 -
sans/Analysis/branches/ajj_23APR07/IGOR_Package_Files/Put in User Procedures/SANS_Models_v3.00/Packages/Wrapper.ipf
r198 r200 148 148 list = RemoveFromList("WM_Make3DBarChartParametricWave", list) 149 149 list = RemoveFromList("UpdateQxQy2Mat", list) 150 list = RemoveFromList("MakeBSMask", list) 150 151 151 152 … … 290 291 // farm the work out to another function? 291 292 Variable num=numpnts($popStr) 292 // make the necessary waves 293 Make/O/D/N=(num) $("epsilon_"+suffix),$("Hold_"+suffix) 294 Make/O/T/N=(num) $("LoLim_"+suffix),$("HiLim_"+suffix) 295 293 // make the necessary waves if they don't exist already 294 if(exists("Hold_"+suffix) == 0) 295 Make/O/D/N=(num) $("epsilon_"+suffix),$("Hold_"+suffix) 296 Make/O/T/N=(num) $("LoLim_"+suffix),$("HiLim_"+suffix) 297 endif 296 298 // default epsilon values, sometimes needed for the fit 297 299 Wave eps = $("epsilon_"+suffix) … … 300 302 WAVE/T LoLim = $("LoLim_"+suffix) 301 303 WAVE/T HiLim = $("HiLim_"+suffix) 302 LoLim = "" //should have nicer way of keeping the previous values303 HiLim = ""304 304 305 305 // clear the table (a subwindow) … … 409 409 Variable useCursors,useEps,useConstr 410 410 411 Variable killWhat=0 //kill nothing as default 412 411 413 switch( ba.eventCode ) 412 414 case 2: // mouse up … … 426 428 sprintf cmdStr, "Plot%s(\"%s\",)",funcStr,folderStr //yes RPA, leave a comma for input 427 429 endif 430 killWhat = 1 428 431 else 429 // it's not, 432 // it's not, don't kill the graph, just the table 430 433 sprintf cmdStr, "Plot%s()",funcStr 434 killWhat = 2 431 435 endif 432 436 … … 441 445 Function_PopMenuProc(pa) 442 446 447 KillTopGraphAndTable(killWhat) // crude 448 443 449 break 444 450 endswitch 445 451 446 452 return 0 453 End 454 455 // passing 0 kills nothing 456 // passing 1 kills the top graph and table 457 // passing 2 kills the top table only 458 // 459 Function KillTopGraphAndTable(killwhat) 460 Variable killWhat 461 462 String topGraph= WinName(0,1) //this is the topmost graph 463 String topTable= WinName(0,2) //this is the topmost table 464 465 if(killWhat == 0) 466 return(0) 467 endif 468 469 if(killWhat == 1) 470 KillWindow $topGraph 471 KillWindow $topTable 472 endif 473 474 if(killWhat == 2) 475 KillWindow $topTable 476 endif 477 478 return(0) 447 479 End 448 480 -
sans/Analysis/branches/ajj_23APR07/IGOR_Package_Files/Put in User Procedures/SANS_Models_v3.00/SA_includes_v301.ipf
r198 r200 24 24 "Load Model Functions",Execute/P "INSERTINCLUDE \"SANSModelPicker\"";Execute/P "COMPILEPROCEDURES ";Execute/P "ModelPicker_Panel()" 25 25 "Plot Manager", Show_Plot_Manager() 26 "Freeze Model" 26 27 "Write Model Data" 27 28 "-"
Note: See TracChangeset
for help on using the changeset viewer.