source: sans/Dev/trunk/NCNR_User_Procedures/Analysis/Models/UniformEllipsoid_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: 16.7 KB
Line 
1#pragma rtGlobals=1             // Use modern global access method.
2#pragma IgorVersion = 6.0
3
4// be sure to include all the necessary files...
5
6#include "EffectiveDiameter_v40"
7#include "UniformEllipsoid_v40"
8
9#include "HardSphereStruct_v40"
10#include "HPMSA_v40"
11#include "SquareWellStruct_v40"
12#include "StickyHardSphereStruct_v40"
13
14Proc PlotEllipsoid_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_EOR_HS,ywave_EOR_HS
21        xwave_EOR_HS =  alog(log(qmin) + x*((log(qmax)-log(qmin))/num))
22        Make/O/D coef_EOR_HS = {0.01,20.,400,1e-6,6.3e-6,0.01}
23        make/o/t parameters_EOR_HS = {"volume fraction","R(a) rotation axis (A)","R(b) (A)","SLD ellipsoid (A^-2)","SLD solvent (A^-2)","incoh. bkg (cm^-1)"}
24        Edit parameters_EOR_HS,coef_EOR_HS
25       
26        Variable/G root:g_EOR_HS
27        g_EOR_HS := Ellipsoid_HS(coef_EOR_HS,ywave_EOR_HS,xwave_EOR_HS)
28        Display ywave_EOR_HS vs xwave_EOR_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        AutoPositionWindow/M=1/R=$(WinName(0,1)) $WinName(0,2)
33       
34        AddModelToStrings("Ellipsoid_HS","coef_EOR_HS","parameters_EOR_HS","EOR_HS")
35End
36
37// - sets up a dependency to a wrapper, not the actual SmearedModelFunction
38Proc PlotSmearedEllipsoid_HS(str)                                                               
39        String str
40        Prompt str,"Pick the data folder containing the resolution you want",popup,getAList(4)
41       
42        // if any of the resolution waves are missing => abort
43        if(ResolutionWavesMissingDF(str))               //updated to NOT use global strings (in GaussUtils)
44                Abort
45        endif
46       
47        SetDataFolder $("root:"+str)
48       
49        // Setup parameter table for model function
50        Make/O/D smear_coef_EOR_HS = {0.01,20.,400,1e-6,6.3e-6,0.01}
51        make/o/t smear_parameters_EOR_HS = {"volume fraction","R(a) rotation axis (A)","R(b) (A)","SLD ellipsoid (A^-2)","SLD solvent (A^-2)","incoh. bkg (cm^-1)"}
52        Edit smear_parameters_EOR_HS,smear_coef_EOR_HS                                 
53       
54        // output smeared intensity wave, dimensions are identical to experimental QSIG values
55        // make extra copy of experimental q-values for easy plotting
56        Duplicate/O $(str+"_q") smeared_EOR_HS,smeared_qvals                           
57        SetScale d,0,0,"1/cm",smeared_EOR_HS                                                   
58                                       
59        Variable/G gs_EOR_HS=0
60        gs_EOR_HS := fSmearedEllipsoid_HS(smear_coef_EOR_HS,smeared_EOR_HS,smeared_qvals)       //this wrapper fills the STRUCT
61       
62        Display smeared_EOR_HS vs smeared_qvals                                                                 
63        ModifyGraph log=1,marker=29,msize=2,mode=4
64        Label bottom "q (A\\S-1\\M)"
65        Label left "Intensity (cm\\S-1\\M)"
66
67        AutoPositionWindow/M=1/R=$(WinName(0,1)) $WinName(0,2)
68       
69        SetDataFolder root:
70        AddModelToStrings("SmearedEllipsoid_HS","smear_coef_EOR_HS","smear_parameters_EOR_HS","EOR_HS")
71End
72       
73
74//AAO function
75Function Ellipsoid_HS(w,yW,xW) : FitFunc
76        Wave w,yW,xW
77       
78        Variable inten,aa,bb
79        aa=w[1]
80        bb=w[2]
81       
82        //setup form factor coefficient wave
83        Make/O/D/N=6 form_EOR_HS
84        form_EOR_HS[0] = 1
85        form_EOR_HS[1] = w[1]
86        form_EOR_HS[2] = w[2]
87        form_EOR_HS[3] = w[3]
88        form_EOR_HS[4] = w[4]
89        form_EOR_HS[5] = 0
90       
91        //setup structure factor coefficient wave
92        Make/O/D/N=2 struct_EOR_HS
93        struct_EOR_HS[0] = 0.5*DiamEllip(aa,bb)
94        struct_EOR_HS[1] = w[0]
95       
96        //calculate each and combine
97        Duplicate/O xw, temp_EOR_HS_PQ,temp_EOR_HS_SQ
98        EllipsoidForm(form_EOR_HS,temp_EOR_HS_PQ,xW)
99        HardSphereStruct(struct_EOR_HS,temp_EOR_HS_SQ,xW)
100        yw = temp_EOR_HS_PQ * temp_EOR_HS_SQ
101        yw *= w[0]
102        yw += w[5]
103       
104        //cleanup waves
105//      Killwaves/Z form_EOR_HS,struct_EOR_HS
106       
107        return (0)
108End
109
110Proc PlotEllipsoid_SW(num,qmin,qmax)
111        Variable num=128,qmin=0.001,qmax=0.7
112        Prompt num "Enter number of data points for model: "
113        Prompt qmin "Enter minimum q-value (A^-1) for model: "
114        Prompt qmax "Enter maximum q-value (A^-1) for model: "
115       
116        Make/O/D/n=(num) xwave_EOR_SW,ywave_EOR_SW
117        xwave_EOR_SW =  alog(log(qmin) + x*((log(qmax)-log(qmin))/num))
118        Make/O/D coef_EOR_SW = {0.01,20.,400,1e-6,6.3e-6,1.0,1.2,0.01}
119        make/o/t parameters_EOR_SW = {"volume fraction","R(a) rotation axis (A)","R(b) (A)","SLD ellipsoid (A^-2)","SLD solvent (A^-2)","well depth (kT)","well width (diam.)","incoh. bkg (cm^-1)"}
120        Edit parameters_EOR_SW,coef_EOR_SW
121       
122        Variable/G root:g_EOR_SW
123        g_EOR_SW := Ellipsoid_SW(coef_EOR_SW,ywave_EOR_SW,xwave_EOR_SW)
124        Display ywave_EOR_SW vs xwave_EOR_SW
125        ModifyGraph log=1,marker=29,msize=2,mode=4
126        Label bottom "q (A\\S-1\\M)"
127        Label left "Intensity (cm\\S-1\\M)"
128
129        AutoPositionWindow/M=1/R=$(WinName(0,1)) $WinName(0,2)
130       
131        AddModelToStrings("Ellipsoid_SW","coef_EOR_SW","parameters_EOR_SW","EOR_SW")
132End
133
134// - sets up a dependency to a wrapper, not the actual SmearedModelFunction
135Proc PlotSmearedEllipsoid_SW(str)                                                               
136        String str
137        Prompt str,"Pick the data folder containing the resolution you want",popup,getAList(4)
138       
139        // if any of the resolution waves are missing => abort
140        if(ResolutionWavesMissingDF(str))               //updated to NOT use global strings (in GaussUtils)
141                Abort
142        endif
143       
144        SetDataFolder $("root:"+str)
145       
146        // Setup parameter table for model function
147        Make/O/D smear_coef_EOR_SW = {0.01,20.,400,1e-6,6.3e-6,1.0,1.2,0.01}
148        make/o/t smear_parameters_EOR_SW = {"volume fraction","R(a) rotation axis (A)","R(b) (A)","SLD ellipsoid (A^-2)","SLD solvent (A^-2)","well depth (kT)","well width (diam.)","incoh. bkg (cm^-1)"}
149        Edit smear_parameters_EOR_SW,smear_coef_EOR_SW                                 
150       
151        // output smeared intensity wave, dimensions are identical to experimental QSIG values
152        // make extra copy of experimental q-values for easy plotting
153        Duplicate/O $(str+"_q") smeared_EOR_SW,smeared_qvals                           
154        SetScale d,0,0,"1/cm",smeared_EOR_SW                                                   
155                                       
156        Variable/G gs_EOR_SW=0
157        gs_EOR_SW := fSmearedEllipsoid_SW(smear_coef_EOR_SW,smeared_EOR_SW,smeared_qvals)       //this wrapper fills the STRUCT
158       
159        Display smeared_EOR_SW vs smeared_qvals                                                                 
160        ModifyGraph log=1,marker=29,msize=2,mode=4
161        Label bottom "q (A\\S-1\\M)"
162        Label left "Intensity (cm\\S-1\\M)"
163
164        AutoPositionWindow/M=1/R=$(WinName(0,1)) $WinName(0,2)
165       
166        SetDataFolder root:
167        AddModelToStrings("SmearedEllipsoid_SW","smear_coef_EOR_SW","smear_parameters_EOR_SW","EOR_SW")
168End
169       
170
171Function Ellipsoid_SW(w,yw,xw) : FitFunc
172        Wave w,yw,xw
173       
174        Variable inten,aa,bb
175        aa=w[1]
176        bb=w[2]
177       
178        //setup form factor coefficient wave
179        Make/O/D/N=6 form_EOR_SW
180        form_EOR_SW[0] = 1
181        form_EOR_SW[1] = w[1]
182        form_EOR_SW[2] = w[2]
183        form_EOR_SW[3] = w[3]
184        form_EOR_SW[4] = w[4]
185        form_EOR_SW[5] = 0
186       
187        //setup structure factor coefficient wave
188        Make/O/D/N=4 struct_EOR_SW
189        struct_EOR_SW[0] = 0.5*DiamEllip(aa,bb)
190        struct_EOR_SW[1] = w[0]
191        struct_EOR_SW[2] = w[5]
192        struct_EOR_SW[3] = w[6]
193       
194        //calculate each and combine
195        Duplicate/O xw, temp_EOR_SW_PQ,temp_EOR_SW_SQ
196        EllipsoidForm(form_EOR_SW,temp_EOR_SW_PQ,xw)
197        SquareWellStruct(struct_EOR_SW,temp_EOR_SW_SQ,xw)
198        yw = temp_EOR_SW_PQ * temp_EOR_SW_SQ
199        yw *= w[0]
200        yw += w[7]
201       
202        //cleanup waves
203//      Killwaves/Z form_EOR_SW,struct_EOR_SW
204       
205        return (0)
206End
207
208Proc PlotEllipsoid_SC(num,qmin,qmax)
209        Variable num=128,qmin=0.001,qmax=0.7
210        Prompt num "Enter number of data points for model: "
211        Prompt qmin "Enter minimum q-value (A^-1) for model: "
212        Prompt qmax "Enter maximum q-value (A^-1) for model: "
213       
214        if(!DataFolderExists(":HayPenMSA"))
215                NewDataFolder :HayPenMSA
216        endif
217        Make/O/D/N=17 :HayPenMSA:gMSAWave
218       
219        Make/O/D/n=(num) xwave_EOR_SC,ywave_EOR_SC
220        xwave_EOR_SC =  alog(log(qmin) + x*((log(qmax)-log(qmin))/num))
221        Make/O/D coef_EOR_SC = {0.01,20.,400,1e-6,6.3e-6,20,0,298,78,0.01}
222        make/o/t parameters_EOR_SC = {"volume fraction","R(a) rotation axis (A)","R(b) (A)","SLD ellipsoid (A^-2)","SLD solvent (A^-2)","charge","movalent salt(M)","Temperature (K)","dielectric const","incoh. bkg (cm^-1)"}
223        Edit parameters_EOR_SC,coef_EOR_SC
224
225        Variable/G root:g_EOR_SC
226        g_EOR_SC := Ellipsoid_SC(coef_EOR_SC,ywave_EOR_SC,xwave_EOR_SC)
227        Display ywave_EOR_SC vs xwave_EOR_SC
228        ModifyGraph log=1,marker=29,msize=2,mode=4
229        Label bottom "q (A\\S-1\\M)"
230        Label left "Intensity (cm\\S-1\\M)"
231
232        AutoPositionWindow/M=1/R=$(WinName(0,1)) $WinName(0,2)
233       
234        AddModelToStrings("Ellipsoid_SC","coef_EOR_SC","parameters_EOR_SC","EOR_SC")
235End
236
237// - sets up a dependency to a wrapper, not the actual SmearedModelFunction
238Proc PlotSmearedEllipsoid_SC(str)                                                               
239        String str
240        Prompt str,"Pick the data folder containing the resolution you want",popup,getAList(4)
241       
242        // if any of the resolution waves are missing => abort
243        if(ResolutionWavesMissingDF(str))               //updated to NOT use global strings (in GaussUtils)
244                Abort
245        endif
246       
247        SetDataFolder $("root:"+str)
248       
249        if(!DataFolderExists(":HayPenMSA"))
250                NewDataFolder :HayPenMSA
251        endif
252        Make/O/D/N=17 :HayPenMSA:gMSAWave
253       
254        // Setup parameter table for model function
255        Make/O/D smear_coef_EOR_SC = {0.01,20.,400,1e-6,6.3e-6,20,0,298,78,0.01}
256        make/o/t smear_parameters_EOR_SC = {"volume fraction","R(a) rotation axis (A)","R(b) (A)","SLD ellipsoid (A^-2)","SLD solvent (A^-2)","charge","movalent salt(M)","Temperature (K)","dielectric const","incoh. bkg (cm^-1)"}
257        Edit smear_parameters_EOR_SC,smear_coef_EOR_SC                                 
258       
259        // output smeared intensity wave, dimensions are identical to experimental QSIG values
260        // make extra copy of experimental q-values for easy plotting
261        Duplicate/O $(str+"_q") smeared_EOR_SC,smeared_qvals                           
262        SetScale d,0,0,"1/cm",smeared_EOR_SC                                                   
263                                       
264        Variable/G gs_EOR_SC=0
265        gs_EOR_SC := fSmearedEllipsoid_SC(smear_coef_EOR_SC,smeared_EOR_SC,smeared_qvals)       //this wrapper fills the STRUCT
266       
267        Display smeared_EOR_SC vs smeared_qvals                                                                 
268        ModifyGraph log=1,marker=29,msize=2,mode=4
269        Label bottom "q (A\\S-1\\M)"
270        Label left "Intensity (cm\\S-1\\M)"
271
272        AutoPositionWindow/M=1/R=$(WinName(0,1)) $WinName(0,2)
273       
274        SetDataFolder root:
275        AddModelToStrings("SmearedEllipsoid_SC","smear_coef_EOR_SC","smear_parameters_EOR_SC","EOR_SC")
276End
277
278
279Function Ellipsoid_SC(w,yw,xw) : FitFunc
280        Wave w,yw,xw
281       
282        Variable inten,aa,bb
283        aa=w[1]
284        bb=w[2]
285       
286        //setup form factor coefficient wave
287        Make/O/D/N=6 form_EOR_SC
288        form_EOR_SC[0] = 1
289        form_EOR_SC[1] = w[1]
290        form_EOR_SC[2] = w[2]
291        form_EOR_SC[3] = w[3]
292        form_EOR_SC[4] = w[4]
293        form_EOR_SC[5] = 0
294       
295        //setup structure factor coefficient wave
296        Make/O/D/N=6 struct_EOR_SC
297        struct_EOR_SC[0] = DiamEllip(aa,bb)
298        struct_EOR_SC[1] = w[5]
299        struct_EOR_SC[2] = w[0]
300        struct_EOR_SC[3] = w[7]
301        struct_EOR_SC[4] = w[6]
302        struct_EOR_SC[5] = w[8]
303       
304        //calculate each and combine
305        Duplicate/O xw, temp_EOR_SC_PQ,temp_EOR_SC_SQ
306        EllipsoidForm(form_EOR_SC,temp_EOR_SC_PQ,xw)
307        HayterPenfoldMSA(struct_EOR_SC,temp_EOR_SC_SQ,xw)
308        yw = temp_EOR_SC_PQ * temp_EOR_SC_SQ
309        yw *= w[0]
310        yw += w[9]
311       
312        //cleanup waves
313//      Killwaves/Z form_EOR_SC,struct_EOR_SC
314       
315        return (0)
316End
317
318Proc PlotEllipsoid_SHS(num,qmin,qmax)
319        Variable num=128,qmin=0.001,qmax=0.7
320        Prompt num "Enter number of data points for model: "
321        Prompt qmin "Enter minimum q-value (A^-1) for model: "
322        Prompt qmax "Enter maximum q-value (A^-1) for model: "
323       
324        Make/O/D/n=(num) xwave_EOR_SHS,ywave_EOR_SHS
325        xwave_EOR_SHS =  alog(log(qmin) + x*((log(qmax)-log(qmin))/num))
326        Make/O/D coef_EOR_SHS = {0.01,20.,400,1e-6,6.3e-6,0.05,0.2,0.01}
327        make/o/t parameters_EOR_SHS = {"volume fraction","R(a) rotation axis (A)","R(b) (A)","SLD ellipsoid (A^-2)","SLD solvent (A^-2)","perturbation parameter (0.1)","stickiness, tau","incoh. bkg (cm^-1)"}
328        Edit parameters_EOR_SHS,coef_EOR_SHS
329       
330        Variable/G root:g_EOR_SHS
331        g_EOR_SHS := Ellipsoid_SHS(coef_EOR_SHS,ywave_EOR_SHS,xwave_EOR_SHS)
332        Display ywave_EOR_SHS vs xwave_EOR_SHS
333        ModifyGraph log=1,marker=29,msize=2,mode=4
334        Label bottom "q (A\\S-1\\M)"
335        Label left "Intensity (cm\\S-1\\M)"
336
337        AutoPositionWindow/M=1/R=$(WinName(0,1)) $WinName(0,2)
338       
339        AddModelToStrings("Ellipsoid_SHS","coef_EOR_SHS","parameters_EOR_SHS","EOR_SHS")
340End
341
342// - sets up a dependency to a wrapper, not the actual SmearedModelFunction
343Proc PlotSmearedEllipsoid_SHS(str)                                                             
344        String str
345        Prompt str,"Pick the data folder containing the resolution you want",popup,getAList(4)
346       
347        // if any of the resolution waves are missing => abort
348        if(ResolutionWavesMissingDF(str))               //updated to NOT use global strings (in GaussUtils)
349                Abort
350        endif
351       
352        SetDataFolder $("root:"+str)
353       
354        // Setup parameter table for model function
355        Make/O/D smear_coef_EOR_SHS = {0.01,20.,400,1e-6,6.3e-6,0.05,0.2,0.01}
356        make/o/t smear_parameters_EOR_SHS = {"volume fraction","R(a) rotation axis (A)","R(b) (A)","SLD ellipsoid (A^-2)","SLD solvent (A^-2)","perturbation parameter (0.1)","stickiness, tau","incoh. bkg (cm^-1)"}
357        Edit smear_parameters_EOR_SHS,smear_coef_EOR_SHS                                       
358       
359        // output smeared intensity wave, dimensions are identical to experimental QSIG values
360        // make extra copy of experimental q-values for easy plotting
361        Duplicate/O $(str+"_q") smeared_EOR_SHS,smeared_qvals                           
362        SetScale d,0,0,"1/cm",smeared_EOR_SHS                                                   
363                                       
364        Variable/G gs_EOR_SHS=0
365        gs_EOR_SHS := fSmearedEllipsoid_SHS(smear_coef_EOR_SHS,smeared_EOR_SHS,smeared_qvals)   //this wrapper fills the STRUCT
366       
367        Display smeared_EOR_SHS vs smeared_qvals                                                                       
368        ModifyGraph log=1,marker=29,msize=2,mode=4
369        Label bottom "q (A\\S-1\\M)"
370        Label left "Intensity (cm\\S-1\\M)"
371
372        AutoPositionWindow/M=1/R=$(WinName(0,1)) $WinName(0,2)
373       
374        SetDataFolder root:
375        AddModelToStrings("SmearedEllipsoid_SHS","smear_coef_EOR_SHS","smear_parameters_EOR_SHS","EOR_SHS")
376End
377       
378
379Function Ellipsoid_SHS(w,yw,xw) : FitFunc
380        Wave w,yw,xw
381       
382        Variable inten,aa,bb
383        aa=w[1]
384        bb=w[2]
385       
386        //setup form factor coefficient wave
387        Make/O/D/N=6 form_EOR_SHS
388        form_EOR_SHS[0] = 1
389        form_EOR_SHS[1] = w[1]
390        form_EOR_SHS[2] = w[2]
391        form_EOR_SHS[3] = w[3]
392        form_EOR_SHS[4] = w[4]
393        form_EOR_SHS[5] = 0
394       
395        //setup structure factor coefficient wave
396        Make/O/D/N=4 struct_EOR_SHS
397        struct_EOR_SHS[0] = 0.5*DiamEllip(aa,bb)
398        struct_EOR_SHS[1] = w[0]
399        struct_EOR_SHS[2] = w[5]
400        struct_EOR_SHS[3] = w[6]
401       
402        //calculate each and combine
403        Duplicate/O xw, temp_EOR_SHS_PQ,temp_EOR_SHS_SQ
404        EllipsoidForm(form_EOR_SHS,temp_EOR_SHS_PQ,xw)
405        StickyHS_Struct(struct_EOR_SHS,temp_EOR_SHS_SQ,xw)
406        yw = temp_EOR_SHS_PQ *temp_EOR_SHS_SQ
407        yw *= w[0]
408        yw += w[7]
409       
410        //cleanup waves
411//      Killwaves/Z form_EOR_SHS,struct_EOR_SHS
412       
413        return (0)
414End
415
416
417
418// this is all there is to the smeared calculation!
419Function SmearedEllipsoid_HS(s) :FitFunc
420        Struct ResSmearAAOStruct &s
421
422//      the name of your unsmeared model is the first argument
423        Smear_Model_20(Ellipsoid_HS,s.coefW,s.xW,s.yW,s.resW)
424
425        return(0)
426End
427
428// this is all there is to the smeared calculation!
429Function SmearedEllipsoid_SW(s) :FitFunc
430        Struct ResSmearAAOStruct &s
431
432//      the name of your unsmeared model is the first argument
433        Smear_Model_20(Ellipsoid_SW,s.coefW,s.xW,s.yW,s.resW)
434
435        return(0)
436End
437
438// this is all there is to the smeared calculation!
439Function SmearedEllipsoid_SC(s) :FitFunc
440        Struct ResSmearAAOStruct &s
441
442//      the name of your unsmeared model is the first argument
443        Smear_Model_20(Ellipsoid_SC,s.coefW,s.xW,s.yW,s.resW)
444
445        return(0)
446End
447
448// this is all there is to the smeared calculation!
449Function SmearedEllipsoid_SHS(s) :FitFunc
450        Struct ResSmearAAOStruct &s
451
452//      the name of your unsmeared model is the first argument
453        Smear_Model_20(Ellipsoid_SHS,s.coefW,s.xW,s.yW,s.resW)
454
455        return(0)
456End
457
458//wrapper to calculate the smeared model as an AAO-Struct
459// fills the struct and calls the ususal function with the STRUCT parameter
460//
461// used only for the dependency, not for fitting
462//
463Function fSmearedEllipsoid_HS(coefW,yW,xW)
464        Wave coefW,yW,xW
465       
466        String str = getWavesDataFolder(yW,0)
467        String DF="root:"+str+":"
468       
469        WAVE resW = $(DF+str+"_res")
470       
471        STRUCT ResSmearAAOStruct fs
472        WAVE fs.coefW = coefW   
473        WAVE fs.yW = yW
474        WAVE fs.xW = xW
475        WAVE fs.resW = resW
476       
477        Variable err
478        err = SmearedEllipsoid_HS(fs)
479       
480        return (0)
481End
482
483//wrapper to calculate the smeared model as an AAO-Struct
484// fills the struct and calls the ususal function with the STRUCT parameter
485//
486// used only for the dependency, not for fitting
487//
488Function fSmearedEllipsoid_SW(coefW,yW,xW)
489        Wave coefW,yW,xW
490       
491        String str = getWavesDataFolder(yW,0)
492        String DF="root:"+str+":"
493       
494        WAVE resW = $(DF+str+"_res")
495       
496        STRUCT ResSmearAAOStruct fs
497        WAVE fs.coefW = coefW   
498        WAVE fs.yW = yW
499        WAVE fs.xW = xW
500        WAVE fs.resW = resW
501       
502        Variable err
503        err = SmearedEllipsoid_SW(fs)
504       
505        return (0)
506End
507
508//wrapper to calculate the smeared model as an AAO-Struct
509// fills the struct and calls the ususal function with the STRUCT parameter
510//
511// used only for the dependency, not for fitting
512//
513Function fSmearedEllipsoid_SC(coefW,yW,xW)
514        Wave coefW,yW,xW
515       
516        String str = getWavesDataFolder(yW,0)
517        String DF="root:"+str+":"
518       
519        WAVE resW = $(DF+str+"_res")
520       
521        STRUCT ResSmearAAOStruct fs
522        WAVE fs.coefW = coefW   
523        WAVE fs.yW = yW
524        WAVE fs.xW = xW
525        WAVE fs.resW = resW
526       
527        Variable err
528        err = SmearedEllipsoid_SC(fs)
529       
530        return (0)
531End
532
533//wrapper to calculate the smeared model as an AAO-Struct
534// fills the struct and calls the ususal function with the STRUCT parameter
535//
536// used only for the dependency, not for fitting
537//
538Function fSmearedEllipsoid_SHS(coefW,yW,xW)
539        Wave coefW,yW,xW
540       
541        String str = getWavesDataFolder(yW,0)
542        String DF="root:"+str+":"
543       
544        WAVE resW = $(DF+str+"_res")
545       
546        STRUCT ResSmearAAOStruct fs
547        WAVE fs.coefW = coefW   
548        WAVE fs.yW = yW
549        WAVE fs.xW = xW
550        WAVE fs.resW = resW
551       
552        Variable err
553        err = SmearedEllipsoid_SHS(fs)
554       
555        return (0)
556End
Note: See TracBrowser for help on using the repository browser.