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 "Sphere" |
---|
7 | |
---|
8 | #include "HardSphereStruct" |
---|
9 | #include "HPMSA" |
---|
10 | #include "SquareWellStruct" |
---|
11 | #include "StickyHardSphereStruct" |
---|
12 | |
---|
13 | Proc PlotSphere_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 (^-1) for model: " |
---|
17 | Prompt qmax "Enter maximum q-value (^-1) for model: " |
---|
18 | |
---|
19 | //make the normal model waves |
---|
20 | Make/O/D/n=(num) xwave_S_HS,ywave_S_HS |
---|
21 | xwave_S_HS = alog(log(qmin) + x*((log(qmax)-log(qmin))/num)) |
---|
22 | Make/O/D coef_S_HS = {0.1,60,1e-6,6.3e-6,0.01} |
---|
23 | make/o/t parameters_S_HS = {"volume fraction","Radius (A)","SLD sphere (A-2)","SLD solvent (A-2)","bkgd (cm-1)"} |
---|
24 | Edit/K=1 parameters_S_HS,coef_S_HS |
---|
25 | Variable/G root:g_S_HS |
---|
26 | g_S_HS := Sphere_HS(coef_S_HS,ywave_S_HS,xwave_S_HS) |
---|
27 | // ywave_S_HS := Sphere_HS(coef_S_HS,xwave_S_HS) |
---|
28 | Display/K=1 ywave_S_HS vs xwave_S_HS |
---|
29 | ModifyGraph log=1,marker=29,msize=2,mode=4 |
---|
30 | Label bottom "q (\\S-1\\M)" |
---|
31 | Label left "Intensity (cm\\S-1\\M)" |
---|
32 | |
---|
33 | AutoPositionWindow/M=1/R=$(WinName(0,1)) $WinName(0,2) |
---|
34 | |
---|
35 | AddModelToStrings("Sphere_HS","coef_S_HS","S_HS") |
---|
36 | End |
---|
37 | |
---|
38 | // - sets up a dependency to a wrapper, not the actual SmearedModelFunction |
---|
39 | Proc PlotSmearedSphere_HS(str) |
---|
40 | String str |
---|
41 | Prompt str,"Pick the data folder containing the resolution you want",popup,getAList(4) |
---|
42 | |
---|
43 | // if any of the resolution waves are missing => abort |
---|
44 | if(ResolutionWavesMissingDF(str)) //updated to NOT use global strings (in GaussUtils) |
---|
45 | Abort |
---|
46 | endif |
---|
47 | |
---|
48 | SetDataFolder $("root:"+str) |
---|
49 | |
---|
50 | // Setup parameter table for model function |
---|
51 | Make/O/D smear_coef_S_HS = {0.1,60,1e-6,6.3e-6,0.01} |
---|
52 | make/o/t smear_parameters_S_HS = {"volume fraction","Radius (A)","SLD sphere (A-2)","SLD solvent (A-2)","bkgd (cm-1)"} |
---|
53 | Edit smear_parameters_S_HS,smear_coef_S_HS |
---|
54 | |
---|
55 | // output smeared intensity wave, dimensions are identical to experimental QSIG values |
---|
56 | // make extra copy of experimental q-values for easy plotting |
---|
57 | Duplicate/O $(str+"_q") smeared_S_HS,smeared_qvals |
---|
58 | SetScale d,0,0,"1/cm",smeared_S_HS |
---|
59 | |
---|
60 | Variable/G gs_S_HS=0 |
---|
61 | gs_S_HS := fSmearedSphere_HS(smear_coef_S_HS,smeared_S_HS,smeared_qvals) //this wrapper fills the STRUCT |
---|
62 | |
---|
63 | Display smeared_S_HS vs smeared_qvals |
---|
64 | ModifyGraph log=1,marker=29,msize=2,mode=4 |
---|
65 | Label bottom "q (\\S-1\\M)" |
---|
66 | Label left "Intensity (cm\\S-1\\M)" |
---|
67 | |
---|
68 | AutoPositionWindow/M=1/R=$(WinName(0,1)) $WinName(0,2) |
---|
69 | |
---|
70 | SetDataFolder root: |
---|
71 | AddModelToStrings("SmearedSphere_HS","smear_coef_S_HS","S_HS") |
---|
72 | End |
---|
73 | |
---|
74 | |
---|
75 | //AAO function |
---|
76 | Function Sphere_HS(w,yw,xw) : FitFunc |
---|
77 | Wave w,yw,xw |
---|
78 | |
---|
79 | //setup form factor coefficient wave |
---|
80 | Make/O/D/N=5 form_S_HS |
---|
81 | form_S_HS[0] = 1 |
---|
82 | form_S_HS[1] = w[1] |
---|
83 | form_S_HS[2] = w[2] |
---|
84 | form_S_HS[3] = w[3] |
---|
85 | form_S_HS[4] = 0 |
---|
86 | |
---|
87 | //setup structure factor coefficient wave |
---|
88 | Make/O/D/N=2 struct_S_HS |
---|
89 | struct_S_HS[0] = w[1] |
---|
90 | struct_S_HS[1] = w[0] |
---|
91 | |
---|
92 | //calculate each and combine |
---|
93 | Duplicate/O xw temp_S_HS_PQ,temp_S_HS_SQ //make waves for the AAO |
---|
94 | SphereForm(form_S_HS,temp_S_HS_PQ,xw) |
---|
95 | HardSphereStruct(struct_S_HS,temp_S_HS_SQ,xw) |
---|
96 | yw = temp_S_HS_PQ * temp_S_HS_SQ |
---|
97 | yw *= w[0] |
---|
98 | yw += w[4] |
---|
99 | |
---|
100 | //cleanup waves |
---|
101 | //Killwaves/Z form_S_HS,struct_S_HS |
---|
102 | |
---|
103 | return (0) |
---|
104 | End |
---|
105 | |
---|
106 | ///////////////////////////////// |
---|
107 | Proc PlotSphere_SW(num,qmin,qmax) |
---|
108 | Variable num=256,qmin=0.001,qmax=0.7 |
---|
109 | Prompt num "Enter number of data points for model: " |
---|
110 | Prompt qmin "Enter minimum q-value (^-1) for model: " |
---|
111 | Prompt qmax "Enter maximum q-value (^-1) for model: " |
---|
112 | |
---|
113 | /// |
---|
114 | Make/O/D/N=4 form_S_SW |
---|
115 | Make/O/D/N=4 struct_S_SW |
---|
116 | /// |
---|
117 | Make/O/D/n=(num) xwave_S_SW,ywave_S_SW |
---|
118 | xwave_S_SW = alog(log(qmin) + x*((log(qmax)-log(qmin))/num)) |
---|
119 | Make/O/D coef_S_SW = {0.1,60,1e-6,6.3e-6,1.0,1.2,0.01} |
---|
120 | make/o/t parameters_S_SW = {"volume fraction","Radius (A)","SLD sphere (A-2)","SLD solvent (A-2)","well depth (kT)","well width (diam.)","bkgd (cm-1)"} |
---|
121 | Edit/K=1 parameters_S_SW,coef_S_SW |
---|
122 | Variable/G root:g_S_SW |
---|
123 | g_S_SW := Sphere_SW(coef_S_SW,ywave_S_SW,xwave_S_SW) |
---|
124 | // ywave_S_SW := Sphere_SW(coef_S_SW,xwave_S_SW) |
---|
125 | Display/K=1 ywave_S_SW vs xwave_S_SW |
---|
126 | ModifyGraph log=1,marker=29,msize=2,mode=4 |
---|
127 | Label bottom "q (\\S-1\\M)" |
---|
128 | Label left "Intensity (cm\\S-1\\M)" |
---|
129 | |
---|
130 | AutoPositionWindow/M=1/R=$(WinName(0,1)) $WinName(0,2) |
---|
131 | AddModelToStrings("Sphere_SW","coef_S_SW","S_SW") |
---|
132 | End |
---|
133 | |
---|
134 | // - sets up a dependency to a wrapper, not the actual SmearedModelFunction |
---|
135 | Proc PlotSmearedSphere_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_S_SW = {0.1,60,1e-6,6.3e-6,1.0,1.2,0.01} |
---|
148 | make/o/t smear_parameters_S_SW = {"volume fraction","Radius (A)","SLD sphere (A-2)","SLD solvent (A-2)","well depth (kT)","well width (diam.)","bkgd (cm-1)"} |
---|
149 | Edit smear_parameters_S_SW,smear_coef_S_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_S_SW,smeared_qvals |
---|
154 | SetScale d,0,0,"1/cm",smeared_S_SW |
---|
155 | |
---|
156 | Variable/G gs_S_SW=0 |
---|
157 | gs_S_SW := fSmearedSphere_SW(smear_coef_S_SW,smeared_S_SW,smeared_qvals) //this wrapper fills the STRUCT |
---|
158 | |
---|
159 | Display smeared_S_SW vs smeared_qvals |
---|
160 | ModifyGraph log=1,marker=29,msize=2,mode=4 |
---|
161 | Label bottom "q (\\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("SmearedSphere_SW","smear_coef_S_SW","S_SW") |
---|
168 | End |
---|
169 | |
---|
170 | |
---|
171 | //AAO function |
---|
172 | Function Sphere_SW(w,yw,xw) : FitFunc |
---|
173 | Wave w,yw,xw |
---|
174 | |
---|
175 | //setup form factor coefficient wave |
---|
176 | Make/O/D/N=5 form_S_SW |
---|
177 | form_S_SW[0] = 1 |
---|
178 | form_S_SW[1] = w[1] |
---|
179 | form_S_SW[2] = w[2] |
---|
180 | form_S_SW[3] = w[3] |
---|
181 | form_S_SW[4] = 0 |
---|
182 | |
---|
183 | //setup structure factor coefficient wave |
---|
184 | Make/O/D/N=4 struct_S_SW |
---|
185 | struct_S_SW[0] = w[1] |
---|
186 | struct_S_SW[1] = w[0] |
---|
187 | struct_S_SW[2] = w[4] |
---|
188 | struct_S_SW[3] = w[5] |
---|
189 | |
---|
190 | //calculate each and combine |
---|
191 | Duplicate/O xw temp_S_SW_PQ,temp_S_SW_SQ |
---|
192 | SphereForm(form_S_SW,temp_S_SW_PQ,xw) |
---|
193 | SquareWellStruct(struct_S_SW,temp_S_SW_SQ,xw) |
---|
194 | yw = temp_S_SW_PQ * temp_S_SW_SQ |
---|
195 | yw *= w[0] |
---|
196 | yw += w[6] |
---|
197 | |
---|
198 | //cleanup waves |
---|
199 | //Killwaves/Z form_S_SW,struct_S_SW |
---|
200 | |
---|
201 | return (0) |
---|
202 | End |
---|
203 | |
---|
204 | ///////////////////////////////// |
---|
205 | Proc PlotSphere_SC(num,qmin,qmax) |
---|
206 | Variable num=256,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 | /// |
---|
217 | Make/O/D/n=(num) xwave_S_SC,ywave_S_SC |
---|
218 | xwave_S_SC = alog(log(qmin) + x*((log(qmax)-log(qmin))/num)) |
---|
219 | Make/O/D coef_S_SC = {0.2,50,1e-6,6.3e-6,20,0,298,78,0.0001} |
---|
220 | make/o/t parameters_S_SC = {"volume fraction","Radius (A)","SLD sphere (A-2)","SLD solvent (A-2)","charge","movalent salt(M)","Temperature (K)","dielectric const","bkgd (cm-1)"} |
---|
221 | Edit/K=1 parameters_S_SC,coef_S_SC |
---|
222 | Variable/G root:g_S_SC |
---|
223 | g_S_SC := Sphere_SC(coef_S_SC,ywave_S_SC,xwave_S_SC) |
---|
224 | // ywave_S_SC := Sphere_SC(coef_S_SC,xwave_S_SC) |
---|
225 | Display/K=1 ywave_S_SC vs xwave_S_SC |
---|
226 | ModifyGraph log=1,marker=29,msize=2,mode=4 |
---|
227 | Label bottom "q (\\S-1\\M)" |
---|
228 | Label left "Intensity (cm\\S-1\\M)" |
---|
229 | |
---|
230 | AutoPositionWindow/M=1/R=$(WinName(0,1)) $WinName(0,2) |
---|
231 | |
---|
232 | AddModelToStrings("Sphere_SC","coef_S_SC","S_SC") |
---|
233 | End |
---|
234 | |
---|
235 | // - sets up a dependency to a wrapper, not the actual SmearedModelFunction |
---|
236 | Proc PlotSmearedSphere_SC(str) |
---|
237 | String str |
---|
238 | Prompt str,"Pick the data folder containing the resolution you want",popup,getAList(4) |
---|
239 | |
---|
240 | // if any of the resolution waves are missing => abort |
---|
241 | if(ResolutionWavesMissingDF(str)) //updated to NOT use global strings (in GaussUtils) |
---|
242 | Abort |
---|
243 | endif |
---|
244 | |
---|
245 | SetDataFolder $("root:"+str) |
---|
246 | |
---|
247 | if(!DataFolderExists(":HayPenMSA")) |
---|
248 | NewDataFolder :HayPenMSA |
---|
249 | endif |
---|
250 | Make/O/D/N=17 :HayPenMSA:gMSAWave |
---|
251 | |
---|
252 | // Setup parameter table for model function |
---|
253 | Make/O/D smear_coef_S_SC = {0.2,50,1e-6,6.3e-6,20,0,298,78,0.0001} |
---|
254 | make/o/t smear_parameters_S_SC = {"volume fraction","Radius (A)","SLD sphere (A-2)","SLD solvent (A-2)","charge","movalent salt(M)","Temperature (K)","dielectric const","bkgd (cm-1)"} |
---|
255 | Edit smear_parameters_S_SC,smear_coef_S_SC |
---|
256 | |
---|
257 | // output smeared intensity wave, dimensions are identical to experimental QSIG values |
---|
258 | // make extra copy of experimental q-values for easy plotting |
---|
259 | Duplicate/O $(str+"_q") smeared_S_SC,smeared_qvals |
---|
260 | SetScale d,0,0,"1/cm",smeared_S_SC |
---|
261 | |
---|
262 | Variable/G gs_S_SC=0 |
---|
263 | gs_S_SC := fSmearedSphere_SC(smear_coef_S_SC,smeared_S_SC,smeared_qvals) //this wrapper fills the STRUCT |
---|
264 | |
---|
265 | Display smeared_S_SC vs smeared_qvals |
---|
266 | ModifyGraph log=1,marker=29,msize=2,mode=4 |
---|
267 | Label bottom "q (\\S-1\\M)" |
---|
268 | Label left "Intensity (cm\\S-1\\M)" |
---|
269 | |
---|
270 | AutoPositionWindow/M=1/R=$(WinName(0,1)) $WinName(0,2) |
---|
271 | |
---|
272 | SetDataFolder root: |
---|
273 | AddModelToStrings("SmearedSphere_SC","smear_coef_S_SC","S_SC") |
---|
274 | End |
---|
275 | |
---|
276 | |
---|
277 | //AAO function |
---|
278 | Function Sphere_SC(w,yw,xw) : FitFunc |
---|
279 | Wave w,yw,xw |
---|
280 | |
---|
281 | //setup form factor coefficient wave |
---|
282 | Make/O/D/N=5 form_S_SC |
---|
283 | form_S_SC[0] = 1 |
---|
284 | form_S_SC[1] = w[1] |
---|
285 | form_S_SC[2] = w[2] |
---|
286 | form_S_SC[3] = w[3] |
---|
287 | form_S_SC[4] = 0 |
---|
288 | |
---|
289 | //setup structure factor coefficient wave |
---|
290 | Make/O/D/N=6 struct_S_SC |
---|
291 | struct_S_SC[0] = 2*w[1] //diameter |
---|
292 | struct_S_SC[1] = w[4] |
---|
293 | struct_S_SC[2] = w[0] |
---|
294 | struct_S_SC[3] = w[6] |
---|
295 | struct_S_SC[4] = w[5] |
---|
296 | struct_S_SC[5] = w[7] |
---|
297 | |
---|
298 | //calculate each and combine |
---|
299 | Duplicate/O xw temp_S_SC_PQ,temp_S_SC_SQ |
---|
300 | SphereForm(form_S_SC,temp_S_SC_PQ,xw) |
---|
301 | HayterPenfoldMSA(struct_S_SC,temp_S_SC_SQ,xw) |
---|
302 | yw = temp_S_SC_PQ * temp_S_SC_SQ |
---|
303 | yw *= w[0] |
---|
304 | yw += w[8] |
---|
305 | |
---|
306 | //cleanup waves |
---|
307 | //Killwaves/Z form_S_SC,struct_S_SC |
---|
308 | return (0) |
---|
309 | End |
---|
310 | |
---|
311 | ///////////////////////////////// |
---|
312 | Proc PlotSphere_SHS(num,qmin,qmax) |
---|
313 | Variable num=256,qmin=0.001,qmax=0.7 |
---|
314 | Prompt num "Enter number of data points for model: " |
---|
315 | Prompt qmin "Enter minimum q-value (^-1) for model: " |
---|
316 | Prompt qmax "Enter maximum q-value (^-1) for model: " |
---|
317 | |
---|
318 | /// |
---|
319 | Make/O/D/N=4 form_S_SHS |
---|
320 | Make/O/D/N=4 struct_S_SHS |
---|
321 | /// |
---|
322 | Make/O/D/n=(num) xwave_S_SHS,ywave_S_SHS |
---|
323 | xwave_S_SHS = alog(log(qmin) + x*((log(qmax)-log(qmin))/num)) |
---|
324 | Make/O/D coef_S_SHS = {0.1,60,1e-6,6.3e-6,0.05,0.2,0.01} |
---|
325 | make/o/t parameters_S_SHS = {"volume fraction","Radius (A)","SLD sphere (A-2)","SLD solvent (A-2)","perturbation parameter (0.1)","stickiness, tau","bkgd (cm-1)"} |
---|
326 | Edit/K=1 parameters_S_SHS,coef_S_SHS |
---|
327 | Variable/G root:g_S_SHS |
---|
328 | g_S_SHS := Sphere_SHS(coef_S_SHS,ywave_S_SHS,xwave_S_SHS) |
---|
329 | // ywave_S_SHS := Sphere_SHS(coef_S_SHS,xwave_S_SHS) |
---|
330 | Display/K=1 ywave_S_SHS vs xwave_S_SHS |
---|
331 | ModifyGraph log=1,marker=29,msize=2,mode=4 |
---|
332 | Label bottom "q (\\S-1\\M)" |
---|
333 | Label left "Intensity (cm\\S-1\\M)" |
---|
334 | |
---|
335 | AutoPositionWindow/M=1/R=$(WinName(0,1)) $WinName(0,2) |
---|
336 | |
---|
337 | AddModelToStrings("Sphere_SHS","coef_S_SHS","S_SHS") |
---|
338 | End |
---|
339 | |
---|
340 | // - sets up a dependency to a wrapper, not the actual SmearedModelFunction |
---|
341 | Proc PlotSmearedSphere_SHS(str) |
---|
342 | String str |
---|
343 | Prompt str,"Pick the data folder containing the resolution you want",popup,getAList(4) |
---|
344 | |
---|
345 | // if any of the resolution waves are missing => abort |
---|
346 | if(ResolutionWavesMissingDF(str)) //updated to NOT use global strings (in GaussUtils) |
---|
347 | Abort |
---|
348 | endif |
---|
349 | |
---|
350 | SetDataFolder $("root:"+str) |
---|
351 | |
---|
352 | // Setup parameter table for model function |
---|
353 | Make/O/D smear_coef_S_SHS = {0.1,60,1e-6,6.3e-6,0.05,0.2,0.01} |
---|
354 | make/o/t smear_parameters_S_SHS = {"volume fraction","Radius (A)","SLD sphere (A-2)","SLD solvent (A-2)","perturbation parameter (0.1)","stickiness, tau","bkgd (cm-1)"} |
---|
355 | Edit smear_parameters_S_SHS,smear_coef_S_SHS |
---|
356 | |
---|
357 | // output smeared intensity wave, dimensions are identical to experimental QSIG values |
---|
358 | // make extra copy of experimental q-values for easy plotting |
---|
359 | Duplicate/O $(str+"_q") smeared_S_SHS,smeared_qvals |
---|
360 | SetScale d,0,0,"1/cm",smeared_S_SHS |
---|
361 | |
---|
362 | Variable/G gs_S_SHS=0 |
---|
363 | gs_S_SHS := fSmearedSphere_SHS(smear_coef_S_SHS,smeared_S_SHS,smeared_qvals) //this wrapper fills the STRUCT |
---|
364 | |
---|
365 | Display smeared_S_SHS vs smeared_qvals |
---|
366 | ModifyGraph log=1,marker=29,msize=2,mode=4 |
---|
367 | Label bottom "q (\\S-1\\M)" |
---|
368 | Label left "Intensity (cm\\S-1\\M)" |
---|
369 | |
---|
370 | AutoPositionWindow/M=1/R=$(WinName(0,1)) $WinName(0,2) |
---|
371 | |
---|
372 | SetDataFolder root: |
---|
373 | AddModelToStrings("SmearedSphere_SHS","smear_coef_S_SHS","S_SHS") |
---|
374 | End |
---|
375 | |
---|
376 | |
---|
377 | //AAO function |
---|
378 | Function Sphere_SHS(w,yw,xw) : FitFunc |
---|
379 | Wave w,yw,xw |
---|
380 | |
---|
381 | //setup form factor coefficient wave |
---|
382 | Make/O/D/N=5 form_S_SHS |
---|
383 | form_S_SHS[0] = 1 |
---|
384 | form_S_SHS[1] = w[1] |
---|
385 | form_S_SHS[2] = w[2] |
---|
386 | form_S_SHS[3] = w[3] |
---|
387 | form_S_SHS[4] = 0 |
---|
388 | |
---|
389 | //setup structure factor coefficient wave |
---|
390 | Make/O/D/N=4 struct_S_SHS |
---|
391 | struct_S_SHS[0] = w[1] |
---|
392 | struct_S_SHS[1] = w[0] |
---|
393 | struct_S_SHS[2] = w[4] |
---|
394 | struct_S_SHS[3] = w[5] |
---|
395 | |
---|
396 | //calculate each and combine |
---|
397 | Duplicate/O xw temp_S_SHS_PQ,temp_S_SHS_SQ |
---|
398 | SphereForm(form_S_SHS,temp_S_SHS_PQ,xw) |
---|
399 | StickyHS_Struct(struct_S_SHS,temp_S_SHS_SQ,xw) |
---|
400 | yw = temp_S_SHS_PQ * temp_S_SHS_SQ |
---|
401 | yw *= w[0] |
---|
402 | yw += w[6] |
---|
403 | |
---|
404 | //cleanup waves |
---|
405 | //Killwaves/Z form_S_SHS,struct_S_SHS |
---|
406 | |
---|
407 | return (0) |
---|
408 | End |
---|
409 | |
---|
410 | |
---|
411 | |
---|
412 | // this is all there is to the smeared calculation! |
---|
413 | Function SmearedSphere_HS(s) :FitFunc |
---|
414 | Struct ResSmearAAOStruct &s |
---|
415 | |
---|
416 | // the name of your unsmeared model is the first argument |
---|
417 | Smear_Model_20(Sphere_HS,s.coefW,s.xW,s.yW,s.resW) |
---|
418 | |
---|
419 | return(0) |
---|
420 | End |
---|
421 | |
---|
422 | // this is all there is to the smeared calculation! |
---|
423 | Function SmearedSphere_SW(s) :FitFunc |
---|
424 | Struct ResSmearAAOStruct &s |
---|
425 | |
---|
426 | // the name of your unsmeared model is the first argument |
---|
427 | Smear_Model_20(Sphere_SW,s.coefW,s.xW,s.yW,s.resW) |
---|
428 | |
---|
429 | return(0) |
---|
430 | End |
---|
431 | |
---|
432 | // this is all there is to the smeared calculation! |
---|
433 | Function SmearedSphere_SC(s) :FitFunc |
---|
434 | Struct ResSmearAAOStruct &s |
---|
435 | |
---|
436 | // the name of your unsmeared model is the first argument |
---|
437 | Smear_Model_20(Sphere_SC,s.coefW,s.xW,s.yW,s.resW) |
---|
438 | |
---|
439 | return(0) |
---|
440 | End |
---|
441 | |
---|
442 | // this is all there is to the smeared calculation! |
---|
443 | Function SmearedSphere_SHS(s) :FitFunc |
---|
444 | Struct ResSmearAAOStruct &s |
---|
445 | |
---|
446 | // the name of your unsmeared model is the first argument |
---|
447 | Smear_Model_20(Sphere_SHS,s.coefW,s.xW,s.yW,s.resW) |
---|
448 | |
---|
449 | return(0) |
---|
450 | End |
---|
451 | |
---|
452 | //wrapper to calculate the smeared model as an AAO-Struct |
---|
453 | // fills the struct and calls the ususal function with the STRUCT parameter |
---|
454 | // |
---|
455 | // used only for the dependency, not for fitting |
---|
456 | // |
---|
457 | Function fSmearedSphere_HS(coefW,yW,xW) |
---|
458 | Wave coefW,yW,xW |
---|
459 | |
---|
460 | String str = getWavesDataFolder(yW,0) |
---|
461 | String DF="root:"+str+":" |
---|
462 | |
---|
463 | WAVE resW = $(DF+str+"_res") |
---|
464 | |
---|
465 | STRUCT ResSmearAAOStruct fs |
---|
466 | WAVE fs.coefW = coefW |
---|
467 | WAVE fs.yW = yW |
---|
468 | WAVE fs.xW = xW |
---|
469 | WAVE fs.resW = resW |
---|
470 | |
---|
471 | Variable err |
---|
472 | err = SmearedSphere_HS(fs) |
---|
473 | |
---|
474 | return (0) |
---|
475 | End |
---|
476 | |
---|
477 | //wrapper to calculate the smeared model as an AAO-Struct |
---|
478 | // fills the struct and calls the ususal function with the STRUCT parameter |
---|
479 | // |
---|
480 | // used only for the dependency, not for fitting |
---|
481 | // |
---|
482 | Function fSmearedSphere_SW(coefW,yW,xW) |
---|
483 | Wave coefW,yW,xW |
---|
484 | |
---|
485 | String str = getWavesDataFolder(yW,0) |
---|
486 | String DF="root:"+str+":" |
---|
487 | |
---|
488 | WAVE resW = $(DF+str+"_res") |
---|
489 | |
---|
490 | STRUCT ResSmearAAOStruct fs |
---|
491 | WAVE fs.coefW = coefW |
---|
492 | WAVE fs.yW = yW |
---|
493 | WAVE fs.xW = xW |
---|
494 | WAVE fs.resW = resW |
---|
495 | |
---|
496 | Variable err |
---|
497 | err = SmearedSphere_SW(fs) |
---|
498 | |
---|
499 | return (0) |
---|
500 | End |
---|
501 | |
---|
502 | //wrapper to calculate the smeared model as an AAO-Struct |
---|
503 | // fills the struct and calls the ususal function with the STRUCT parameter |
---|
504 | // |
---|
505 | // used only for the dependency, not for fitting |
---|
506 | // |
---|
507 | Function fSmearedSphere_SC(coefW,yW,xW) |
---|
508 | Wave coefW,yW,xW |
---|
509 | |
---|
510 | String str = getWavesDataFolder(yW,0) |
---|
511 | String DF="root:"+str+":" |
---|
512 | |
---|
513 | WAVE resW = $(DF+str+"_res") |
---|
514 | |
---|
515 | STRUCT ResSmearAAOStruct fs |
---|
516 | WAVE fs.coefW = coefW |
---|
517 | WAVE fs.yW = yW |
---|
518 | WAVE fs.xW = xW |
---|
519 | WAVE fs.resW = resW |
---|
520 | |
---|
521 | Variable err |
---|
522 | err = SmearedSphere_SC(fs) |
---|
523 | |
---|
524 | return (0) |
---|
525 | End |
---|
526 | |
---|
527 | //wrapper to calculate the smeared model as an AAO-Struct |
---|
528 | // fills the struct and calls the ususal function with the STRUCT parameter |
---|
529 | // |
---|
530 | // used only for the dependency, not for fitting |
---|
531 | // |
---|
532 | Function fSmearedSphere_SHS(coefW,yW,xW) |
---|
533 | Wave coefW,yW,xW |
---|
534 | |
---|
535 | String str = getWavesDataFolder(yW,0) |
---|
536 | String DF="root:"+str+":" |
---|
537 | |
---|
538 | WAVE resW = $(DF+str+"_res") |
---|
539 | |
---|
540 | STRUCT ResSmearAAOStruct fs |
---|
541 | WAVE fs.coefW = coefW |
---|
542 | WAVE fs.yW = yW |
---|
543 | WAVE fs.xW = xW |
---|
544 | WAVE fs.resW = resW |
---|
545 | |
---|
546 | Variable err |
---|
547 | err = SmearedSphere_SHS(fs) |
---|
548 | |
---|
549 | return (0) |
---|
550 | End |
---|