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

Last change on this file since 146 was 131, checked in by srkline, 15 years ago

Typo in dialog in every model...

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 the necessary files...
5#include "ProlateForm"
6#include "EffectiveDiameter"
7
8#include "HardSphereStruct"
9#include "HPMSA"
10#include "SquareWellStruct"
11#include "StickyHardSphereStruct"
12
13Proc PlotProlate_HS(num,qmin,qmax)
14        Variable num=128,qmin=0.001,qmax=0.7
15        Prompt num "Enter number of data points for model: "
16        Prompt qmin "Enter minimum q-value (^-1) for model: "
17        Prompt qmax "Enter maximum q-value (^-1) for model: "
18       
19        Make/O/D/n=(num) xwave_PEF_HS,ywave_PEF_HS
20        xwave_PEF_HS =  alog(log(qmin) + x*((log(qmax)-log(qmin))/num))
21        Make/O/D coef_PEF_HS = {0.01,100,50,110,60,1e-6,2e-6,0.0001}
22        make/o/t parameters_PEF_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)"}
23        Edit parameters_PEF_HS,coef_PEF_HS
24       
25        Variable/G root:g_PEF_HS
26        g_PEF_HS := Prolate_HS(coef_PEF_HS,ywave_PEF_HS,xwave_PEF_HS)
27        Display ywave_PEF_HS vs xwave_PEF_HS
28        ModifyGraph log=1,marker=29,msize=2,mode=4
29        Label bottom "q (\\S-1\\M)"
30        Label left "Intensity (cm\\S-1\\M)"
31
32        AutoPositionWindow/M=1/R=$(WinName(0,1)) $WinName(0,2)
33End
34
35// - sets up a dependency to a wrapper, not the actual SmearedModelFunction
36Proc PlotSmearedProlate_HS(str)                                                         
37        String str
38        Prompt str,"Pick the data folder containing the resolution you want",popup,getAList(4)
39       
40        // if any of the resolution waves are missing => abort
41        if(ResolutionWavesMissingDF(str))               //updated to NOT use global strings (in GaussUtils)
42                Abort
43        endif
44       
45        SetDataFolder $("root:"+str)
46       
47        // Setup parameter table for model function
48        Make/O/D smear_coef_PEF_HS = {0.01,100,50,110,60,1e-6,2e-6,0.0001}
49        make/o/t smear_parameters_PEF_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)"}
50        Edit smear_parameters_PEF_HS,smear_coef_PEF_HS                                 
51       
52        // output smeared intensity wave, dimensions are identical to experimental QSIG values
53        // make extra copy of experimental q-values for easy plotting
54        Duplicate/O $(str+"_q") smeared_PEF_HS,smeared_qvals                           
55        SetScale d,0,0,"1/cm",smeared_PEF_HS                                                   
56                                       
57        Variable/G gs_PEF_HS=0
58        gs_PEF_HS := fSmearedProlate_HS(smear_coef_PEF_HS,smeared_PEF_HS,smeared_qvals) //this wrapper fills the STRUCT
59       
60        Display smeared_PEF_HS vs smeared_qvals                                                                 
61        ModifyGraph log=1,marker=29,msize=2,mode=4
62        Label bottom "q (\\S-1\\M)"
63        Label left "Intensity (cm\\S-1\\M)"
64
65        AutoPositionWindow/M=1/R=$(WinName(0,1)) $WinName(0,2)
66       
67        SetDataFolder root:
68End
69       
70
71Function Prolate_HS(w,yw,xw) : FitFunc
72        Wave w,yw,xw
73       
74        Variable inten,Ras,Rbs
75        Ras = w[3]      //Ras is the rotation axis
76        Rbs = w[4]
77       
78        //setup form factor coefficient wave
79        Make/O/D/N=8 form_PEF_HS
80        form_PEF_HS[0] = 1
81        form_PEF_HS[1] = w[1]
82        form_PEF_HS[2] = w[2]
83        form_PEF_HS[3] = w[3]
84        form_PEF_HS[4] = w[4]
85        form_PEF_HS[5] = w[5]
86        form_PEF_HS[6] = w[6]
87        form_PEF_HS[7] = 0
88       
89        //setup structure factor coefficient wave
90        Make/O/D/N=2 struct_PEF_HS
91        struct_PEF_HS[0] = 0.5*DiamEllip(Ras,Rbs)
92        struct_PEF_HS[1] = w[0]
93       
94        //calculate each and combine
95        Duplicate/O xw temp_PEF_HS_PQ,temp_PEF_HS_SQ            //make waves for the AAO
96        ProlateForm(form_PEF_HS,temp_PEF_HS_PQ,xw)
97        HardSphereStruct(struct_PEF_HS,temp_PEF_HS_SQ,xw)
98        yw = temp_PEF_HS_PQ *temp_PEF_HS_SQ
99        yw *= w[0]
100        yw += w[7]
101       
102        //cleanup waves
103//      Killwaves/Z form_PEF_HS,struct_PEF_HS
104       
105        return (yw)
106End
107
108Proc PlotProlate_SW(num,qmin,qmax)
109        Variable num=128,qmin=0.001,qmax=0.7
110        Prompt num "Enter number of data points for model: "
111        Prompt qmin "Enter minimum q-value (^-1) for model: "
112        Prompt qmax "Enter maximum q-value (^-1) for model: "
113       
114        Make/O/D/n=(num) xwave_PEF_SW,ywave_PEF_SW
115        xwave_PEF_SW =  alog(log(qmin) + x*((log(qmax)-log(qmin))/num))
116        Make/O/D coef_PEF_SW = {0.01,100,50,110,60,1e-6,2e-6,1.0,1.2,0.0001}
117        make/o/t parameters_PEF_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)"}
118        Edit parameters_PEF_SW,coef_PEF_SW
119       
120        Variable/G root:g_PEF_SW
121        g_PEF_SW := Prolate_SW(coef_PEF_SW,ywave_PEF_SW,xwave_PEF_SW)
122        Display ywave_PEF_SW vs xwave_PEF_SW
123        ModifyGraph log=1,marker=29,msize=2,mode=4
124        Label bottom "q (\\S-1\\M)"
125        Label left "Intensity (cm\\S-1\\M)"
126
127        AutoPositionWindow/M=1/R=$(WinName(0,1)) $WinName(0,2)
128End
129
130// - sets up a dependency to a wrapper, not the actual SmearedModelFunction
131Proc PlotSmearedProlate_SW(str)                                                         
132        String str
133        Prompt str,"Pick the data folder containing the resolution you want",popup,getAList(4)
134       
135        // if any of the resolution waves are missing => abort
136        if(ResolutionWavesMissingDF(str))               //updated to NOT use global strings (in GaussUtils)
137                Abort
138        endif
139       
140        SetDataFolder $("root:"+str)
141       
142        // Setup parameter table for model function
143        Make/O/D smear_coef_PEF_SW = {0.01,100,50,110,60,1e-6,2e-6,1.0,1.2,0.0001}
144        make/o/t smear_parameters_PEF_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)"}
145        Edit smear_parameters_PEF_SW,smear_coef_PEF_SW                                 
146       
147        // output smeared intensity wave, dimensions are identical to experimental QSIG values
148        // make extra copy of experimental q-values for easy plotting
149        Duplicate/O $(str+"_q") smeared_PEF_SW,smeared_qvals                           
150        SetScale d,0,0,"1/cm",smeared_PEF_SW                                                   
151                                       
152        Variable/G gs_PEF_SW=0
153        gs_PEF_SW := fSmearedProlate_SW(smear_coef_PEF_SW,smeared_PEF_SW,smeared_qvals) //this wrapper fills the STRUCT
154       
155        Display smeared_PEF_SW vs smeared_qvals                                                                 
156        ModifyGraph log=1,marker=29,msize=2,mode=4
157        Label bottom "q (\\S-1\\M)"
158        Label left "Intensity (cm\\S-1\\M)"
159
160        AutoPositionWindow/M=1/R=$(WinName(0,1)) $WinName(0,2)
161       
162        SetDataFolder root:
163End
164       
165
166Function Prolate_SW(w,yw,xw) : FitFunc
167        Wave w,yw,xw
168       
169        Variable inten,Ras,Rbs
170        Ras = w[3]      //Ras is the rotation axis
171        Rbs = w[4]
172       
173        //setup form factor coefficient wave
174        Make/O/D/N=8 form_PEF_SW
175        form_PEF_SW[0] = 1
176        form_PEF_SW[1] = w[1]
177        form_PEF_SW[2] = w[2]
178        form_PEF_SW[3] = w[3]
179        form_PEF_SW[4] = w[4]
180        form_PEF_SW[5] = w[5]
181        form_PEF_SW[6] = w[6]
182        form_PEF_SW[7] = 0
183       
184        //setup structure factor coefficient wave
185        Make/O/D/N=4 struct_PEF_SW
186        struct_PEF_SW[0] = 0.5*DiamEllip(Ras,Rbs)
187        struct_PEF_SW[1] = w[0]
188        struct_PEF_SW[2] = w[7]
189        struct_PEF_SW[3] = w[8]
190       
191        //calculate each and combine
192        Duplicate/O xw temp_PEF_SW_PQ,temp_PEF_SW_SQ            //make waves for the AAO
193        ProlateForm(form_PEF_SW,temp_PEF_SW_PQ,xw)
194        SquareWellStruct(struct_PEF_SW,temp_PEF_SW_SQ,xw)
195        yw = temp_PEF_SW_PQ * temp_PEF_SW_SQ
196        yw *= w[0]
197        yw += w[9]
198       
199        //cleanup waves
200//      Killwaves/Z form_PEF_SW,struct_PEF_SW
201       
202        return (0)
203End
204
205Proc PlotProlate_SC(num,qmin,qmax)
206        Variable num=128,qmin=0.001,qmax=0.7
207        Prompt num "Enter number of data points for model: "
208        Prompt qmin "Enter minimum q-value (^-1) for model: "
209        Prompt qmax "Enter maximum q-value (^-1) for model: "
210       
211        if(!DataFolderExists(":HayPenMSA"))
212                NewDataFolder :HayPenMSA
213        endif
214        Make/O/D/N=17 :HayPenMSA:gMSAWave
215       
216        Make/O/D/n=(num) xwave_PEF_SC,ywave_PEF_SC
217        xwave_PEF_SC =  alog(log(qmin) + x*((log(qmax)-log(qmin))/num))
218        Make/O/D coef_PEF_SC = {0.01,100,50,110,60,1e-6,2e-6,20,0,298,78,0.0001}
219        make/o/t parameters_PEF_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)"}
220        Edit parameters_PEF_SC,coef_PEF_SC
221       
222        Variable/G root:g_PEF_SC
223        g_PEF_SC := Prolate_SC(coef_PEF_SC,ywave_PEF_SC,xwave_PEF_SC)
224        Display ywave_PEF_SC vs xwave_PEF_SC
225        ModifyGraph log=1,marker=29,msize=2,mode=4
226        Label bottom "q (\\S-1\\M)"
227        Label left "Intensity (cm\\S-1\\M)"
228
229        AutoPositionWindow/M=1/R=$(WinName(0,1)) $WinName(0,2)
230End
231
232// - sets up a dependency to a wrapper, not the actual SmearedModelFunction
233Proc PlotSmearedProlate_SC(str)                                                         
234        String str
235        Prompt str,"Pick the data folder containing the resolution you want",popup,getAList(4)
236       
237        // if any of the resolution waves are missing => abort
238        if(ResolutionWavesMissingDF(str))               //updated to NOT use global strings (in GaussUtils)
239                Abort
240        endif
241       
242        SetDataFolder $("root:"+str)
243       
244        if(!DataFolderExists(":HayPenMSA"))
245                NewDataFolder :HayPenMSA
246        endif
247        Make/O/D/N=17 :HayPenMSA:gMSAWave
248       
249        // Setup parameter table for model function
250        Make/O/D smear_coef_PEF_SC = {0.01,100,50,110,60,1e-6,2e-6,20,0,298,78,0.0001}
251        make/o/t smear_parameters_PEF_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)"}
252        Edit smear_parameters_PEF_SC,smear_coef_PEF_SC                                 
253       
254        // output smeared intensity wave, dimensions are identical to experimental QSIG values
255        // make extra copy of experimental q-values for easy plotting
256        Duplicate/O $(str+"_q") smeared_PEF_SC,smeared_qvals                           
257        SetScale d,0,0,"1/cm",smeared_PEF_SC                                                   
258                                       
259        Variable/G gs_PEF_SC=0
260        gs_PEF_SC := fSmearedProlate_SC(smear_coef_PEF_SC,smeared_PEF_SC,smeared_qvals) //this wrapper fills the STRUCT
261       
262        Display smeared_PEF_SC vs smeared_qvals                                                                 
263        ModifyGraph log=1,marker=29,msize=2,mode=4
264        Label bottom "q (\\S-1\\M)"
265        Label left "Intensity (cm\\S-1\\M)"
266
267        AutoPositionWindow/M=1/R=$(WinName(0,1)) $WinName(0,2)
268       
269        SetDataFolder root:
270End
271
272
273Function Prolate_SC(w,yw,xw) : FitFunc
274        Wave w,yw,xw
275       
276        Variable inten,Ras,Rbs
277        Ras = w[3]      //Ras is the rotation axis
278        Rbs = w[4]
279       
280        //setup form factor coefficient wave
281        Make/O/D/N=8 form_PEF_SC
282        form_PEF_SC[0] = 1
283        form_PEF_SC[1] = w[1]
284        form_PEF_SC[2] = w[2]
285        form_PEF_SC[3] = w[3]
286        form_PEF_SC[4] = w[4]
287        form_PEF_SC[5] = w[5]
288        form_PEF_SC[6] = w[6]
289        form_PEF_SC[7] = 0
290       
291        //setup structure factor coefficient wave
292        Make/O/D/N=6 struct_PEF_SC
293        struct_PEF_SC[0] = DiamEllip(Ras,Rbs)
294        struct_PEF_SC[1] = w[7]
295        struct_PEF_SC[2] = w[0]
296        struct_PEF_SC[3] = w[9]
297        struct_PEF_SC[4] = w[8]
298        struct_PEF_SC[5] = w[10]
299       
300        //calculate each and combine
301        Duplicate/O xw temp_PEF_SC_PQ,temp_PEF_SC_SQ            //make waves for the AAO
302        ProlateForm(form_PEF_SC,temp_PEF_SC_PQ,xw)
303        HayterPenfoldMSA(struct_PEF_SC,temp_PEF_SC_SQ,xw)
304        yw = temp_PEF_SC_PQ * temp_PEF_SC_SQ
305        yw *= w[0]
306        yw += w[11]
307       
308        //cleanup waves
309//      Killwaves/Z form_PEF_SC,struct_PEF_SC
310       
311        return (0)
312End
313
314
315Proc PlotProlate_SHS(num,qmin,qmax)
316        Variable num=128,qmin=0.001,qmax=0.7
317        Prompt num "Enter number of data points for model: "
318        Prompt qmin "Enter minimum q-value (^-1) for model: "
319        Prompt qmax "Enter maximum q-value (^-1) for model: "
320       
321        Make/O/D/n=(num) xwave_PEF_SHS,ywave_PEF_SHS
322        xwave_PEF_SHS =  alog(log(qmin) + x*((log(qmax)-log(qmin))/num))
323        Make/O/D coef_PEF_SHS = {0.01,100,50,110,60,1e-6,2e-6,0.05,0.2,0.0001}
324        make/o/t parameters_PEF_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)"}
325        Edit parameters_PEF_SHS,coef_PEF_SHS
326       
327        Variable/G root:g_PEF_SHS
328        g_PEF_SHS := Prolate_SHS(coef_PEF_SHS,ywave_PEF_SHS,xwave_PEF_SHS)
329        Display ywave_PEF_SHS vs xwave_PEF_SHS
330        ModifyGraph log=1,marker=29,msize=2,mode=4
331        Label bottom "q (\\S-1\\M)"
332        Label left "Intensity (cm\\S-1\\M)"
333
334        AutoPositionWindow/M=1/R=$(WinName(0,1)) $WinName(0,2)
335End
336
337// - sets up a dependency to a wrapper, not the actual SmearedModelFunction
338Proc PlotSmearedProlate_SHS(str)                                                               
339        String str
340        Prompt str,"Pick the data folder containing the resolution you want",popup,getAList(4)
341       
342        // if any of the resolution waves are missing => abort
343        if(ResolutionWavesMissingDF(str))               //updated to NOT use global strings (in GaussUtils)
344                Abort
345        endif
346       
347        SetDataFolder $("root:"+str)
348       
349        // Setup parameter table for model function
350        Make/O/D smear_coef_PEF_SHS = {0.01,100,50,110,60,1e-6,2e-6,0.05,0.2,0.0001}
351        make/o/t smear_parameters_PEF_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)"}
352        Edit smear_parameters_PEF_SHS,smear_coef_PEF_SHS                                       
353       
354        // output smeared intensity wave, dimensions are identical to experimental QSIG values
355        // make extra copy of experimental q-values for easy plotting
356        Duplicate/O $(str+"_q") smeared_PEF_SHS,smeared_qvals                           
357        SetScale d,0,0,"1/cm",smeared_PEF_SHS                                                   
358                                       
359        Variable/G gs_PEF_SHS=0
360        gs_PEF_SHS := fSmearedProlate_SHS(smear_coef_PEF_SHS,smeared_PEF_SHS,smeared_qvals)     //this wrapper fills the STRUCT
361       
362        Display smeared_PEF_SHS vs smeared_qvals                                                                       
363        ModifyGraph log=1,marker=29,msize=2,mode=4
364        Label bottom "q (\\S-1\\M)"
365        Label left "Intensity (cm\\S-1\\M)"
366
367        AutoPositionWindow/M=1/R=$(WinName(0,1)) $WinName(0,2)
368       
369        SetDataFolder root:
370End
371       
372
373Function Prolate_SHS(w,yw,xw) : FitFunc
374        Wave w,yw,xw
375       
376        Variable inten,Ras,Rbs
377        Ras = w[3]      //Ras is the rotation axis
378        Rbs = w[4]
379       
380        //setup form factor coefficient wave
381        Make/O/D/N=8 form_PEF_SHS
382        form_PEF_SHS[0] = 1
383        form_PEF_SHS[1] = w[1]
384        form_PEF_SHS[2] = w[2]
385        form_PEF_SHS[3] = w[3]
386        form_PEF_SHS[4] = w[4]
387        form_PEF_SHS[5] = w[5]
388        form_PEF_SHS[6] = w[6]
389        form_PEF_SHS[7] = 0
390       
391        //setup structure factor coefficient wave
392        Make/O/D/N=4 struct_PEF_SHS
393        struct_PEF_SHS[0] = 0.5*DiamEllip(Ras,Rbs)
394        struct_PEF_SHS[1] = w[0]
395        struct_PEF_SHS[2] = w[7]
396        struct_PEF_SHS[3] = w[8]
397       
398        //calculate each and combine
399        Duplicate/O xw temp_PEF_SHS_PQ,temp_PEF_SHS_SQ          //make waves for the AAO
400        ProlateForm(form_PEF_SHS,temp_PEF_SHS_PQ,xw)
401        StickyHS_Struct(struct_PEF_SHS,temp_PEF_SHS_SQ,xw)
402        yw = temp_PEF_SHS_PQ * temp_PEF_SHS_SQ
403        yw *= w[0]
404        yw += w[9]
405       
406        //cleanup waves
407//      Killwaves/Z form_PEF_SHS,struct_PEF_SHS
408       
409        return (0)
410End
411
412
413// this is all there is to the smeared calculation!
414Function SmearedProlate_HS(s) :FitFunc
415        Struct ResSmearAAOStruct &s
416
417//      the name of your unsmeared model is the first argument
418        s.yW = Smear_Model_20(Prolate_HS,s.coefW,s.xW,s.resW)
419
420        return(0)
421End
422
423// this is all there is to the smeared calculation!
424Function SmearedProlate_SW(s) :FitFunc
425        Struct ResSmearAAOStruct &s
426
427//      the name of your unsmeared model is the first argument
428        s.yW = Smear_Model_20(Prolate_Sw,s.coefW,s.xW,s.resW)
429
430        return(0)
431End
432
433// this is all there is to the smeared calculation!
434Function SmearedProlate_SC(s) :FitFunc
435        Struct ResSmearAAOStruct &s
436
437//      the name of your unsmeared model is the first argument
438        s.yW = Smear_Model_20(Prolate_SC,s.coefW,s.xW,s.resW)
439
440        return(0)
441End
442
443// this is all there is to the smeared calculation!
444Function SmearedProlate_SHS(s) :FitFunc
445        Struct ResSmearAAOStruct &s
446
447//      the name of your unsmeared model is the first argument
448        s.yW = Smear_Model_20(Prolate_SHS,s.coefW,s.xW,s.resW)
449
450        return(0)
451End
452
453//wrapper to calculate the smeared model as an AAO-Struct
454// fills the struct and calls the ususal function with the STRUCT parameter
455//
456// used only for the dependency, not for fitting
457//
458Function fSmearedProlate_HS(coefW,yW,xW)
459        Wave coefW,yW,xW
460       
461        String str = getWavesDataFolder(yW,0)
462        String DF="root:"+str+":"
463       
464        WAVE resW = $(DF+str+"_res")
465       
466        STRUCT ResSmearAAOStruct fs
467        WAVE fs.coefW = coefW   
468        WAVE fs.yW = yW
469        WAVE fs.xW = xW
470        WAVE fs.resW = resW
471       
472        Variable err
473        err = SmearedProlate_HS(fs)
474       
475        return (0)
476End
477
478//wrapper to calculate the smeared model as an AAO-Struct
479// fills the struct and calls the ususal function with the STRUCT parameter
480//
481// used only for the dependency, not for fitting
482//
483Function fSmearedProlate_SW(coefW,yW,xW)
484        Wave coefW,yW,xW
485       
486        String str = getWavesDataFolder(yW,0)
487        String DF="root:"+str+":"
488       
489        WAVE resW = $(DF+str+"_res")
490       
491        STRUCT ResSmearAAOStruct fs
492        WAVE fs.coefW = coefW   
493        WAVE fs.yW = yW
494        WAVE fs.xW = xW
495        WAVE fs.resW = resW
496       
497        Variable err
498        err = SmearedProlate_SW(fs)
499       
500        return (0)
501End
502
503//wrapper to calculate the smeared model as an AAO-Struct
504// fills the struct and calls the ususal function with the STRUCT parameter
505//
506// used only for the dependency, not for fitting
507//
508Function fSmearedProlate_SC(coefW,yW,xW)
509        Wave coefW,yW,xW
510       
511        String str = getWavesDataFolder(yW,0)
512        String DF="root:"+str+":"
513       
514        WAVE resW = $(DF+str+"_res")
515       
516        STRUCT ResSmearAAOStruct fs
517        WAVE fs.coefW = coefW   
518        WAVE fs.yW = yW
519        WAVE fs.xW = xW
520        WAVE fs.resW = resW
521       
522        Variable err
523        err = SmearedProlate_SC(fs)
524       
525        return (0)
526End
527
528//wrapper to calculate the smeared model as an AAO-Struct
529// fills the struct and calls the ususal function with the STRUCT parameter
530//
531// used only for the dependency, not for fitting
532//
533Function fSmearedProlate_SHS(coefW,yW,xW)
534        Wave coefW,yW,xW
535       
536        String str = getWavesDataFolder(yW,0)
537        String DF="root:"+str+":"
538       
539        WAVE resW = $(DF+str+"_res")
540       
541        STRUCT ResSmearAAOStruct fs
542        WAVE fs.coefW = coefW   
543        WAVE fs.yW = yW
544        WAVE fs.xW = xW
545        WAVE fs.resW = resW
546       
547        Variable err
548        err = SmearedProlate_SHS(fs)
549       
550        return (0)
551End
Note: See TracBrowser for help on using the repository browser.