Changeset 444 for sans/Dev/trunk/NCNR_User_Procedures/Analysis/Models
- Timestamp:
- Nov 12, 2008 4:45:15 PM (14 years ago)
- Location:
- sans/Dev/trunk/NCNR_User_Procedures/Analysis/Models/NewModels_2008
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
sans/Dev/trunk/NCNR_User_Procedures/Analysis/Models/NewModels_2008/Core_and_NShells_v40.ipf
r396 r444 23 23 //needed to calculate the model function. 24 24 // 25 MacroPlotOneShell(num,qmin,qmax)25 Proc PlotOneShell(num,qmin,qmax) 26 26 Variable num=200, qmin=0.001, qmax=0.7 27 27 Prompt num "Enter number of data points for model: " … … 48 48 End 49 49 50 MacroPlotTwoShell(num,qmin,qmax)50 Proc PlotTwoShell(num,qmin,qmax) 51 51 Variable num=200, qmin=0.001, qmax=0.7 52 52 Prompt num "Enter number of data points for model: " … … 73 73 End 74 74 75 MacroPlotThreeShell(num,qmin,qmax)75 Proc PlotThreeShell(num,qmin,qmax) 76 76 Variable num=200, qmin=0.001, qmax=0.7 77 77 Prompt num "Enter number of data points for model: " … … 81 81 Make/O/D/n=(num) xwave_ThreeShell, ywave_ThreeShell 82 82 xwave_ThreeShell = alog(log(qmin) + x*((log(qmax)-log(qmin))/num)) 83 Make/O/D coef_ThreeShell ={1.,60,6.4e-6,10,1e-6,10,2e-6, 6.4e-6,0.001}84 make/o/t parameters_ThreeShell = {"scale","core radius (A)","Core SLD (A-2)","Shell 1 thickness","Shell 1 SLD (A-2)","Shell 2 thickness","Shell 2 SLD (A-2)","S olvent SLD (A-2)","bkg (cm-1)"}83 Make/O/D coef_ThreeShell ={1.,60,6.4e-6,10,1e-6,10,2e-6,10,3e-6,6.4e-6,0.001} 84 make/o/t parameters_ThreeShell = {"scale","core radius (A)","Core SLD (A-2)","Shell 1 thickness","Shell 1 SLD (A-2)","Shell 2 thickness","Shell 2 SLD (A-2)","Shell 3 thickness","Shell 3 SLD (A-2)","Solvent SLD (A-2)","bkg (cm-1)"} 85 85 Edit parameters_ThreeShell, coef_ThreeShell 86 86 … … 98 98 End 99 99 100 MacroPlotFourShell(num,qmin,qmax)100 Proc PlotFourShell(num,qmin,qmax) 101 101 Variable num=200, qmin=0.001, qmax=0.7 102 102 Prompt num "Enter number of data points for model: " … … 134 134 //////////////////////////////////////////////////// 135 135 // - sets up a dependency to a wrapper, not the actual SmearedModelFunction 136 MacroPlotSmearedOneShell(str)136 Proc PlotSmearedOneShell(str) 137 137 String str 138 138 Prompt str,"Pick the data folder containing the resolution you want",popup,getAList(4) … … 168 168 End 169 169 170 MacroPlotSmearedTwoShell(str)170 Proc PlotSmearedTwoShell(str) 171 171 String str 172 172 Prompt str,"Pick the data folder containing the resolution you want",popup,getAList(4) … … 203 203 204 204 205 MacroPlotSmearedThreeShell(str)205 Proc PlotSmearedThreeShell(str) 206 206 String str 207 207 Prompt str,"Pick the data folder containing the resolution you want",popup,getAList(4) … … 237 237 End 238 238 239 MacroPlotSmearedFourShell(str)239 Proc PlotSmearedFourShell(str) 240 240 String str 241 241 Prompt str,"Pick the data folder containing the resolution you want",popup,getAList(4) … … 676 676 return (0) 677 677 End 678 679 //wrapper to calculate the smeared model as an AAO-Struct 680 // fills the struct and calls the ususal function with the STRUCT parameter 681 // 682 // used only for the dependency, not for fitting 683 // 684 Function fSmearedTwoShell(coefW,yW,xW) 685 Wave coefW,yW,xW 686 687 String str = getWavesDataFolder(yW,0) 688 String DF="root:"+str+":" 689 690 WAVE resW = $(DF+str+"_res") 691 692 STRUCT ResSmearAAOStruct fs 693 WAVE fs.coefW = coefW 694 WAVE fs.yW = yW 695 WAVE fs.xW = xW 696 WAVE fs.resW = resW 697 698 Variable err 699 err = SmearedTwoShell(fs) 700 701 return (0) 702 End 703 704 //wrapper to calculate the smeared model as an AAO-Struct 705 // fills the struct and calls the ususal function with the STRUCT parameter 706 // 707 // used only for the dependency, not for fitting 708 // 709 Function fSmearedThreeShell(coefW,yW,xW) 710 Wave coefW,yW,xW 711 712 String str = getWavesDataFolder(yW,0) 713 String DF="root:"+str+":" 714 715 WAVE resW = $(DF+str+"_res") 716 717 STRUCT ResSmearAAOStruct fs 718 WAVE fs.coefW = coefW 719 WAVE fs.yW = yW 720 WAVE fs.xW = xW 721 WAVE fs.resW = resW 722 723 Variable err 724 err = SmearedThreeShell(fs) 725 726 return (0) 727 End 728 729 //wrapper to calculate the smeared model as an AAO-Struct 730 // fills the struct and calls the ususal function with the STRUCT parameter 731 // 732 // used only for the dependency, not for fitting 733 // 734 Function fSmearedFourShell(coefW,yW,xW) 735 Wave coefW,yW,xW 736 737 String str = getWavesDataFolder(yW,0) 738 String DF="root:"+str+":" 739 740 WAVE resW = $(DF+str+"_res") 741 742 STRUCT ResSmearAAOStruct fs 743 WAVE fs.coefW = coefW 744 WAVE fs.yW = yW 745 WAVE fs.xW = xW 746 WAVE fs.resW = resW 747 748 Variable err 749 err = SmearedFourShell(fs) 750 751 return (0) 752 End -
sans/Dev/trunk/NCNR_User_Procedures/Analysis/Models/NewModels_2008/PolyCore_and_NShells_v40.ipf
r396 r444 27 27 //needed to calculate the model function. 28 28 // 29 Macro PlotPolyPolyOneShell(num,qmin,qmax)29 Proc PlotPolyOneShell(num,qmin,qmax) 30 30 Variable num=200, qmin=0.001, qmax=0.7 31 31 Prompt num "Enter number of data points for model: " … … 33 33 Prompt qmax "Enter maximum q-value (^-1) for model: " 34 34 // 35 Make/O/D/n=(num) xwave_Poly PolyOneShell, ywave_PolyPolyOneShell36 xwave_Poly PolyOneShell = alog(log(qmin) + x*((log(qmax)-log(qmin))/num))37 Make/O/D coef_Poly PolyOneShell = {1.,60,0.1,6.4e-6,10,1e-6,6.4e-6,0.001}38 make/o/t parameters_Poly PolyOneShell = {"scale","core radius (A)","Core Polydispersity(0,1)","Core SLD (A-2)","Shell thickness (A)","Shell SLD (A-2)","Solvent SLD (A-2)","bkg (cm-1)"}39 Edit parameters_Poly PolyOneShell, coef_PolyPolyOneShell40 41 Variable/G root:g_Poly PolyOneShell35 Make/O/D/n=(num) xwave_PolyOneShell, ywave_PolyOneShell 36 xwave_PolyOneShell = alog(log(qmin) + x*((log(qmax)-log(qmin))/num)) 37 Make/O/D coef_PolyOneShell = {1.,60,0.1,6.4e-6,10,1e-6,6.4e-6,0.001} 38 make/o/t parameters_PolyOneShell = {"scale","core radius (A)","Core Polydispersity(0,1)","Core SLD (A-2)","Shell thickness (A)","Shell SLD (A-2)","Solvent SLD (A-2)","bkg (cm-1)"} 39 Edit parameters_PolyOneShell, coef_PolyOneShell 40 41 Variable/G root:g_PolyOneShell 42 42 g_PolyOneShell := PolyOneShell(coef_PolyOneShell, ywave_PolyOneShell, xwave_PolyOneShell) 43 43 Display ywave_PolyOneShell vs xwave_PolyOneShell … … 52 52 End 53 53 54 Macro PlotPolyPolyTwoShell(num,qmin,qmax)54 Proc PlotPolyTwoShell(num,qmin,qmax) 55 55 Variable num=200, qmin=0.001, qmax=0.7 56 56 Prompt num "Enter number of data points for model: " … … 77 77 End 78 78 79 MacroPlotPolyThreeShell(num,qmin,qmax)79 Proc PlotPolyThreeShell(num,qmin,qmax) 80 80 Variable num=200, qmin=0.001, qmax=0.7 81 81 Prompt num "Enter number of data points for model: " … … 102 102 End 103 103 104 MacroPlotPolyFourShell(num,qmin,qmax)104 Proc PlotPolyFourShell(num,qmin,qmax) 105 105 Variable num=200, qmin=0.001, qmax=0.7 106 106 Prompt num "Enter number of data points for model: " … … 138 138 //////////////////////////////////////////////////// 139 139 // - sets up a dependency to a wrapper, not the actual SmearedModelFunction 140 MacroPlotSmearedPolyOneShell(str)140 Proc PlotSmearedPolyOneShell(str) 141 141 String str 142 142 Prompt str,"Pick the data folder containing the resolution you want",popup,getAList(4) … … 172 172 End 173 173 174 MacroPlotSmearedPolyTwoShell(str)174 Proc PlotSmearedPolyTwoShell(str) 175 175 String str 176 176 Prompt str,"Pick the data folder containing the resolution you want",popup,getAList(4) … … 207 207 208 208 209 MacroPlotSmearedPolyThreeShell(str)209 Proc PlotSmearedPolyThreeShell(str) 210 210 String str 211 211 Prompt str,"Pick the data folder containing the resolution you want",popup,getAList(4) … … 241 241 End 242 242 243 MacroPlotSmearedPolyFourShell(str)243 Proc PlotSmearedPolyFourShell(str) 244 244 String str 245 245 Prompt str,"Pick the data folder containing the resolution you want",popup,getAList(4)
Note: See TracChangeset
for help on using the changeset viewer.