source: sans/Dev/trunk/NCNR_User_Procedures/Analysis/Models/OblateCoreShell_Sq_v40.ipf @ 510

Last change on this file since 510 was 510, checked in by srkline, 14 years ago

Simple change in all of the model function files to include the name of the parameter wave in the Keyword=list that is generated when a model is plotted. This is becoming an issue where the proper parameter wave can't be deduced from just the suffix, then there is nothing to put in the table.

I should have added this when I initially wrote the wrapper...

File size: 17.7 KB
Line 
1#pragma rtGlobals=1             // Use modern global access method.
2#pragma IgorVersion = 6.0
3
4// be sure to include all of the necessary files
5
6#include "OblateCoreShell_v40"
7#include "EffectiveDiameter_v40"
8
9#include "HardSphereStruct_v40"
10#include "HPMSA_v40"
11#include "SquareWellStruct_v40"
12#include "StickyHardSphereStruct_v40"
13
14Proc PlotOblate_HS(num,qmin,qmax)
15        Variable num=128,qmin=0.001,qmax=0.7
16        Prompt num "Enter number of data points for model: "
17        Prompt qmin "Enter minimum q-value (A^-1) for model: "
18        Prompt qmax "Enter maximum q-value (A^-1) for model: "
19       
20        Make/O/D/n=(num) xwave_OEF_HS,ywave_OEF_HS
21        xwave_OEF_HS =  alog(log(qmin) + x*((log(qmax)-log(qmin))/num))
22        Make/O/D coef_OEF_HS = {0.01,100,50,110,60,1e-6,2e-6,6.3e-6,0.0001}
23        make/o/t parameters_OEF_HS = {"volume fraction","major core radius (A)","minor core radius (A)","major shell radius (A)","minor shell radius (A)","SLD core (A-2)","SLD shell (A-2)","SLD solvent (A^-2)","bkg (cm-1)"}
24        Edit parameters_OEF_HS,coef_OEF_HS
25       
26        Variable/G root:g_OEF_HS
27        g_OEF_HS := Oblate_HS(coef_OEF_HS,ywave_OEF_HS,xwave_OEF_HS)
28        Display ywave_OEF_HS vs xwave_OEF_HS
29        ModifyGraph log=1,marker=29,msize=2,mode=4
30        Label bottom "q (A\\S-1\\M)"
31        Label left "Intensity (cm\\S-1\\M)"
32
33        AutoPositionWindow/M=1/R=$(WinName(0,1)) $WinName(0,2)
34       
35        AddModelToStrings("Oblate_HS","coef_OEF_HS","parameters_OEF_HS","OEF_HS")
36End
37
38// - sets up a dependency to a wrapper, not the actual SmearedModelFunction
39Proc PlotSmearedOblate_HS(str)                                                         
40        String str
41        Prompt str,"Pick the data folder containing the resolution you want",popup,getAList(4)
42       
43        // if any of the resolution waves are missing => abort
44        if(ResolutionWavesMissingDF(str))               //updated to NOT use global strings (in GaussUtils)
45                Abort
46        endif
47       
48        SetDataFolder $("root:"+str)
49       
50        // Setup parameter table for model function
51        Make/O/D smear_coef_OEF_HS = {0.01,100,50,110,60,1e-6,2e-6,6.3e-6,0.0001}
52        make/o/t smear_parameters_OEF_HS = {"volume fraction","major core radius (A)","minor core radius (A)","major shell radius (A)","minor shell radius (A)","SLD core (A-2)","SLD shell (A-2)","SLD solvent (A^-2)","bkg (cm-1)"}
53        Edit smear_parameters_OEF_HS,smear_coef_OEF_HS                                 
54       
55        // output smeared intensity wave, dimensions are identical to experimental QSIG values
56        // make extra copy of experimental q-values for easy plotting
57        Duplicate/O $(str+"_q") smeared_OEF_HS,smeared_qvals                           
58        SetScale d,0,0,"1/cm",smeared_OEF_HS                                                   
59                                       
60        Variable/G gs_OEF_HS=0
61        gs_OEF_HS := fSmearedOblate_HS(smear_coef_OEF_HS,smeared_OEF_HS,smeared_qvals)  //this wrapper fills the STRUCT
62       
63        Display smeared_OEF_HS vs smeared_qvals                                                                 
64        ModifyGraph log=1,marker=29,msize=2,mode=4
65        Label bottom "q (A\\S-1\\M)"
66        Label left "Intensity (cm\\S-1\\M)"
67
68        AutoPositionWindow/M=1/R=$(WinName(0,1)) $WinName(0,2)
69       
70        SetDataFolder root:
71        AddModelToStrings("SmearedOblate_HS","smear_coef_OEF_HS","smear_parameters_OEF_HS","OEF_HS")
72End
73       
74
75Function Oblate_HS(w,yw,xw) : FitFunc
76        Wave w,yw,xw
77       
78        Variable inten,Ras,Rbs
79        Ras = w[4]      //Ras is the rotation axis, the minor axis for an oblate ellipsoid
80        Rbs = w[3]
81       
82        //setup form factor coefficient wave
83        Make/O/D/N=9 form_OEF_HS
84        form_OEF_HS[0] = 1
85        form_OEF_HS[1] = w[1]
86        form_OEF_HS[2] = w[2]
87        form_OEF_HS[3] = w[3]
88        form_OEF_HS[4] = w[4]
89        form_OEF_HS[5] = w[5]
90        form_OEF_HS[6] = w[6]
91        form_OEF_HS[7] = w[7]
92        form_OEF_HS[8] = 0
93       
94        //setup structure factor coefficient wave
95        Make/O/D/N=2 struct_OEF_HS
96        struct_OEF_HS[0] = 0.5*DiamEllip(Ras,Rbs)
97        struct_OEF_HS[1] = w[0]
98       
99        //calculate each and combine
100        Duplicate/O xw temp_OEF_HS_PQ,temp_OEF_HS_SQ            //make waves for the AAO
101        OblateForm(form_OEF_HS,temp_OEF_HS_PQ,xw)
102        HardSphereStruct(struct_OEF_HS,temp_OEF_HS_SQ,xw)
103        yw = temp_OEF_HS_PQ * temp_OEF_HS_SQ
104        yw *= w[0]
105        yw += w[8]
106       
107        //cleanup waves
108//      Killwaves/Z form_OEF_HS,struct_OEF_HS
109       
110        return (0)
111End
112
113Proc PlotOblate_SW(num,qmin,qmax)
114        Variable num=128,qmin=0.001,qmax=0.7
115        Prompt num "Enter number of data points for model: "
116        Prompt qmin "Enter minimum q-value (A^-1) for model: "
117        Prompt qmax "Enter maximum q-value (A^-1) for model: "
118       
119        Make/O/D/n=(num) xwave_OEF_SW,ywave_OEF_SW
120        xwave_OEF_SW =  alog(log(qmin) + x*((log(qmax)-log(qmin))/num))
121        Make/O/D coef_OEF_SW = {0.01,100,50,110,60,1e-6,2e-6,6.3e-6,1.0,1.2,0.0001}
122        make/o/t parameters_OEF_SW = {"volume fraction","major core radius (A)","minor core radius (A)","major shell radius (A)","minor shell radius (A)","SLD core (A-2)","SLD shell (A-2)","SLD solvent (A^-2)","well depth (kT)","well width (diam.)","bkg (cm-1)"}
123        Edit parameters_OEF_SW,coef_OEF_SW
124       
125        Variable/G root:g_OEF_SW
126        g_OEF_SW := Oblate_SW(coef_OEF_SW,ywave_OEF_SW,xwave_OEF_SW)
127        Display ywave_OEF_SW vs xwave_OEF_SW
128        ModifyGraph log=1,marker=29,msize=2,mode=4
129        Label bottom "q (A\\S-1\\M)"
130        Label left "Intensity (cm\\S-1\\M)"
131
132        AutoPositionWindow/M=1/R=$(WinName(0,1)) $WinName(0,2)
133       
134        AddModelToStrings("Oblate_SW","coef_OEF_SW","parameters_OEF_SW","OEF_SW")
135End
136
137// - sets up a dependency to a wrapper, not the actual SmearedModelFunction
138Proc PlotSmearedOblate_SW(str)                                                         
139        String str
140        Prompt str,"Pick the data folder containing the resolution you want",popup,getAList(4)
141       
142        // if any of the resolution waves are missing => abort
143        if(ResolutionWavesMissingDF(str))               //updated to NOT use global strings (in GaussUtils)
144                Abort
145        endif
146       
147        SetDataFolder $("root:"+str)
148       
149        // Setup parameter table for model function
150        Make/O/D smear_coef_OEF_SW = {0.01,100,50,110,60,1e-6,2e-6,6.3e-6,1.0,1.2,0.0001}
151        make/o/t smear_parameters_OEF_SW = {"volume fraction","major core radius (A)","minor core radius (A)","major shell radius (A)","minor shell radius (A)","SLD core (A-2)","SLD shell (A-2)","SLD solvent (A^-2)","well depth (kT)","well width (diam.)","bkg (cm-1)"}
152        Edit smear_parameters_OEF_SW,smear_coef_OEF_SW                                 
153       
154        // output smeared intensity wave, dimensions are identical to experimental QSIG values
155        // make extra copy of experimental q-values for easy plotting
156        Duplicate/O $(str+"_q") smeared_OEF_SW,smeared_qvals                           
157        SetScale d,0,0,"1/cm",smeared_OEF_SW                                                   
158                                       
159        Variable/G gs_OEF_SW=0
160        gs_OEF_SW := fSmearedOblate_SW(smear_coef_OEF_SW,smeared_OEF_SW,smeared_qvals)  //this wrapper fills the STRUCT
161       
162        Display smeared_OEF_SW vs smeared_qvals                                                                 
163        ModifyGraph log=1,marker=29,msize=2,mode=4
164        Label bottom "q (A\\S-1\\M)"
165        Label left "Intensity (cm\\S-1\\M)"
166
167        AutoPositionWindow/M=1/R=$(WinName(0,1)) $WinName(0,2)
168       
169        SetDataFolder root:
170        AddModelToStrings("SmearedOblate_SW","smear_coef_OEF_SW","smear_parameters_OEF_SW","OEF_SW")
171End
172
173
174Function Oblate_SW(w,yw,xw) : FitFunc
175        Wave w,yw,xw
176       
177        Variable inten,Ras,Rbs
178        Ras = w[4]      //Ras is the rotation axis
179        Rbs = w[3]
180       
181        //setup form factor coefficient wave
182        Make/O/D/N=9 form_OEF_SW
183        form_OEF_SW[0] = 1
184        form_OEF_SW[1] = w[1]
185        form_OEF_SW[2] = w[2]
186        form_OEF_SW[3] = w[3]
187        form_OEF_SW[4] = w[4]
188        form_OEF_SW[5] = w[5]
189        form_OEF_SW[6] = w[6]
190        form_OEF_SW[7] = w[7]
191        form_OEF_SW[8] = 0
192       
193        //setup structure factor coefficient wave
194        Make/O/D/N=4 struct_OEF_SW
195        struct_OEF_SW[0] = 0.5*DiamEllip(Ras,Rbs)
196        struct_OEF_SW[1] = w[0]
197        struct_OEF_SW[2] = w[8]
198        struct_OEF_SW[3] = w[9]
199       
200        //calculate each and combine
201        Duplicate/O xw temp_OEF_SW_PQ,temp_OEF_SW_SQ            //make waves for the AAO
202        OblateForm(form_OEF_SW,temp_OEF_SW_PQ,xw)
203        SquareWellStruct(struct_OEF_SW,temp_OEF_SW_SQ,xw)
204        yw = temp_OEF_SW_PQ * temp_OEF_SW_SQ
205        yw *= w[0]
206        yw += w[10]
207       
208        //cleanup waves
209//      Killwaves/Z form_OEF_SW,struct_OEF_SW
210       
211        return (0)
212End
213
214Proc PlotOblate_SC(num,qmin,qmax)
215        Variable num=128,qmin=0.001,qmax=0.7
216        Prompt num "Enter number of data points for model: "
217        Prompt qmin "Enter minimum q-value (A^-1) for model: "
218        Prompt qmax "Enter maximum q-value (A^-1) for model: "
219       
220        if(!DataFolderExists(":HayPenMSA"))
221                NewDataFolder :HayPenMSA
222        endif
223        Make/O/D/N=17 :HayPenMSA:gMSAWave
224       
225        Make/O/D/n=(num) xwave_OEF_SC,ywave_OEF_SC
226        xwave_OEF_SC =  alog(log(qmin) + x*((log(qmax)-log(qmin))/num))
227        Make/O/D coef_OEF_SC = {0.01,100,50,110,60,1e-6,2e-6,6.3e-6,20,0,298,78,0.0001}
228        make/o/t parameters_OEF_SC = {"volume fraction","major core radius (A)","minor core radius (A)","major shell radius (A)","minor shell radius (A)","SLD core (A-2)","SLD shell (A-2)","SLD solvent (A^-2)","charge","movalent salt(M)","Temperature (K)","dielectric const","bkg (cm-1)"}
229        Edit parameters_OEF_SC,coef_OEF_SC
230       
231        Variable/G root:g_OEF_SC
232        g_OEF_SC := Oblate_SC(coef_OEF_SC,ywave_OEF_SC,xwave_OEF_SC)
233        Display ywave_OEF_SC vs xwave_OEF_SC
234        ModifyGraph log=1,marker=29,msize=2,mode=4
235        Label bottom "q (A\\S-1\\M)"
236        Label left "Intensity (cm\\S-1\\M)"
237
238        AutoPositionWindow/M=1/R=$(WinName(0,1)) $WinName(0,2)
239       
240        AddModelToStrings("Oblate_SC","coef_OEF_SC","parameters_OEF_SC","OEF_SC")
241End
242
243// - sets up a dependency to a wrapper, not the actual SmearedModelFunction
244Proc PlotSmearedOblate_SC(str)                                                         
245        String str
246        Prompt str,"Pick the data folder containing the resolution you want",popup,getAList(4)
247       
248        // if any of the resolution waves are missing => abort
249        if(ResolutionWavesMissingDF(str))               //updated to NOT use global strings (in GaussUtils)
250                Abort
251        endif
252       
253        SetDataFolder $("root:"+str)
254       
255        if(!DataFolderExists(":HayPenMSA"))
256                NewDataFolder :HayPenMSA
257        endif
258        Make/O/D/N=17 :HayPenMSA:gMSAWave
259       
260        // Setup parameter table for model function
261        Make/O/D smear_coef_OEF_SC = {0.01,100,50,110,60,1e-6,2e-6,6.3e-6,20,0,298,78,0.0001}
262        make/o/t smear_parameters_OEF_SC = {"volume fraction","major core radius (A)","minor core radius (A)","major shell radius (A)","minor shell radius (A)","SLD core (A-2)","SLD shell (A-2)","SLD solvent (A^-2)","charge","movalent salt(M)","Temperature (K)","dielectric const","bkg (cm-1)"}
263        Edit smear_parameters_OEF_SC,smear_coef_OEF_SC                                 
264       
265        // output smeared intensity wave, dimensions are identical to experimental QSIG values
266        // make extra copy of experimental q-values for easy plotting
267        Duplicate/O $(str+"_q") smeared_OEF_SC,smeared_qvals                           
268        SetScale d,0,0,"1/cm",smeared_OEF_SC                                                   
269                                       
270        Variable/G gs_OEF_SC=0
271        gs_OEF_SC := fSmearedOblate_SC(smear_coef_OEF_SC,smeared_OEF_SC,smeared_qvals)  //this wrapper fills the STRUCT
272       
273        Display smeared_OEF_SC vs smeared_qvals                                                                 
274        ModifyGraph log=1,marker=29,msize=2,mode=4
275        Label bottom "q (A\\S-1\\M)"
276        Label left "Intensity (cm\\S-1\\M)"
277
278        AutoPositionWindow/M=1/R=$(WinName(0,1)) $WinName(0,2)
279       
280        SetDataFolder root:
281        AddModelToStrings("SmearedOblate_SC","smear_coef_OEF_SC","smear_parameters_OEF_SC","OEF_SC")
282End
283
284
285Function Oblate_SC(w,yw,xw) : FitFunc
286        Wave w,yw,xw
287       
288        Variable inten,Ras,Rbs
289        Ras = w[4]      //Ras is the rotation axis
290        Rbs = w[3]
291       
292        //setup form factor coefficient wave
293        Make/O/D/N=9 form_OEF_SC
294        form_OEF_SC[0] = 1
295        form_OEF_SC[1] = w[1]
296        form_OEF_SC[2] = w[2]
297        form_OEF_SC[3] = w[3]
298        form_OEF_SC[4] = w[4]
299        form_OEF_SC[5] = w[5]
300        form_OEF_SC[6] = w[6]
301        form_OEF_SC[7] = w[7]
302        form_OEF_SC[8] = 0
303       
304        //setup structure factor coefficient wave
305        Make/O/D/N=6 struct_OEF_SC
306        struct_OEF_SC[0] = DiamEllip(Ras,Rbs)
307        struct_OEF_SC[1] = w[8]
308        struct_OEF_SC[2] = w[0]
309        struct_OEF_SC[3] = w[10]
310        struct_OEF_SC[4] = w[9]
311        struct_OEF_SC[5] = w[11]
312       
313        //calculate each and combine
314        Duplicate/O xw temp_OEF_SC_PQ,temp_OEF_SC_SQ            //make waves for the AAO
315        OblateForm(form_OEF_SC,temp_OEF_SC_PQ,xw)
316        HayterPenfoldMSA(struct_OEF_SC,temp_OEF_SC_SQ,xw)
317        yw = temp_OEF_SC_PQ * temp_OEF_SC_SQ
318        yw *= w[0]
319        yw += w[12]
320       
321        //cleanup waves
322//      Killwaves/Z form_OEF_SC,struct_OEF_SC
323       
324        return (0)
325End
326
327
328Proc PlotOblate_SHS(num,qmin,qmax)
329        Variable num=128,qmin=0.001,qmax=0.7
330        Prompt num "Enter number of data points for model: "
331        Prompt qmin "Enter minimum q-value (A^-1) for model: "
332        Prompt qmax "Enter maximum q-value (A^-1) for model: "
333       
334        Make/O/D/n=(num) xwave_OEF_SHS,ywave_OEF_SHS
335        xwave_OEF_SHS =  alog(log(qmin) + x*((log(qmax)-log(qmin))/num))
336        Make/O/D coef_OEF_SHS = {0.01,100,50,110,60,1e-6,2e-6,6.3e-6,0.05,0.2,0.0001}
337        make/o/t parameters_OEF_SHS = {"volume fraction","major core radius (A)","minor core radius (A)","major shell radius (A)","minor shell radius (A)","SLD core (A-2)","SLD shell (A-2)","SLD solvent (A^-2)","perturbation parameter (0.1)","stickiness, tau","bkg (cm-1)"}
338        Edit parameters_OEF_SHS,coef_OEF_SHS
339       
340        Variable/G root:g_OEF_SHS
341        g_OEF_SHS := Oblate_SHS(coef_OEF_SHS,ywave_OEF_SHS,xwave_OEF_SHS)
342        Display ywave_OEF_SHS vs xwave_OEF_SHS
343        ModifyGraph log=1,marker=29,msize=2,mode=4
344        Label bottom "q (A\\S-1\\M)"
345        Label left "Intensity (cm\\S-1\\M)"
346
347        AutoPositionWindow/M=1/R=$(WinName(0,1)) $WinName(0,2)
348       
349        AddModelToStrings("Oblate_SHS","coef_OEF_SHS","parameters_OEF_SHS","OEF_SHS")
350End
351
352// - sets up a dependency to a wrapper, not the actual SmearedModelFunction
353Proc PlotSmearedOblate_SHS(str)                                                         
354        String str
355        Prompt str,"Pick the data folder containing the resolution you want",popup,getAList(4)
356       
357        // if any of the resolution waves are missing => abort
358        if(ResolutionWavesMissingDF(str))               //updated to NOT use global strings (in GaussUtils)
359                Abort
360        endif
361       
362        SetDataFolder $("root:"+str)
363       
364        // Setup parameter table for model function
365        Make/O/D smear_coef_OEF_SHS = {0.01,100,50,110,60,1e-6,2e-6,6.3e-6,0.05,0.2,0.0001}
366        make/o/t smear_parameters_OEF_SHS = {"volume fraction","major core radius (A)","minor core radius (A)","major shell radius (A)","minor shell radius (A)","SLD core (A-2)","SLD shell (A-2)","SLD solvent (A^-2)","perturbation parameter (0.1)","stickiness, tau","bkg (cm-1)"}
367        Edit smear_parameters_OEF_SHS,smear_coef_OEF_SHS                                       
368       
369        // output smeared intensity wave, dimensions are identical to experimental QSIG values
370        // make extra copy of experimental q-values for easy plotting
371        Duplicate/O $(str+"_q") smeared_OEF_SHS,smeared_qvals                           
372        SetScale d,0,0,"1/cm",smeared_OEF_SHS                                                   
373                                       
374        Variable/G gs_OEF_SHS=0
375        gs_OEF_SHS := fSmearedOblate_SHS(smear_coef_OEF_SHS,smeared_OEF_SHS,smeared_qvals)      //this wrapper fills the STRUCT
376       
377        Display smeared_OEF_SHS vs smeared_qvals                                                                       
378        ModifyGraph log=1,marker=29,msize=2,mode=4
379        Label bottom "q (A\\S-1\\M)"
380        Label left "Intensity (cm\\S-1\\M)"
381
382        AutoPositionWindow/M=1/R=$(WinName(0,1)) $WinName(0,2)
383       
384        SetDataFolder root:
385        AddModelToStrings("SmearedOblate_SHS","smear_coef_OEF_SHS","smear_parameters_OEF_SHS","OEF_SHS")
386End
387       
388
389Function Oblate_SHS(w,yw,xw) : FitFunc
390        Wave w,yw,xw
391       
392        Variable inten,Ras,Rbs
393        Ras = w[4]      //Ras is the rotation axis
394        Rbs = w[3]
395       
396        //setup form factor coefficient wave
397        Make/O/D/N=9 form_OEF_SHS
398        form_OEF_SHS[0] = 1
399        form_OEF_SHS[1] = w[1]
400        form_OEF_SHS[2] = w[2]
401        form_OEF_SHS[3] = w[3]
402        form_OEF_SHS[4] = w[4]
403        form_OEF_SHS[5] = w[5]
404        form_OEF_SHS[6] = w[6]
405        form_OEF_SHS[7] = w[7]
406        form_OEF_SHS[8] = 0
407       
408        //setup structure factor coefficient wave
409        Make/O/D/N=4 struct_OEF_SHS
410        struct_OEF_SHS[0] = 0.5*DiamEllip(Ras,Rbs)
411        struct_OEF_SHS[1] = w[0]
412        struct_OEF_SHS[2] = w[8]
413        struct_OEF_SHS[3] = w[9]
414       
415        //calculate each and combine
416        Duplicate/O xw temp_OEF_SHS_PQ,temp_OEF_SHS_SQ          //make waves for the AAO
417        OblateForm(form_OEF_SHS,temp_OEF_SHS_PQ,xw)
418        StickyHS_Struct(struct_OEF_SHS,temp_OEF_SHS_SQ,xw)
419        yw = temp_OEF_SHS_PQ * temp_OEF_SHS_SQ
420        yw *= w[0]
421        yw += w[10]
422       
423        //cleanup waves
424//      Killwaves/Z form_OEF_SHS,struct_OEF_SHS
425       
426        return (0)
427End
428
429
430// this is all there is to the smeared calculation!
431Function SmearedOblate_HS(s) :FitFunc
432        Struct ResSmearAAOStruct &s
433
434//      the name of your unsmeared model is the first argument
435        Smear_Model_20(Oblate_HS,s.coefW,s.xW,s.yW,s.resW)
436
437        return(0)
438End
439
440// this is all there is to the smeared calculation!
441Function SmearedOblate_SW(s) :FitFunc
442        Struct ResSmearAAOStruct &s
443
444//      the name of your unsmeared model is the first argument
445        Smear_Model_20(Oblate_SW,s.coefW,s.xW,s.yW,s.resW)
446
447        return(0)
448End
449
450// this is all there is to the smeared calculation!
451Function SmearedOblate_SC(s) :FitFunc
452        Struct ResSmearAAOStruct &s
453
454//      the name of your unsmeared model is the first argument
455        Smear_Model_20(Oblate_SC,s.coefW,s.xW,s.yW,s.resW)
456
457        return(0)
458End
459
460// this is all there is to the smeared calculation!
461Function SmearedOblate_SHS(s) :FitFunc
462        Struct ResSmearAAOStruct &s
463
464//      the name of your unsmeared model is the first argument
465        Smear_Model_20(Oblate_SHS,s.coefW,s.xW,s.yW,s.resW)
466
467        return(0)
468End
469
470//wrapper to calculate the smeared model as an AAO-Struct
471// fills the struct and calls the ususal function with the STRUCT parameter
472//
473// used only for the dependency, not for fitting
474//
475Function fSmearedOblate_HS(coefW,yW,xW)
476        Wave coefW,yW,xW
477       
478        String str = getWavesDataFolder(yW,0)
479        String DF="root:"+str+":"
480       
481        WAVE resW = $(DF+str+"_res")
482       
483        STRUCT ResSmearAAOStruct fs
484        WAVE fs.coefW = coefW   
485        WAVE fs.yW = yW
486        WAVE fs.xW = xW
487        WAVE fs.resW = resW
488       
489        Variable err
490        err = SmearedOblate_HS(fs)
491       
492        return (0)
493End
494
495//wrapper to calculate the smeared model as an AAO-Struct
496// fills the struct and calls the ususal function with the STRUCT parameter
497//
498// used only for the dependency, not for fitting
499//
500Function fSmearedOblate_SW(coefW,yW,xW)
501        Wave coefW,yW,xW
502       
503        String str = getWavesDataFolder(yW,0)
504        String DF="root:"+str+":"
505       
506        WAVE resW = $(DF+str+"_res")
507       
508        STRUCT ResSmearAAOStruct fs
509        WAVE fs.coefW = coefW   
510        WAVE fs.yW = yW
511        WAVE fs.xW = xW
512        WAVE fs.resW = resW
513       
514        Variable err
515        err = SmearedOblate_SW(fs)
516       
517        return (0)
518End
519
520//wrapper to calculate the smeared model as an AAO-Struct
521// fills the struct and calls the ususal function with the STRUCT parameter
522//
523// used only for the dependency, not for fitting
524//
525Function fSmearedOblate_SC(coefW,yW,xW)
526        Wave coefW,yW,xW
527       
528        String str = getWavesDataFolder(yW,0)
529        String DF="root:"+str+":"
530       
531        WAVE resW = $(DF+str+"_res")
532       
533        STRUCT ResSmearAAOStruct fs
534        WAVE fs.coefW = coefW   
535        WAVE fs.yW = yW
536        WAVE fs.xW = xW
537        WAVE fs.resW = resW
538       
539        Variable err
540        err = SmearedOblate_SC(fs)
541       
542        return (0)
543End
544
545//wrapper to calculate the smeared model as an AAO-Struct
546// fills the struct and calls the ususal function with the STRUCT parameter
547//
548// used only for the dependency, not for fitting
549//
550Function fSmearedOblate_SHS(coefW,yW,xW)
551        Wave coefW,yW,xW
552       
553        String str = getWavesDataFolder(yW,0)
554        String DF="root:"+str+":"
555       
556        WAVE resW = $(DF+str+"_res")
557       
558        STRUCT ResSmearAAOStruct fs
559        WAVE fs.coefW = coefW   
560        WAVE fs.yW = yW
561        WAVE fs.xW = xW
562        WAVE fs.resW = resW
563       
564        Variable err
565        err = SmearedOblate_SHS(fs)
566       
567        return (0)
568End
Note: See TracBrowser for help on using the repository browser.