source: sans/Analysis/branches/ajj_23APR07/IGOR_Package_Files/Put in User Procedures/SANS_Models_v3.00/OblateCS_and_Struct.ipf @ 153

Last change on this file since 153 was 151, checked in by srkline, 15 years ago

(1) - cursors can now be used to select a subrange of USANS data to fit. This is done by th fit wrapper, assigning a subrange of resW to the struct

(2) all of the smeared model functions are now in the latest form of Smear_Model_N() that is NOT a pointwise calculation anymore, since the USANS matrix smearing in inherently not so.

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