source: sans/Analysis/branches/ajj_23APR07/IGOR_Package_Files/Put in User Procedures/SANS_Models_v3.00/NewModels_2006/Vesicle_UL_and_Struct.ipf @ 131

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

Typo in dialog in every model...

File size: 17.6 KB
Line 
1#pragma rtGlobals=1             // Use modern global access method.
2#pragma IgorVersion = 6.0
3
4
5// the "scale" or "volume fraction" factor is the "material" volume fraction
6// - i.e. the volume fraction of surfactant added. NOT the excluded volume
7// of the vesicles, which can be much larger. See the Vesicle_Volume_N_Rg macro
8//
9// this excluded volume is accounted for in the structure factor calculations.
10//
11
12#include "Vesicle_UL"
13
14#include "HardSphereStruct"
15#include "HPMSA"
16#include "SquareWellStruct"
17#include "StickyHardSphereStruct"
18
19Proc PlotVesicle_HS(num,qmin,qmax)                                             
20        Variable num=256,qmin=0.001,qmax=0.7
21        Prompt num "Enter number of data points for model: "
22        Prompt qmin "Enter minimum q-value (^-1) for model: "
23        Prompt qmax "Enter maximum q-value (^-1) for model: "
24       
25        //make the normal model waves
26        Make/O/D/n=(num) xwave_ves_HS,ywave_ves_HS                                     
27        xwave_ves_HS =  alog(log(qmin) + x*((log(qmax)-log(qmin))/num))                                 
28        Make/O/D coef_ves_HS = {0.1,100,30,6.36e-6,0.5e-6,0}                                           
29        make/o/t parameters_ves_HS = {"Volume fraction","core radius (A)","shell thickness (A)","Core and Solvent SLD (A-2)","Shell SLD (A-2)","bkg (cm-1)"}           
30        Edit/K=1 parameters_ves_HS,coef_ves_HS
31       
32        Variable/G root:g_ves_HS
33        g_ves_HS := Vesicle_HS(coef_ves_HS,ywave_ves_HS,xwave_ves_HS)                   
34        Display/K=1 ywave_ves_HS vs xwave_ves_HS                                                       
35        ModifyGraph log=1,marker=29,msize=2,mode=4                     
36        Label bottom "q (\\S-1\\M)"
37        Label left "Intensity (cm\\S-1\\M)"                                     
38
39        AutoPositionWindow/M=1/R=$(WinName(0,1)) $WinName(0,2)
40End
41
42// - sets up a dependency to a wrapper, not the actual SmearedModelFunction
43Proc PlotSmearedVesicle_HS(str)                                                         
44        String str
45        Prompt str,"Pick the data folder containing the resolution you want",popup,getAList(4)
46       
47        // if any of the resolution waves are missing => abort
48        if(ResolutionWavesMissingDF(str))               //updated to NOT use global strings (in GaussUtils)
49                Abort
50        endif
51       
52        SetDataFolder $("root:"+str)
53       
54        // Setup parameter table for model function
55        Make/O/D smear_coef_ves_HS = {0.1,100,30,6.36e-6,0.5e-6,0}                                     
56        make/o/t smear_parameters_ves_HS = {"Volume fraction","core radius (A)","shell thickness (A)","Core and Solvent SLD (A-2)","Shell SLD (A-2)","bkg (cm-1)"}             
57        Edit smear_parameters_ves_HS,smear_coef_ves_HS                                 
58       
59        // output smeared intensity wave, dimensions are identical to experimental QSIG values
60        // make extra copy of experimental q-values for easy plotting
61        Duplicate/O $(str+"_q") smeared_ves_HS,smeared_qvals                           
62        SetScale d,0,0,"1/cm",smeared_ves_HS                                                   
63                                       
64        Variable/G gs_ves_HS=0
65        gs_ves_HS := fSmearedVesicle_HS(smear_coef_ves_HS,smeared_ves_HS,smeared_qvals) //this wrapper fills the STRUCT
66       
67        Display smeared_ves_HS vs smeared_qvals                                                                 
68        ModifyGraph log=1,marker=29,msize=2,mode=4
69        Label bottom "q (\\S-1\\M)"
70        Label left "Intensity (cm\\S-1\\M)"
71
72        AutoPositionWindow/M=1/R=$(WinName(0,1)) $WinName(0,2)
73       
74        SetDataFolder root:
75End
76
77
78Function Vesicle_HS(w,yw,xw) : FitFunc
79        Wave w,yw,xw
80       
81        Variable inten
82       
83        //setup form factor coefficient wave
84        Make/O/D/N=6 form_ves_HS
85        form_ves_HS[0] = 1
86        form_ves_HS[1] = w[1]
87        form_ves_HS[2] = w[2]
88        form_ves_HS[3] = w[3]
89        form_ves_HS[4] = w[4]
90        form_ves_HS[5] = 0
91       
92        // calculate the excluded volume of the vesicles
93        Variable totvol,core,shell,exclVol,nden
94        totvol=4*pi/3*(w[1]+w[2])^3
95        core=4*pi/3*(w[1])^3
96        shell = totVol-core
97        //      nden = phi/(shell volume) or phi/Vtotal
98        nden = w[0]/shell
99        exclVol = nden*totvol
100
101        //setup structure factor coefficient wave
102        Make/O/D/N=2 struct_ves_HS
103        struct_ves_HS[0] = w[1] + w[2]
104        struct_ves_HS[1] = exclVol
105       
106        //calculate each and combine
107        Duplicate/O xw tmp_ves_HS_PQ,tmp_ves_HS_SQ
108        VesicleForm(form_ves_HS,tmp_ves_HS_PQ,xw)
109        HardSphereStruct(struct_ves_HS,tmp_ves_HS_SQ,xw)
110        yw = tmp_ves_HS_PQ * tmp_ves_HS_SQ
111        yw *= w[0]
112        yw += w[5]
113       
114        //cleanup waves
115        //Killwaves/Z form_ves_HS,struct_ves_HS
116       
117        return (0)
118End
119
120/////////////////////////////////
121Proc PlotVesicle_SW(num,qmin,qmax)                                             
122        Variable num=256,qmin=0.001,qmax=0.7
123        Prompt num "Enter number of data points for model: "
124        Prompt qmin "Enter minimum q-value (^-1) for model: "
125        Prompt qmax "Enter maximum q-value (^-1) for model: "
126       
127        ///
128        Make/O/D/N=4 form_ves_SW
129        Make/O/D/N=4 struct_ves_SW
130        ///
131        Make/O/D/n=(num) xwave_ves_SW,ywave_ves_SW                                     
132        xwave_ves_SW =  alog(log(qmin) + x*((log(qmax)-log(qmin))/num))                                 
133        Make/O/D coef_ves_SW = {0.1,100,30,6.36e-6,0.5e-6,1,1.2,0}                                             
134        make/o/t parameters_ves_SW = {"Volume fraction","core radius (A)","shell thickness (A)","Core and Solvent SLD (A-2)","Shell SLD (A-2)","well depth (kT)","well width (diam.)","bkgd (cm-1)"}           
135        Edit/K=1 parameters_ves_SW,coef_ves_SW                                                         
136
137        Variable/G root:g_ves_SW
138        g_ves_SW := Vesicle_SW(coef_ves_SW,ywave_ves_SW,xwave_ves_SW)                   
139        Display/K=1 ywave_ves_SW vs xwave_ves_SW                                                       
140        ModifyGraph log=1,marker=29,msize=2,mode=4                     
141        Label bottom "q (\\S-1\\M)"
142        Label left "Intensity (cm\\S-1\\M)"                                     
143
144        AutoPositionWindow/M=1/R=$(WinName(0,1)) $WinName(0,2)
145End
146
147// - sets up a dependency to a wrapper, not the actual SmearedModelFunction
148Proc PlotSmearedVesicle_SW(str)                                                         
149        String str
150        Prompt str,"Pick the data folder containing the resolution you want",popup,getAList(4)
151       
152        // if any of the resolution waves are missing => abort
153        if(ResolutionWavesMissingDF(str))               //updated to NOT use global strings (in GaussUtils)
154                Abort
155        endif
156       
157        SetDataFolder $("root:"+str)
158       
159        // Setup parameter table for model function
160        Make/O/D smear_coef_ves_SW = {0.1,100,30,6.36e-6,0.5e-6,1,1.2,0}                                               
161        make/o/t smear_parameters_ves_SW = {"Volume fraction","core radius (A)","shell thickness (A)","Core and Solvent SLD (A-2)","Shell SLD (A-2)","well depth (kT)","well width (diam.)","bkgd (cm-1)"}             
162        Edit smear_parameters_ves_SW,smear_coef_ves_SW                                 
163       
164        // output smeared intensity wave, dimensions are identical to experimental QSIG values
165        // make extra copy of experimental q-values for easy plotting
166        Duplicate/O $(str+"_q") smeared_ves_SW,smeared_qvals                           
167        SetScale d,0,0,"1/cm",smeared_ves_SW                                                   
168                                       
169        Variable/G gs_ves_SW=0
170        gs_ves_SW := fSmearedVesicle_SW(smear_coef_ves_SW,smeared_ves_SW,smeared_qvals) //this wrapper fills the STRUCT
171       
172        Display smeared_ves_SW vs smeared_qvals                                                                 
173        ModifyGraph log=1,marker=29,msize=2,mode=4
174        Label bottom "q (\\S-1\\M)"
175        Label left "Intensity (cm\\S-1\\M)"
176
177        AutoPositionWindow/M=1/R=$(WinName(0,1)) $WinName(0,2)
178       
179        SetDataFolder root:
180End
181
182       
183
184Function Vesicle_SW(w,yw,xw) : FitFunc
185        Wave w,yw,xw
186       
187        Variable inten
188       
189        //setup form factor coefficient wave
190        Make/O/D/N=6 form_ves_SW
191        form_ves_SW[0] = 1
192        form_ves_SW[1] = w[1]
193        form_ves_SW[2] = w[2]
194        form_ves_SW[3] = w[3]
195        form_ves_SW[4] = w[4]
196        form_ves_SW[5] = 0
197       
198        // calculate the excluded volume of the vesicles
199        Variable totvol,core,shell,exclVol,nden
200        totvol=4*pi/3*(w[1]+w[2])^3
201        core=4*pi/3*(w[1])^3
202        shell = totVol-core
203        //      nden = phi/(shell volume) or phi/Vtotal
204        nden = w[0]/shell
205        exclVol = nden*totvol
206       
207        //setup structure factor coefficient wave
208        Make/O/D/N=4 struct_ves_SW
209        struct_ves_SW[0] = w[1] + w[2]
210        struct_ves_SW[1] = exclVol
211        struct_ves_SW[2] = w[5]
212        struct_ves_SW[3] = w[6]
213       
214        //calculate each and combine
215        Duplicate/O xw tmp_ves_SW_PQ,tmp_ves_SW_SQ
216        VesicleForm(form_ves_SW,tmp_ves_SW_PQ,xw)
217        SquareWellStruct(struct_ves_SW,tmp_ves_SW_SQ,xw)
218        yw = tmp_ves_SW_PQ * tmp_ves_SW_SQ
219        yw *= w[0]
220        yw += w[7]
221       
222        //cleanup waves
223        //Killwaves/Z form_ves_SW,struct_ves_SW
224       
225        return (0)
226End
227
228/////////////////////////////////
229Proc PlotVesicle_SC(num,qmin,qmax)                                             
230        Variable num=256,qmin=0.001,qmax=0.7
231        Prompt num "Enter number of data points for model: "
232        Prompt qmin "Enter minimum q-value (^-1) for model: "
233        Prompt qmax "Enter maximum q-value (^-1) for model: "
234       
235        if(!DataFolderExists(":HayPenMSA"))
236                NewDataFolder :HayPenMSA
237        endif
238        Make/O/D/N=17 :HayPenMSA:gMSAWave
239       
240        ///
241        Make/O/D/n=(num) xwave_ves_SC,ywave_ves_SC                                     
242        xwave_ves_SC =  alog(log(qmin) + x*((log(qmax)-log(qmin))/num))                         
243        Make/O/D coef_ves_SC = {0.1,100,30,6.36e-6,0.5e-6,20,0,298,78,0}                                               
244        make/o/t parameters_ves_SC = {"Volume fraction","core radius (A)","shell thickness (A)","Core and Solvent SLD (A-2)","Shell SLD (A-2)","charge","movalent salt(M)","Temperature (K)","dielectric const","bkgd (cm-1)"}         
245        Edit/K=1 parameters_ves_SC,coef_ves_SC
246                                                                       
247        Variable/G root:g_ves_SC
248        g_ves_SC := Vesicle_SC(coef_ves_SC,ywave_ves_SC,xwave_ves_SC)                   
249        Display/K=1 ywave_ves_SC vs xwave_ves_SC                                                       
250        ModifyGraph log=1,marker=29,msize=2,mode=4                     
251        Label bottom "q (\\S-1\\M)"
252        Label left "Intensity (cm\\S-1\\M)"                                     
253
254        AutoPositionWindow/M=1/R=$(WinName(0,1)) $WinName(0,2)
255End
256
257// - sets up a dependency to a wrapper, not the actual SmearedModelFunction
258Proc PlotSmearedVesicle_SC(str)                                                         
259        String str
260        Prompt str,"Pick the data folder containing the resolution you want",popup,getAList(4)
261       
262        // if any of the resolution waves are missing => abort
263        if(ResolutionWavesMissingDF(str))               //updated to NOT use global strings (in GaussUtils)
264                Abort
265        endif
266       
267        SetDataFolder $("root:"+str)
268       
269        if(!DataFolderExists(":HayPenMSA"))
270                NewDataFolder :HayPenMSA
271        endif
272        Make/O/D/N=17 :HayPenMSA:gMSAWave
273       
274        // Setup parameter table for model function
275        Make/O/D smear_coef_ves_SC = {0.1,100,30,6.36e-6,0.5e-6,20,0,298,78,0}                                         
276        make/o/t smear_parameters_ves_SC = {"Volume fraction","core radius (A)","shell thickness (A)","Core and Solvent SLD (A-2)","Shell SLD (A-2)","charge","movalent salt(M)","Temperature (K)","dielectric const","bkgd (cm-1)"}           
277        Edit smear_parameters_ves_SC,smear_coef_ves_SC                                 
278       
279        // output smeared intensity wave, dimensions are identical to experimental QSIG values
280        // make extra copy of experimental q-values for easy plotting
281        Duplicate/O $(str+"_q") smeared_ves_SC,smeared_qvals                           
282        SetScale d,0,0,"1/cm",smeared_ves_SC                                                   
283                                       
284        Variable/G gs_ves_SC=0
285        gs_ves_SC := fSmearedVesicle_SC(smear_coef_ves_SC,smeared_ves_SC,smeared_qvals) //this wrapper fills the STRUCT
286       
287        Display smeared_ves_SC vs smeared_qvals                                                                 
288        ModifyGraph log=1,marker=29,msize=2,mode=4
289        Label bottom "q (\\S-1\\M)"
290        Label left "Intensity (cm\\S-1\\M)"
291
292        AutoPositionWindow/M=1/R=$(WinName(0,1)) $WinName(0,2)
293       
294        SetDataFolder root:
295End
296       
297
298Function Vesicle_SC(w,yw,xw) : FitFunc
299        Wave w,yw,xw
300       
301//      Variable timer=StartMSTimer
302        Variable inten
303       
304        //setup form factor coefficient wave
305        Make/O/D/N=6 form_ves_SC
306        form_ves_SC[0] = 1
307        form_ves_SC[1] = w[1]
308        form_ves_SC[2] = w[2]
309        form_ves_SC[3] = w[3]
310        form_ves_SC[4] = w[4]
311        form_ves_SC[5] = 0
312       
313        // calculate the excluded volume of the vesicles
314        Variable totvol,core,shell,exclVol,nden
315        totvol=4*pi/3*(w[1]+w[2])^3
316        core=4*pi/3*(w[1])^3
317        shell = totVol-core
318        //      nden = phi/(shell volume) or phi/Vtotal
319        nden = w[0]/shell
320        exclVol = nden*totvol
321       
322        //setup structure factor coefficient wave
323        Make/O/D/N=6 struct_ves_SC
324        struct_ves_SC[0] = 2*(w[1]+w[2])                //diameter
325        struct_ves_SC[1] = w[5]
326        struct_ves_SC[2] = exclVol
327        struct_ves_SC[3] = w[7]
328        struct_ves_SC[4] = w[6]
329        struct_ves_SC[5] = w[8]
330       
331        //calculate each and combine
332        Duplicate/O xw tmp_ves_SC_PQ,tmp_ves_SC_SQ
333        VesicleForm(form_ves_SC,tmp_ves_SC_PQ,xw)
334        HayterPenfoldMSA(struct_ves_SC,tmp_ves_SC_SQ,xw)
335        yw = tmp_ves_SC_PQ * tmp_ves_SC_SQ
336        yw *= w[0]
337        yw += w[9]
338       
339        //cleanup waves
340        //Killwaves/Z form_ves_SC,struct_ves_SC
341        //Print "ps elapsed time = ",StopMSTimer(timer)
342        return (0)
343End
344
345/////////////////////////////////
346Proc PlotVesicle_SHS(num,qmin,qmax)                                             
347        Variable num=256,qmin=0.001,qmax=0.7
348        Prompt num "Enter number of data points for model: "
349        Prompt qmin "Enter minimum q-value (^-1) for model: "
350        Prompt qmax "Enter maximum q-value (^-1) for model: "
351       
352        ///
353        Make/O/D/N=4 form_ves_SHS
354        Make/O/D/N=4 struct_ves_SHS
355        ///
356        Make/O/D/n=(num) xwave_ves_SHS,ywave_ves_SHS                                   
357        xwave_ves_SHS =  alog(log(qmin) + x*((log(qmax)-log(qmin))/num))                                       
358        Make/O/D coef_ves_SHS = {0.1,100,30,6.36e-6,0.5e-6,0.05,0.2,0}                                                 
359        make/o/t parameters_ves_SHS = {"Volume fraction","core radius (A)","shell thickness (A)","Core and Solvent SLD (A-2)","Shell SLD (A-2)","perturbation parameter (0.1)","stickiness, tau","bkgd (cm-1)"}         
360        Edit/K=1 parameters_ves_SHS,coef_ves_SHS                                                               
361
362        Variable/G root:g_ves_SHS
363        g_ves_SHS := Vesicle_SHS(coef_ves_SHS,ywave_ves_SHS,xwave_ves_SHS)                     
364        Display/K=1 ywave_ves_SHS vs xwave_ves_SHS                                                     
365        ModifyGraph log=1,marker=29,msize=2,mode=4                     
366        Label bottom "q (\\S-1\\M)"
367        Label left "Intensity (cm\\S-1\\M)"                                     
368
369        AutoPositionWindow/M=1/R=$(WinName(0,1)) $WinName(0,2)
370End
371
372// - sets up a dependency to a wrapper, not the actual SmearedModelFunction
373Proc PlotSmearedVesicle_SHS(str)                                                               
374        String str
375        Prompt str,"Pick the data folder containing the resolution you want",popup,getAList(4)
376       
377        // if any of the resolution waves are missing => abort
378        if(ResolutionWavesMissingDF(str))               //updated to NOT use global strings (in GaussUtils)
379                Abort
380        endif
381       
382        SetDataFolder $("root:"+str)
383       
384        // Setup parameter table for model function
385        Make/O/D smear_coef_ves_SHS = {0.1,100,30,6.36e-6,0.5e-6,0.05,0.2,0}                                                   
386        make/o/t smear_parameters_ves_SHS = {"Volume fraction","core radius (A)","shell thickness (A)","Core and Solvent SLD (A-2)","Shell SLD (A-2)","perturbation parameter (0.1)","stickiness, tau","bkgd (cm-1)"}           
387        Edit smear_parameters_ves_SHS,smear_coef_ves_SHS                                       
388       
389        // output smeared intensity wave, dimensions are identical to experimental QSIG values
390        // make extra copy of experimental q-values for easy plotting
391        Duplicate/O $(str+"_q") smeared_ves_SHS,smeared_qvals                           
392        SetScale d,0,0,"1/cm",smeared_ves_SHS                                                   
393                                       
394        Variable/G gs_ves_SHS=0
395        gs_ves_SHS := fSmearedVesicle_SHS(smear_coef_ves_SHS,smeared_ves_SHS,smeared_qvals)     //this wrapper fills the STRUCT
396       
397        Display smeared_ves_SHS vs smeared_qvals                                                                       
398        ModifyGraph log=1,marker=29,msize=2,mode=4
399        Label bottom "q (\\S-1\\M)"
400        Label left "Intensity (cm\\S-1\\M)"
401
402        AutoPositionWindow/M=1/R=$(WinName(0,1)) $WinName(0,2)
403       
404        SetDataFolder root:
405End
406
407       
408
409Function Vesicle_SHS(w,yw,xw) : FitFunc
410        Wave w,yw,xw
411       
412        Variable inten
413       
414        //setup form factor coefficient wave
415        Make/O/D/N=6 form_ves_SHS
416        form_ves_SHS[0] = 1
417        form_ves_SHS[1] = w[1]
418        form_ves_SHS[2] = w[2]
419        form_ves_SHS[3] = w[3]
420        form_ves_SHS[4] = w[4]
421        form_ves_SHS[5] = 0
422       
423        // calculate the excluded volume of the vesicles
424        Variable totvol,core,shell,exclVol,nden
425        totvol=4*pi/3*(w[1]+w[2])^3
426        core=4*pi/3*(w[1])^3
427        shell = totVol-core
428        //      nden = phi/(shell volume) or phi/Vtotal
429        nden = w[0]/shell
430        exclVol = nden*totvol
431       
432        //setup structure factor coefficient wave
433        Make/O/D/N=4 struct_ves_SHS
434        struct_ves_SHS[0] = w[1]+w[2]
435        struct_ves_SHS[1] = exclVol
436        struct_ves_SHS[2] = w[5]
437        struct_ves_SHS[3] = w[6]
438       
439        //calculate each and combine
440        Duplicate/O xw tmp_ves_SHS_PQ,tmp_ves_SHS_SQ
441        VesicleForm(form_ves_SHS,tmp_ves_SHS_PQ,xw)
442        StickyHS_Struct(struct_ves_SHS,tmp_ves_SHS_SQ,xw)
443        yw = tmp_ves_SHS_PQ * tmp_ves_SHS_SQ
444        yw *= w[0]
445        yw += w[7]
446       
447        //cleanup waves
448        //Killwaves/Z form_ves_SHS,struct_ves_SHS
449       
450        return (0)
451End
452
453
454
455// this is all there is to the smeared calculation!
456Function SmearedVesicle_HS(s) :FitFunc
457        Struct ResSmearAAOStruct &s
458
459//      the name of your unsmeared model (AAO) is the first argument
460        s.yW = Smear_Model_20(Vesicle_HS,s.coefW,s.xW,s.resW)
461
462        return(0)
463End
464
465// this is all there is to the smeared calculation!
466Function SmearedVesicle_SW(s) :FitFunc
467        Struct ResSmearAAOStruct &s
468
469//      the name of your unsmeared model (AAO) is the first argument
470        s.yW = Smear_Model_20(Vesicle_SW,s.coefW,s.xW,s.resW)
471
472        return(0)
473End
474
475// this is all there is to the smeared calculation!
476Function SmearedVesicle_SC(s) :FitFunc
477        Struct ResSmearAAOStruct &s
478
479//      the name of your unsmeared model (AAO) is the first argument
480        s.yW = Smear_Model_20(Vesicle_SC,s.coefW,s.xW,s.resW)
481
482        return(0)
483End
484
485// this is all there is to the smeared calculation!
486Function SmearedVesicle_SHS(s) :FitFunc
487        Struct ResSmearAAOStruct &s
488
489//      the name of your unsmeared model (AAO) is the first argument
490        s.yW = Smear_Model_20(Vesicle_SHS,s.coefW,s.xW,s.resW)
491
492        return(0)
493End
494
495//wrapper to calculate the smeared model as an AAO-Struct
496// fills the struct and calls the ususal function with the STRUCT parameter
497//
498// used only for the dependency, not for fitting
499//
500Function fSmearedVesicle_HS(coefW,yW,xW)
501        Wave coefW,yW,xW
502       
503        String str = getWavesDataFolder(yW,0)
504        String DF="root:"+str+":"
505       
506        WAVE resW = $(DF+str+"_res")
507       
508        STRUCT ResSmearAAOStruct fs
509        WAVE fs.coefW = coefW   
510        WAVE fs.yW = yW
511        WAVE fs.xW = xW
512        WAVE fs.resW = resW
513       
514        Variable err
515        err = SmearedVesicle_HS(fs)
516       
517        return (0)
518End
519
520
521//wrapper to calculate the smeared model as an AAO-Struct
522// fills the struct and calls the ususal function with the STRUCT parameter
523//
524// used only for the dependency, not for fitting
525//
526Function fSmearedVesicle_SW(coefW,yW,xW)
527        Wave coefW,yW,xW
528       
529        String str = getWavesDataFolder(yW,0)
530        String DF="root:"+str+":"
531       
532        WAVE resW = $(DF+str+"_res")
533       
534        STRUCT ResSmearAAOStruct fs
535        WAVE fs.coefW = coefW   
536        WAVE fs.yW = yW
537        WAVE fs.xW = xW
538        WAVE fs.resW = resW
539       
540        Variable err
541        err = SmearedVesicle_SW(fs)
542       
543        return (0)
544End
545
546//wrapper to calculate the smeared model as an AAO-Struct
547// fills the struct and calls the ususal function with the STRUCT parameter
548//
549// used only for the dependency, not for fitting
550//
551Function fSmearedVesicle_SC(coefW,yW,xW)
552        Wave coefW,yW,xW
553       
554        String str = getWavesDataFolder(yW,0)
555        String DF="root:"+str+":"
556       
557        WAVE resW = $(DF+str+"_res")
558       
559        STRUCT ResSmearAAOStruct fs
560        WAVE fs.coefW = coefW   
561        WAVE fs.yW = yW
562        WAVE fs.xW = xW
563        WAVE fs.resW = resW
564       
565        Variable err
566        err = SmearedVesicle_SC(fs)
567       
568        return (0)
569End
570
571//wrapper to calculate the smeared model as an AAO-Struct
572// fills the struct and calls the ususal function with the STRUCT parameter
573//
574// used only for the dependency, not for fitting
575//
576Function fSmearedVesicle_SHS(coefW,yW,xW)
577        Wave coefW,yW,xW
578       
579        String str = getWavesDataFolder(yW,0)
580        String DF="root:"+str+":"
581       
582        WAVE resW = $(DF+str+"_res")
583       
584        STRUCT ResSmearAAOStruct fs
585        WAVE fs.coefW = coefW   
586        WAVE fs.yW = yW
587        WAVE fs.xW = xW
588        WAVE fs.resW = resW
589       
590        Variable err
591        err = SmearedVesicle_SHS(fs)
592       
593        return (0)
594End
595
Note: See TracBrowser for help on using the repository browser.