source: sans/Dev/trunk/NCNR_User_Procedures/Analysis/Models/CoreShell_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.0 KB
Line 
1#pragma rtGlobals=1             // Use modern global access method.
2#pragma IgorVersion = 6.0
3
4//// include everything that is necessary
5//
6#include "CoreShell_v40"
7
8#include "HardSphereStruct_v40"
9#include "HPMSA_v40"
10#include "SquareWellStruct_v40"
11#include "StickyHardSphereStruct_v40"
12
13Proc PlotCoreShell_HS(num,qmin,qmax)
14        Variable num=256,qmin=0.001,qmax=0.7
15        Prompt num "Enter number of data points for model: "
16        Prompt qmin "Enter minimum q-value (A^-1) for model: "
17        Prompt qmax "Enter maximum q-value (A^-1) for model: "
18       
19        Make/O/D/n=(num) xwave_CSS_HS,ywave_CSS_HS
20        xwave_CSS_HS =  alog(log(qmin) + x*((log(qmax)-log(qmin))/num))
21        Make/O/D coef_CSS_HS = {0.1,60,10,1e-6,2e-6,3e-6,0.0001}
22        make/o/t parameters_CSS_HS = {"volume fraction","core rad (A)","shell thickness (A)","SLD core (A-2)","SLD shell (A-2)","SLD solvent (A-2)","bkg (cm-1)"}
23        Edit/K=1 parameters_CSS_HS,coef_CSS_HS
24       
25        Variable/G root:g_CSS_HS
26        g_CSS_HS := CoreShell_HS(coef_CSS_HS,ywave_CSS_HS,xwave_CSS_HS)
27        Display/K=1 ywave_CSS_HS vs xwave_CSS_HS
28        ModifyGraph log=1,marker=29,msize=2,mode=4
29        Label bottom "q (A\\S-1\\M)"
30        Label left "Intensity (cm\\S-1\\M)"
31
32        AutoPositionWindow/M=1/R=$(WinName(0,1)) $WinName(0,2)
33       
34        AddModelToStrings("CoreShell_HS","coef_CSS_HS","parameters_CSS_HS","CSS_HS")
35End
36
37// - sets up a dependency to a wrapper, not the actual SmearedModelFunction
38Proc PlotSmearedCoreShell_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_CSS_HS = {0.1,60,10,1e-6,2e-6,3e-6,0.0001}
51        make/o/t smear_parameters_CSS_HS = {"volume fraction","core rad (A)","shell thickness (A)","SLD core (A-2)","SLD shell (A-2)","SLD solvent (A-2)","bkg (cm-1)"}
52        Edit smear_parameters_CSS_HS,smear_coef_CSS_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_CSS_HS,smeared_qvals                           
57        SetScale d,0,0,"1/cm",smeared_CSS_HS                                                   
58                                       
59        Variable/G gs_CSS_HS=0
60        gs_CSS_HS := fSmearedCoreShell_HS(smear_coef_CSS_HS,smeared_CSS_HS,smeared_qvals)       //this wrapper fills the STRUCT
61       
62        Display smeared_CSS_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("SmearedCoreShell_HS","smear_coef_CSS_HS","smear_parameters_CSS_HS","CSS_HS")
71End
72       
73
74Function CoreShell_HS(w,yw,xw) : FitFunc
75        Wave w,yw,xw
76       
77        Variable inten
78       
79        //setup form factor coefficient wave
80        Make/O/D/N=7 form_CSS_HS
81        form_CSS_HS[0] = 1
82        form_CSS_HS[1] = w[1]
83        form_CSS_HS[2] = w[2]
84        form_CSS_HS[3] = w[3]
85        form_CSS_HS[4] = w[4]
86        form_CSS_HS[5] = w[5]
87        form_CSS_HS[6] = 0
88       
89        //setup structure factor coefficient wave
90        Make/O/D/N=2 struct_CSS_HS
91        struct_CSS_HS[0] = w[1] + w[2]
92        struct_CSS_HS[1] = w[0]
93       
94        //calculate each and combine
95        Duplicate/O xw temp_CSS_HS_PQ,temp_CSS_HS_SQ            //make waves for the AAO
96        CoreShellSphere(form_CSS_HS,temp_CSS_HS_PQ,xw)
97        HardSphereStruct(struct_CSS_HS,temp_CSS_HS_SQ,xw)
98        yw = temp_CSS_HS_PQ * temp_CSS_HS_SQ
99        yw *= w[0]
100        yw += w[6]
101       
102        //cleanup waves
103//      Killwaves/Z form_CSS_HS,struct_CSS_HS
104       
105        return (0)
106End
107
108/////////////////////////////////////////
109Proc PlotCoreShell_SW(num,qmin,qmax)
110        Variable num=256,qmin=0.001,qmax=0.7
111        Prompt num "Enter number of data points for model: "
112        Prompt qmin "Enter minimum q-value (A^-1) for model: "
113        Prompt qmax "Enter maximum q-value (A^-1) for model: "
114       
115        Make/O/D/n=(num) xwave_CSS_SW,ywave_CSS_SW
116        xwave_CSS_SW =  alog(log(qmin) + x*((log(qmax)-log(qmin))/num))
117        Make/O/D coef_CSS_SW = {0.1,60,10,1e-6,2e-6,3e-6,1.0,1.2,0.0001}
118        make/o/t parameters_CSS_SW = {"volume fraction","core rad (A)","shell thickness (A)","SLD core (A-2)","SLD shell (A-2)","SLD solvent (A-2)","well depth (kT)","well width (diam.)","bkg (cm-1)"}
119        Edit/K=1 parameters_CSS_SW,coef_CSS_SW
120       
121        Variable/G root:g_CSS_SW
122        g_CSS_SW := CoreShell_SW(coef_CSS_SW,ywave_CSS_SW,xwave_CSS_SW)
123        Display/K=1 ywave_CSS_SW vs xwave_CSS_SW
124        ModifyGraph log=1,marker=29,msize=2,mode=4
125        Label bottom "q (A\\S-1\\M)"
126        Label left "Intensity (cm\\S-1\\M)"
127
128        AutoPositionWindow/M=1/R=$(WinName(0,1)) $WinName(0,2)
129       
130        AddModelToStrings("CoreShell_SW","coef_CSS_SW","parameters_CSS_SW","CSS_SW")
131End
132
133// - sets up a dependency to a wrapper, not the actual SmearedModelFunction
134Proc PlotSmearedCoreShell_SW(str)                                                               
135        String str
136        Prompt str,"Pick the data folder containing the resolution you want",popup,getAList(4)
137       
138        // if any of the resolution waves are missing => abort
139        if(ResolutionWavesMissingDF(str))               //updated to NOT use global strings (in GaussUtils)
140                Abort
141        endif
142       
143        SetDataFolder $("root:"+str)
144       
145        // Setup parameter table for model function
146        Make/O/D smear_coef_CSS_SW = {0.1,60,10,1e-6,2e-6,3e-6,1.0,1.2,0.0001}
147        make/o/t smear_parameters_CSS_SW = {"volume fraction","core rad (A)","shell thickness (A)","SLD core (A-2)","SLD shell (A-2)","SLD solvent (A-2)","well depth (kT)","well width (diam.)","bkg (cm-1)"}
148        Edit smear_parameters_CSS_SW,smear_coef_CSS_SW                                 
149       
150        // output smeared intensity wave, dimensions are identical to experimental QSIG values
151        // make extra copy of experimental q-values for easy plotting
152        Duplicate/O $(str+"_q") smeared_CSS_SW,smeared_qvals                           
153        SetScale d,0,0,"1/cm",smeared_CSS_SW                                                   
154                                       
155        Variable/G gs_CSS_SW=0
156        gs_CSS_SW := fSmearedCoreShell_SW(smear_coef_CSS_SW,smeared_CSS_SW,smeared_qvals)       //this wrapper fills the STRUCT
157       
158        Display smeared_CSS_SW vs smeared_qvals                                                                 
159        ModifyGraph log=1,marker=29,msize=2,mode=4
160        Label bottom "q (A\\S-1\\M)"
161        Label left "Intensity (cm\\S-1\\M)"
162
163        AutoPositionWindow/M=1/R=$(WinName(0,1)) $WinName(0,2)
164       
165        SetDataFolder root:
166        AddModelToStrings("SmearedCoreShell_SW","smear_coef_CSS_SW","smear_parameters_CSS_SW","CSS_SW")
167End
168       
169
170Function CoreShell_SW(w,yw,xw) : FitFunc
171        Wave w,yw,xw
172       
173        Variable inten
174       
175        //setup form factor coefficient wave
176        Make/O/D/N=7 form_CSS_SW
177        form_CSS_SW[0] = 1
178        form_CSS_SW[1] = w[1]
179        form_CSS_SW[2] = w[2]
180        form_CSS_SW[3] = w[3]
181        form_CSS_SW[4] = w[4]
182        form_CSS_SW[5] = w[5]
183        form_CSS_SW[6] = 0
184       
185        //setup structure factor coefficient wave
186        Make/O/D/N=4 struct_CSS_SW
187        struct_CSS_SW[0] = w[1] + w[2]
188        struct_CSS_SW[1] = w[0]
189        struct_CSS_SW[2] = w[6]
190        struct_CSS_SW[3] = w[7]
191       
192        //calculate each and combine
193        Duplicate/O xw temp_CSS_SW_PQ,temp_CSS_SW_SQ            //make waves for the AAO
194        CoreShellSphere(form_CSS_SW,temp_CSS_SW_PQ,xw)
195        SquareWellStruct(struct_CSS_SW,temp_CSS_SW_SQ,xw)
196        yw = temp_CSS_SW_PQ * temp_CSS_SW_SQ
197        yw *= w[0]
198        yw += w[8]
199       
200        //cleanup waves
201//      Killwaves/Z form_CSS_SW,struct_CSS_SW
202       
203        return (0)
204End
205
206
207/////////////////////////////////////////
208Proc PlotCoreShell_SC(num,qmin,qmax)
209        Variable num=256,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_CSS_SC,ywave_CSS_SC
220        xwave_CSS_SC = alog(log(qmin) + x*((log(qmax)-log(qmin))/num))
221        Make/O/D coef_CSS_SC = {0.1,60,10,1e-6,2e-6,3e-6,10,0,298,78,0.0001}
222        make/o/t parameters_CSS_SC = {"volume fraction","core rad (A)","shell thickness (A)","SLD core (A-2)","SLD shell (A-2)","SLD solvent (A-2)","charge","Monovalent salt (M)","Temperature (K)","dielectric const.","bkg (cm-1)"}
223        Edit/K=1 parameters_CSS_SC,coef_CSS_SC
224       
225        Variable/G root:g_CSS_SC
226        g_CSS_SC := CoreShell_SC(coef_CSS_SC,ywave_CSS_SC,xwave_CSS_SC)
227        Display/K=1 ywave_CSS_SC vs xwave_CSS_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("CoreShell_SC","coef_CSS_SC","parameters_CSS_SC","CSS_SC")
235End
236
237// - sets up a dependency to a wrapper, not the actual SmearedModelFunction
238Proc PlotSmearedCoreShell_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_CSS_SC = {0.1,60,10,1e-6,2e-6,3e-6,10,0,298,78,0.0001}
256        make/o/t smear_parameters_CSS_SC = {"volume fraction","core rad (A)","shell thickness (A)","SLD core (A-2)","SLD shell (A-2)","SLD solvent (A-2)","charge","Monovalent salt (M)","Temperature (K)","dielectric const.","bkg (cm-1)"}
257        Edit smear_parameters_CSS_SC,smear_coef_CSS_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_CSS_SC,smeared_qvals                           
262        SetScale d,0,0,"1/cm",smeared_CSS_SC                                                   
263                                       
264        Variable/G gs_CSS_SC=0
265        gs_CSS_SC := fSmearedCoreShell_SC(smear_coef_CSS_SC,smeared_CSS_SC,smeared_qvals)       //this wrapper fills the STRUCT
266       
267        Display smeared_CSS_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("SmearedCoreShell_SC","smear_coef_CSS_SC","smear_parameters_CSS_SC","CSS_SC")
276End
277       
278
279Function CoreShell_SC(w,yw,xw) : FitFunc
280        Wave w,yw,xw
281       
282        Variable inten
283       
284        //setup form factor coefficient wave
285        Make/O/D/N=7 form_CSS_SC
286        form_CSS_SC[0] = 1
287        form_CSS_SC[1] = w[1]
288        form_CSS_SC[2] = w[2]
289        form_CSS_SC[3] = w[3]
290        form_CSS_SC[4] = w[4]
291        form_CSS_SC[5] = w[5]
292        form_CSS_SC[6] = 0
293       
294        //setup structure factor coefficient wave
295        Make/O/D/N=6 struct_CSS_SC
296        struct_CSS_SC[0] = 2*(w[1]+w[2])
297        struct_CSS_SC[1] = w[6]
298        struct_CSS_SC[2] = w[0]
299        struct_CSS_SC[3] = w[8]
300        struct_CSS_SC[4] = w[7]
301        struct_CSS_SC[5] = w[9]
302       
303        //calculate each and combine
304        Duplicate/O xw temp_CSS_SC_PQ,temp_CSS_SC_SQ            //make waves for the AAO
305        CoreShellSphere(form_CSS_SC,temp_CSS_SC_PQ,xw)
306        HayterPenfoldMSA(struct_CSS_SC,temp_CSS_SC_SQ,xw)
307        yw = temp_CSS_SC_PQ * temp_CSS_SC_SQ
308        yw *= w[0]
309        yw += w[10]
310       
311        //cleanup waves
312//      Killwaves/Z form_CSS_SC,struct_CSS_SC
313       
314        return (0)
315End
316
317/////////////////////////////////////////
318Proc PlotCoreShell_SHS(num,qmin,qmax)
319        Variable num=256,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_CSS_SHS,ywave_CSS_SHS
325        xwave_CSS_SHS =  alog(log(qmin) + x*((log(qmax)-log(qmin))/num))
326        Make/O/D coef_CSS_SHS = {0.1,60,10,1e-6,2e-6,3e-6,0.05,0.2,0.0001}
327        make/o/t parameters_CSS_SHS = {"volume fraction","core rad (A)","shell thickness (A)","SLD core (A-2)","SLD shell (A-2)","SLD solvent (A-2)","perturbation parameter (0.1)","stickiness, tau","bkg (cm-1)"}
328        Edit/K=1 parameters_CSS_SHS,coef_CSS_SHS
329       
330        Variable/G root:g_CSS_SHS
331        g_CSS_SHS := CoreShell_SHS(coef_CSS_SHS,ywave_CSS_SHS,xwave_CSS_SHS)
332        Display/K=1 ywave_CSS_SHS vs xwave_CSS_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("CoreShell_SHS","coef_CSS_SHS","parameters_CSS_SHS","CSS_SHS")
340End
341
342// - sets up a dependency to a wrapper, not the actual SmearedModelFunction
343Proc PlotSmearedCoreShell_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_CSS_SHS = {0.1,60,10,1e-6,2e-6,3e-6,0.05,0.2,0.0001}
356        make/o/t smear_parameters_CSS_SHS = {"volume fraction","core rad (A)","shell thickness (A)","SLD core (A-2)","SLD shell (A-2)","SLD solvent (A-2)","perturbation parameter (0.1)","stickiness, tau","bkg (cm-1)"}
357        Edit smear_parameters_CSS_SHS,smear_coef_CSS_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_CSS_SHS,smeared_qvals                           
362        SetScale d,0,0,"1/cm",smeared_CSS_SHS                                                   
363                                       
364        Variable/G gs_CSS_SHS=0
365        gs_CSS_SHS := fSmearedCoreShell_SHS(smear_coef_CSS_SHS,smeared_CSS_SHS,smeared_qvals)   //this wrapper fills the STRUCT
366       
367        Display smeared_CSS_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("SmearedCoreShell_SHS","smear_coef_CSS_SHS","smear_parameters_CSS_SHS","CSS_SHS")
376End
377       
378
379Function CoreShell_SHS(w,yw,xw) : FitFunc
380        Wave w,yw,xw
381       
382        Variable inten
383       
384        //setup form factor coefficient wave
385        Make/O/D/N=7 form_CSS_SHS
386        form_CSS_SHS[0] = 1
387        form_CSS_SHS[1] = w[1]
388        form_CSS_SHS[2] = w[2]
389        form_CSS_SHS[3] = w[3]
390        form_CSS_SHS[4] = w[4]
391        form_CSS_SHS[5] = w[5]
392        form_CSS_SHS[6] = 0
393       
394        //setup structure factor coefficient wave
395        Make/O/D/N=4 struct_CSS_SHS
396        struct_CSS_SHS[0] = w[1] + w[2]
397        struct_CSS_SHS[1] = w[0]
398        struct_CSS_SHS[2] = w[6]
399        struct_CSS_SHS[3] = w[7]
400       
401        //calculate each and combine
402        Duplicate/O xw temp_CSS_SHS_PQ,temp_CSS_SHS_SQ          //make waves for the AAO
403        CoreShellSphere(form_CSS_SHS,temp_CSS_SHS_PQ,xw)
404        StickyHS_Struct(struct_CSS_SHS,temp_CSS_SHS_SQ,xw)
405        yw = temp_CSS_SHS_PQ * temp_CSS_SHS_SQ
406        yw *= w[0]
407        yw += w[8]
408       
409        //cleanup waves
410//      Killwaves/Z form_CSS_SHS,struct_CSS_SHS
411       
412        return (0)
413End
414
415
416
417// this is all there is to the smeared calculation!
418Function SmearedCoreShell_HS(s) :FitFunc
419        Struct ResSmearAAOStruct &s
420
421//      the name of your unsmeared model is the first argument
422        Smear_Model_20(CoreShell_HS,s.coefW,s.xW,s.yW,s.resW)
423
424        return(0)
425End
426
427// this is all there is to the smeared calculation!
428Function SmearedCoreShell_SW(s) :FitFunc
429        Struct ResSmearAAOStruct &s
430
431//      the name of your unsmeared model is the first argument
432        Smear_Model_20(CoreShell_SW,s.coefW,s.xW,s.yW,s.resW)
433
434        return(0)
435End
436
437// this is all there is to the smeared calculation!
438Function SmearedCoreShell_SC(s) :FitFunc
439        Struct ResSmearAAOStruct &s
440
441//      the name of your unsmeared model is the first argument
442        Smear_Model_20(CoreShell_SC,s.coefW,s.xW,s.yW,s.resW)
443
444        return(0)
445End
446
447// this is all there is to the smeared calculation!
448Function SmearedCoreShell_SHS(s) :FitFunc
449        Struct ResSmearAAOStruct &s
450
451//      the name of your unsmeared model is the first argument
452        Smear_Model_20(CoreShell_SHS,s.coefW,s.xW,s.yW,s.resW)
453
454        return(0)
455End
456
457//wrapper to calculate the smeared model as an AAO-Struct
458// fills the struct and calls the ususal function with the STRUCT parameter
459//
460// used only for the dependency, not for fitting
461//
462Function fSmearedCoreShell_HS(coefW,yW,xW)
463        Wave coefW,yW,xW
464       
465        String str = getWavesDataFolder(yW,0)
466        String DF="root:"+str+":"
467       
468        WAVE resW = $(DF+str+"_res")
469       
470        STRUCT ResSmearAAOStruct fs
471        WAVE fs.coefW = coefW   
472        WAVE fs.yW = yW
473        WAVE fs.xW = xW
474        WAVE fs.resW = resW
475       
476        Variable err
477        err = SmearedCoreShell_HS(fs)
478       
479        return (0)
480End
481
482//wrapper to calculate the smeared model as an AAO-Struct
483// fills the struct and calls the ususal function with the STRUCT parameter
484//
485// used only for the dependency, not for fitting
486//
487Function fSmearedCoreShell_SW(coefW,yW,xW)
488        Wave coefW,yW,xW
489       
490        String str = getWavesDataFolder(yW,0)
491        String DF="root:"+str+":"
492       
493        WAVE resW = $(DF+str+"_res")
494       
495        STRUCT ResSmearAAOStruct fs
496        WAVE fs.coefW = coefW   
497        WAVE fs.yW = yW
498        WAVE fs.xW = xW
499        WAVE fs.resW = resW
500       
501        Variable err
502        err = SmearedCoreShell_SW(fs)
503       
504        return (0)
505End
506
507//wrapper to calculate the smeared model as an AAO-Struct
508// fills the struct and calls the ususal function with the STRUCT parameter
509//
510// used only for the dependency, not for fitting
511//
512Function fSmearedCoreShell_SC(coefW,yW,xW)
513        Wave coefW,yW,xW
514       
515        String str = getWavesDataFolder(yW,0)
516        String DF="root:"+str+":"
517       
518        WAVE resW = $(DF+str+"_res")
519       
520        STRUCT ResSmearAAOStruct fs
521        WAVE fs.coefW = coefW   
522        WAVE fs.yW = yW
523        WAVE fs.xW = xW
524        WAVE fs.resW = resW
525       
526        Variable err
527        err = SmearedCoreShell_SC(fs)
528       
529        return (0)
530End
531
532//wrapper to calculate the smeared model as an AAO-Struct
533// fills the struct and calls the ususal function with the STRUCT parameter
534//
535// used only for the dependency, not for fitting
536//
537Function fSmearedCoreShell_SHS(coefW,yW,xW)
538        Wave coefW,yW,xW
539       
540        String str = getWavesDataFolder(yW,0)
541        String DF="root:"+str+":"
542       
543        WAVE resW = $(DF+str+"_res")
544       
545        STRUCT ResSmearAAOStruct fs
546        WAVE fs.coefW = coefW   
547        WAVE fs.yW = yW
548        WAVE fs.xW = xW
549        WAVE fs.resW = resW
550       
551        Variable err
552        err = SmearedCoreShell_SHS(fs)
553       
554        return (0)
555End
Note: See TracBrowser for help on using the repository browser.