-
Notifications
You must be signed in to change notification settings - Fork 1
/
test_mswavef.pro
553 lines (506 loc) · 22.3 KB
/
test_mswavef.pro
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
function hyper2F1old, a, b, c, z
; calculates the 2F1 hypergeometric series
; this is an older version, non-vectorised version, but well tested.
if (a eq 0.) or (b eq 0.) or (c eq 0.) then return, 0.d0
errlim = 1d-16
err = 1d10
sum = 0.d0
n = 0l
while (err gt errlim) do begin
prod = 1.d0
; term by term evaluation of product for numerical precision
if n ge 1 then begin
iarr = dindgen(n)
prod = product(1.d0 / (iarr+1.) * (a+iarr) / (c+iarr) * (b+iarr))
endif
term = prod * double(z)^n
if n ge 1 then err = abs(term/sum)
sum = sum + term
n = n + 1
endwhile
return, sum
end
pro testhankel
q = dindgen(100)/100.+1
nu = 10.0
l = 9
t = 4
!p.multi=[0,1,3]
y1 = q*0.d0
for i = 0, n_elements(q)-1 do y1[i] = hankel(q[i],nu,l,t)
y2 = sqrt(2./!pi) * gamma(nu-t+1) * ((1./nu/nu + q*q)^((-nu+t-1)/2.))*sin((nu-t+1)*atan(q*nu))
plot, q, y1, charsize = 2
plot, q, y2, psym = 5, charsize = 2
plot, q, y1/y2, charsize = 2, thicK = 3
!p.multi=0
stop
end
pro testhyper
z = dindgen(100)/100.
a = .5
b = 1.
c = 1.5
h1 = z*0.d0
for i = 0, n_elements(z)-1 do h1[i] = z[i] * hyper2F1(a,b,c,z[i]*z[i])
h2 = 0.5*alog((1+z)/(1-z))
plot, z, h2, linestyle=2, thick = 3
oplot, z, h1
stop
end
pro testgwf
;
; testing for neutrals, specific cases from literature
;
t = systime(1)
q = (dindgen(100))/40
window, 0, xsize = 1900
!p.multi = [0,5,1]
!p.charsize = 3
; Na 4s
ns = 2.64
plot, q, q*gwf(0, ns, 0, q), ytitle = "q*g(q)", xtitle = 'q (au)', title = 'Na (4s)'
oplot, q, q*gwf(0, 2.0, 0, q), linestyle = 2
oplot, q, q*gwf(0, 3.0, 0, q), linestyle = 2
;oplot, q, (q*gwf(0, 2.2, 0, q))^2, linestyle = 3
;oplot, q, (q*gwf(0, 2.8, 0, q))^2, linestyle = 3
oplot, q, q*Fnl(1., 0, 3, 0, q), psym = 4
; Na 4p
ns = 3.13
plot, q, q*gwf(0, ns, 1, q), xtitle = 'q (au)', title = 'Na (4p)'
oplot, q, q*gwf(0, 3.0, 1, q), linestyle = 2
oplot, q, -q*Fnl(1., 0, 3, 1, q), psym = 4
; Mg 6s
ns = 4.358
plot, q, q*gwf(0, ns, 0, q), title = 'Mg (6s)'
oplot, q, q*gwf(0, 4.0, 2, q), linestyle = 2
oplot, q, -q*Fnl(1., 0., 4.0, 2, q), psym = 4
; Mg 6p
ns = 4.86
plot, q, q*gwf(0, ns, 1, q), title = 'Mg (6p)';, xr=[0,1.0], /xs
oplot, q, q*gwf(0, 5.0, 1, q), linestyle = 2
oplot, q, -q*Fnl(1., 0, 5, 1, q), psym = 4
; Cs 10p
ns = 6.43
plot, q, q*gwf(0, ns, 1, q), title = 'Cs (10p)';, xr=[0,1.0], /xs
oplot, q, q*gwf(0, 6.0, 1, q), linestyle = 2
oplot, q, q*Fnl(1., 0, 6, 1, q), psym = 4
print, systime(1) - t, ' SECONDS'
!p.multi = 0
!p.charsize = 1
end
pro testgwfl
;
; specific cases from literature
;
t = systime(1)
q = [(dindgen(20)+1), 50.]
;window, 0, xsize = 1700, ysize = 1000
set_plot, 'ps'
device, file = 'wfs.eps', ysize = 30, xsize = 45
!p.multi = [0,6,4]
!p.charsize = 2
; Na 4s
l = 0
ns = 2.1
yy = gwf(0, ns, l, q)
plot, q, (q*yy)^2, ytitle = "q*g(q)", xtitle = 'q (au)', /ylog, /xlog, xr=[min(q),max(q)], /xs, title = string(ns, '(f4.1)')+string(l, '(i3)')
plot, q, (q*yy)^2, ytitle = "q*g(q)", xtitle = 'q (au)', /xlog, xr=[min(q),max(q)], /xs
plot, q, (q*yy)^2, ytitle = "q*g(q)", xtitle = 'q (au)', /ylog, xr=[min(q),max(q)], /xs
plot, q, (yy)^2, ytitle = "g(q)", xtitle = 'q (au)', /ylog, /xlog, xr=[min(q),max(q)], /xs
plot, q, (yy)^2, ytitle = "g(q)", xtitle = 'q (au)', /xlog, xr=[min(q),max(q)], /xs
plot, q, (yy)^2, ytitle = "g(q)", xtitle = 'q (au)', /ylog, xr=[min(q),max(q)], /xs
print, systime(1) - t, ' SECONDS'
ns = 5.7
yy = gwf(0, ns, l, q)
plot, q, (q*yy)^2, ytitle = "q*g(q)", xtitle = 'q (au)', /ylog, /xlog, xr=[min(q),max(q)], /xs, title = string(ns, '(f4.1)')+string(l, '(i3)')
plot, q, (q*yy)^2, ytitle = "q*g(q)", xtitle = 'q (au)', /xlog, xr=[min(q),max(q)], /xs
plot, q, (q*yy)^2, ytitle = "q*g(q)", xtitle = 'q (au)', /ylog, xr=[min(q),max(q)], /xs
plot, q, (yy)^2, ytitle = "g(q)", xtitle = 'q (au)', /ylog, /xlog, xr=[min(q),max(q)], /xs
plot, q, (yy)^2, ytitle = "g(q)", xtitle = 'q (au)', /xlog, xr=[min(q),max(q)], /xs
plot, q, (yy)^2, ytitle = "g(q)", xtitle = 'q (au)', /ylog, xr=[min(q),max(q)], /xs
print, systime(1) - t, ' SECONDS'
ns = 12.5
yy = gwf(0, ns, l, q)
plot, q, (q*yy)^2, ytitle = "q*g(q)", xtitle = 'q (au)', /ylog, /xlog, xr=[min(q),max(q)], /xs, title = string(ns, '(f4.1)')+string(l, '(i3)')
plot, q, (q*yy)^2, ytitle = "q*g(q)", xtitle = 'q (au)', /xlog, xr=[min(q),max(q)], /xs
plot, q, (q*yy)^2, ytitle = "q*g(q)", xtitle = 'q (au)', /ylog, xr=[min(q),max(q)], /xs
plot, q, (yy)^2, ytitle = "g(q)", xtitle = 'q (au)', /ylog, /xlog, xr=[min(q),max(q)], /xs
plot, q, (yy)^2, ytitle = "g(q)", xtitle = 'q (au)', /xlog, xr=[min(q),max(q)], /xs
plot, q, (yy)^2, ytitle = "g(q)", xtitle = 'q (au)', /ylog, xr=[min(q),max(q)], /xs
print, systime(1) - t, ' SECONDS'
ns = 17.3
yy = gwf(0, ns, l, q)
plot, q, (q*yy)^2, ytitle = "q*g(q)", xtitle = 'q (au)', /ylog, /xlog, xr=[min(q),max(q)], /xs, title = string(ns, '(f4.1)')+string(l, '(i3)')
plot, q, (q*yy)^2, ytitle = "q*g(q)", xtitle = 'q (au)', /xlog, xr=[min(q),max(q)], /xs
plot, q, (q*yy)^2, ytitle = "q*g(q)", xtitle = 'q (au)', /ylog, xr=[min(q),max(q)], /xs
plot, q, (yy)^2, ytitle = "g(q)", xtitle = 'q (au)', /ylog, /xlog, xr=[min(q),max(q)], /xs
plot, q, (yy)^2, ytitle = "g(q)", xtitle = 'q (au)', /xlog, xr=[min(q),max(q)], /xs
plot, q, (yy)^2, ytitle = "g(q)", xtitle = 'q (au)', /ylog, xr=[min(q),max(q)], /xs
print, systime(1) - t, ' SECONDS'
l = 2
ns = 5.7
yy = gwf(0, ns, l, q)
plot, q, (q*yy)^2, ytitle = "q*g(q)", xtitle = 'q (au)', /ylog, /xlog, xr=[min(q),max(q)], /xs, title = string(ns, '(f4.1)')+string(l, '(i3)')
plot, q, (q*yy)^2, ytitle = "q*g(q)", xtitle = 'q (au)', /xlog, xr=[min(q),max(q)], /xs
plot, q, (q*yy)^2, ytitle = "q*g(q)", xtitle = 'q (au)', /ylog, xr=[min(q),max(q)], /xs
plot, q, (yy)^2, ytitle = "g(q)", xtitle = 'q (au)', /ylog, /xlog, xr=[min(q),max(q)], /xs
plot, q, (yy)^2, ytitle = "g(q)", xtitle = 'q (au)', /xlog, xr=[min(q),max(q)], /xs
plot, q, (yy)^2, ytitle = "g(q)", xtitle = 'q (au)', /ylog, xr=[min(q),max(q)], /xs
print, systime(1) - t, ' SECONDS'
ns = 10.0
yy = gwf(0, ns, l, q)
plot, q, (q*yy)^2, ytitle = "q*g(q)", xtitle = 'q (au)', /ylog, /xlog, xr=[min(q),max(q)], /xs, title = string(ns, '(f4.1)')+string(l, '(i3)')
plot, q, (q*yy)^2, ytitle = "q*g(q)", xtitle = 'q (au)', /xlog, xr=[min(q),max(q)], /xs
plot, q, (q*yy)^2, ytitle = "q*g(q)", xtitle = 'q (au)', /ylog, xr=[min(q),max(q)], /xs
plot, q, (yy)^2, ytitle = "g(q)", xtitle = 'q (au)', /ylog, /xlog, xr=[min(q),max(q)], /xs
plot, q, (yy)^2, ytitle = "g(q)", xtitle = 'q (au)', /xlog, xr=[min(q),max(q)], /xs
plot, q, (yy)^2, ytitle = "g(q)", xtitle = 'q (au)', /ylog, xr=[min(q),max(q)], /xs
print, systime(1) - t, ' SECONDS'
ns = 12.5
yy = gwf(0, ns, l, q)
plot, q, (q*yy)^2, ytitle = "q*g(q)", xtitle = 'q (au)', /ylog, /xlog, xr=[min(q),max(q)], /xs, title = string(ns, '(f4.1)')+string(l, '(i3)')
plot, q, (q*yy)^2, ytitle = "q*g(q)", xtitle = 'q (au)', /xlog, xr=[min(q),max(q)], /xs
plot, q, (q*yy)^2, ytitle = "q*g(q)", xtitle = 'q (au)', /ylog, xr=[min(q),max(q)], /xs
plot, q, (yy)^2, ytitle = "g(q)", xtitle = 'q (au)', /ylog, /xlog, xr=[min(q),max(q)], /xs
plot, q, (yy)^2, ytitle = "g(q)", xtitle = 'q (au)', /xlog, xr=[min(q),max(q)], /xs
plot, q, (yy)^2, ytitle = "g(q)", xtitle = 'q (au)', /ylog, xr=[min(q),max(q)], /xs
print, systime(1) - t, ' SECONDS'
ns = 17.3
yy = gwf(0, ns, l, q)
plot, q, (q*yy)^2, ytitle = "q*g(q)", xtitle = 'q (au)', /ylog, /xlog, xr=[min(q),max(q)], /xs, title = string(ns, '(f4.1)')+string(l, '(i3)')
plot, q, (q*yy)^2, ytitle = "q*g(q)", xtitle = 'q (au)', /xlog, xr=[min(q),max(q)], /xs
plot, q, (q*yy)^2, ytitle = "q*g(q)", xtitle = 'q (au)', /ylog, xr=[min(q),max(q)], /xs
plot, q, (yy)^2, ytitle = "g(q)", xtitle = 'q (au)', /ylog, /xlog, xr=[min(q),max(q)], /xs
plot, q, (yy)^2, ytitle = "g(q)", xtitle = 'q (au)', /xlog, xr=[min(q),max(q)], /xs
plot, q, (yy)^2, ytitle = "g(q)", xtitle = 'q (au)', /ylog, xr=[min(q),max(q)], /xs
print, systime(1) - t, ' SECONDS'
l = 4
ns = 5.7
yy = gwf(0, ns, l, q)
plot, q, (q*yy)^2, ytitle = "q*g(q)", xtitle = 'q (au)', /ylog, /xlog, xr=[min(q),max(q)], /xs, title = string(ns, '(f4.1)')+string(l, '(i3)')
plot, q, (q*yy)^2, ytitle = "q*g(q)", xtitle = 'q (au)', /xlog, xr=[min(q),max(q)], /xs
plot, q, (q*yy)^2, ytitle = "q*g(q)", xtitle = 'q (au)', /ylog, xr=[min(q),max(q)], /xs
plot, q, (yy)^2, ytitle = "g(q)", xtitle = 'q (au)', /ylog, /xlog, xr=[min(q),max(q)], /xs
plot, q, (yy)^2, ytitle = "g(q)", xtitle = 'q (au)', /xlog, xr=[min(q),max(q)], /xs
plot, q, (yy)^2, ytitle = "g(q)", xtitle = 'q (au)', /ylog, xr=[min(q),max(q)], /xs
print, systime(1) - t, ' SECONDS'
ns = 10.0
yy = gwf(0, ns, l, q)
plot, q, (q*yy)^2, ytitle = "q*g(q)", xtitle = 'q (au)', /ylog, /xlog, xr=[min(q),max(q)], /xs, title = string(ns, '(f4.1)')+string(l, '(i3)')
plot, q, (q*yy)^2, ytitle = "q*g(q)", xtitle = 'q (au)', /xlog, xr=[min(q),max(q)], /xs
plot, q, (q*yy)^2, ytitle = "q*g(q)", xtitle = 'q (au)', /ylog, xr=[min(q),max(q)], /xs
plot, q, (yy)^2, ytitle = "g(q)", xtitle = 'q (au)', /ylog, /xlog, xr=[min(q),max(q)], /xs
plot, q, (yy)^2, ytitle = "g(q)", xtitle = 'q (au)', /xlog, xr=[min(q),max(q)], /xs
plot, q, (yy)^2, ytitle = "g(q)", xtitle = 'q (au)', /ylog, xr=[min(q),max(q)], /xs
print, systime(1) - t, ' SECONDS'
ns = 12.5
yy = gwf(0, ns, l, q)
plot, q, (q*yy)^2, ytitle = "q*g(q)", xtitle = 'q (au)', /ylog, /xlog, xr=[min(q),max(q)], /xs, title = string(ns, '(f4.1)')+string(l, '(i3)')
plot, q, (q*yy)^2, ytitle = "q*g(q)", xtitle = 'q (au)', /xlog, xr=[min(q),max(q)], /xs
plot, q, (q*yy)^2, ytitle = "q*g(q)", xtitle = 'q (au)', /ylog, xr=[min(q),max(q)], /xs
plot, q, (yy)^2, ytitle = "g(q)", xtitle = 'q (au)', /ylog, /xlog, xr=[min(q),max(q)], /xs
plot, q, (yy)^2, ytitle = "g(q)", xtitle = 'q (au)', /xlog, xr=[min(q),max(q)], /xs
plot, q, (yy)^2, ytitle = "g(q)", xtitle = 'q (au)', /ylog, xr=[min(q),max(q)], /xs
print, systime(1) - t, ' SECONDS'
ns = 17.3
yy = gwf(0, ns, l, q)
plot, q, (q*yy)^2, ytitle = "q*g(q)", xtitle = 'q (au)', /ylog, /xlog, xr=[min(q),max(q)], /xs, title = string(ns, '(f4.1)')+string(l, '(i3)')
plot, q, (q*yy)^2, ytitle = "q*g(q)", xtitle = 'q (au)', /xlog, xr=[min(q),max(q)], /xs
plot, q, (q*yy)^2, ytitle = "q*g(q)", xtitle = 'q (au)', /ylog, xr=[min(q),max(q)], /xs
plot, q, (yy)^2, ytitle = "g(q)", xtitle = 'q (au)', /ylog, /xlog, xr=[min(q),max(q)], /xs
plot, q, (yy)^2, ytitle = "g(q)", xtitle = 'q (au)', /xlog, xr=[min(q),max(q)], /xs
plot, q, (yy)^2, ytitle = "g(q)", xtitle = 'q (au)', /ylog, xr=[min(q),max(q)], /xs
print, systime(1) - t, ' SECONDS'
l = 7
ns = 8.3
yy = gwf(0, ns, l, q)
plot, q, (q*yy)^2, ytitle = "q*g(q)", xtitle = 'q (au)', /ylog, /xlog, xr=[min(q),max(q)], /xs, title = string(ns, '(f4.1)')+string(l, '(i3)')
plot, q, (q*yy)^2, ytitle = "q*g(q)", xtitle = 'q (au)', /xlog, xr=[min(q),max(q)], /xs
plot, q, (q*yy)^2, ytitle = "q*g(q)", xtitle = 'q (au)', /ylog, xr=[min(q),max(q)], /xs
plot, q, (yy)^2, ytitle = "g(q)", xtitle = 'q (au)', /ylog, /xlog, xr=[min(q),max(q)], /xs
plot, q, (yy)^2, ytitle = "g(q)", xtitle = 'q (au)', /xlog, xr=[min(q),max(q)], /xs
plot, q, (yy)^2, ytitle = "g(q)", xtitle = 'q (au)', /ylog, xr=[min(q),max(q)], /xs
print, systime(1) - t, ' SECONDS'
ns = 10.0
yy = gwf(0, ns, l, q)
plot, q, (q*yy)^2, ytitle = "q*g(q)", xtitle = 'q (au)', /ylog, /xlog, xr=[min(q),max(q)], /xs, title = string(ns, '(f4.1)')+string(l, '(i3)')
plot, q, (q*yy)^2, ytitle = "q*g(q)", xtitle = 'q (au)', /xlog, xr=[min(q),max(q)], /xs
plot, q, (q*yy)^2, ytitle = "q*g(q)", xtitle = 'q (au)', /ylog, xr=[min(q),max(q)], /xs
plot, q, (yy)^2, ytitle = "g(q)", xtitle = 'q (au)', /ylog, /xlog, xr=[min(q),max(q)], /xs
plot, q, (yy)^2, ytitle = "g(q)", xtitle = 'q (au)', /xlog, xr=[min(q),max(q)], /xs
plot, q, (yy)^2, ytitle = "g(q)", xtitle = 'q (au)', /ylog, xr=[min(q),max(q)], /xs
print, systime(1) - t, ' SECONDS'
ns = 12.5
yy = gwf(0, ns, l, q)
plot, q, (q*yy)^2, ytitle = "q*g(q)", xtitle = 'q (au)', /ylog, /xlog, xr=[min(q),max(q)], /xs, title = string(ns, '(f4.1)')+string(l, '(i3)')
plot, q, (q*yy)^2, ytitle = "q*g(q)", xtitle = 'q (au)', /xlog, xr=[min(q),max(q)], /xs
plot, q, (q*yy)^2, ytitle = "q*g(q)", xtitle = 'q (au)', /ylog, xr=[min(q),max(q)], /xs
plot, q, (yy)^2, ytitle = "g(q)", xtitle = 'q (au)', /ylog, /xlog, xr=[min(q),max(q)], /xs
plot, q, (yy)^2, ytitle = "g(q)", xtitle = 'q (au)', /xlog, xr=[min(q),max(q)], /xs
plot, q, (yy)^2, ytitle = "g(q)", xtitle = 'q (au)', /ylog, xr=[min(q),max(q)], /xs
print, systime(1) - t, ' SECONDS'
ns = 17.3
yy = gwf(0, ns, l, q)
plot, q, (q*yy)^2, ytitle = "q*g(q)", xtitle = 'q (au)', /ylog, /xlog, xr=[min(q),max(q)], /xs, title = string(ns, '(f4.1)')+string(l, '(i3)')
plot, q, (q*yy)^2, ytitle = "q*g(q)", xtitle = 'q (au)', /xlog, xr=[min(q),max(q)], /xs
plot, q, (q*yy)^2, ytitle = "q*g(q)", xtitle = 'q (au)', /ylog, xr=[min(q),max(q)], /xs
plot, q, (yy)^2, ytitle = "g(q)", xtitle = 'q (au)', /ylog, /xlog, xr=[min(q),max(q)], /xs
plot, q, (yy)^2, ytitle = "g(q)", xtitle = 'q (au)', /xlog, xr=[min(q),max(q)], /xs
print, systime(1) - t, ' SECONDS'
l = 13
ns = 14.3
yy = gwf(0, ns, l, q)
plot, q, (q*yy)^2, ytitle = "q*g(q)", xtitle = 'q (au)', /ylog, /xlog, xr=[min(q),max(q)], /xs, title = string(ns, '(f4.1)')+string(l, '(i3)')
plot, q, (q*yy)^2, ytitle = "q*g(q)", xtitle = 'q (au)', /xlog, xr=[min(q),max(q)], /xs
plot, q, (q*yy)^2, ytitle = "q*g(q)", xtitle = 'q (au)', /ylog, xr=[min(q),max(q)], /xs
plot, q, (yy)^2, ytitle = "g(q)", xtitle = 'q (au)', /ylog, /xlog, xr=[min(q),max(q)], /xs
plot, q, (yy)^2, ytitle = "g(q)", xtitle = 'q (au)', /xlog, xr=[min(q),max(q)], /xs
plot, q, (yy)^2, ytitle = "g(q)", xtitle = 'q (au)', /ylog, xr=[min(q),max(q)], /xs
ns = 15.0
yy = gwf(0, ns, l, q)
plot, q, (q*yy)^2, ytitle = "q*g(q)", xtitle = 'q (au)', /ylog, /xlog, xr=[min(q),max(q)], /xs, title = string(ns, '(f4.1)')+string(l, '(i3)')
plot, q, (q*yy)^2, ytitle = "q*g(q)", xtitle = 'q (au)', /xlog, xr=[min(q),max(q)], /xs
plot, q, (q*yy)^2, ytitle = "q*g(q)", xtitle = 'q (au)', /ylog, xr=[min(q),max(q)], /xs
plot, q, (yy)^2, ytitle = "g(q)", xtitle = 'q (au)', /ylog, /xlog, xr=[min(q),max(q)], /xs
plot, q, (yy)^2, ytitle = "g(q)", xtitle = 'q (au)', /xlog, xr=[min(q),max(q)], /xs
plot, q, (yy)^2, ytitle = "g(q)", xtitle = 'q (au)', /ylog, xr=[min(q),max(q)], /xs
ns = 16.5
yy = gwf(0, ns, l, q)
plot, q, (q*yy)^2, ytitle = "q*g(q)", xtitle = 'q (au)', /ylog, /xlog, xr=[min(q),max(q)], /xs, title = string(ns, '(f4.1)')+string(l, '(i3)')
plot, q, (q*yy)^2, ytitle = "q*g(q)", xtitle = 'q (au)', /xlog, xr=[min(q),max(q)], /xs
plot, q, (q*yy)^2, ytitle = "q*g(q)", xtitle = 'q (au)', /ylog, xr=[min(q),max(q)], /xs
plot, q, (yy)^2, ytitle = "g(q)", xtitle = 'q (au)', /ylog, /xlog, xr=[min(q),max(q)], /xs
plot, q, (yy)^2, ytitle = "g(q)", xtitle = 'q (au)', /xlog, xr=[min(q),max(q)], /xs
plot, q, (yy)^2, ytitle = "g(q)", xtitle = 'q (au)', /ylog, xr=[min(q),max(q)], /xs
ns = 17.3
yy = gwf(0, ns, l, q)
plot, q, (q*yy)^2, ytitle = "q*g(q)", xtitle = 'q (au)', /ylog, /xlog, xr=[min(q),max(q)], /xs, title = string(ns, '(f4.1)')+string(l, '(i3)')
plot, q, (q*yy)^2, ytitle = "q*g(q)", xtitle = 'q (au)', /xlog, xr=[min(q),max(q)], /xs
plot, q, (q*yy)^2, ytitle = "q*g(q)", xtitle = 'q (au)', /ylog, xr=[min(q),max(q)], /xs
plot, q, (yy)^2, ytitle = "g(q)", xtitle = 'q (au)', /ylog, /xlog, xr=[min(q),max(q)], /xs
plot, q, (yy)^2, ytitle = "g(q)", xtitle = 'q (au)', /xlog, xr=[min(q),max(q)], /xs
plot, q, (yy)^2, ytitle = "g(q)", xtitle = 'q (au)', /ylog, xr=[min(q),max(q)], /xs
;plot, q, (q*gwf(0, 2.2, 0, q))^2, /ylog, /xlog, xr=[min(q),max(q)], /xs
;oplot, q, (q*gwf(0, 2.8, 0, q))^2, /ylog, /xlog, xr=[min(q),max(q)], /xs
;oplot, q, (q*gwf(0, 2.0, 0, q))^2, /ylog, /xlog, xr=[min(q),max(q)], /xs
;oplot, q, (q*gwf(0, 3.0, 0, q))^2, /ylog, /xlog, xr=[min(q),max(q)], /xs
;oplot, q, (q*Fnl(1., 0, 3, 0, q))^2, psym = 4
print, systime(1) - t, ' SECONDS'
device, /close_file
set_plot, 'x'
stop
; Na 4p
ns = 3.13
plot, q, (gwf(0, ns, 1, q))^2, /ylog, /xlog, xr=[min(q),max(q)], /xs
oplot, q, (gwf(0, 3.0, 1, q))^2, linestyle = 2
oplot, q, (Fnl(1., 0, 3, 1, q))^2, psym = 4
; Mg 6s
ns = 4.358
plot, q, (gwf(0, ns, 0, q))^2, /ylog, /xlog, xr=[min(q),max(q)], /xs
oplot, q, (gwf(0, 4.0, 0, q))^2, linestyle = 2
oplot, q, (Fnl(1., 0, 4, 0, q))^2, psym = 4
; Mg 6p
ns = 4.86
plot, q, (gwf(0, ns, 1, q))^2, /ylog, /xlog, xr=[min(q),max(q)], /xs ;, xr=[0,1.0], /xs
oplot, q, (gwf(0, 5.0, 1, q))^2, linestyle = 2
oplot, q, (Fnl(1., 0, 5, 1, q))^2, psym = 4
; Cs 10p
ns = 6.43
plot, q, (gwf(0, ns, 1, q))^2, /ylog, /xlog, xr=[min(q),max(q)], /xs ;, xr=[0,1.0], /xs
oplot, q, (gwf(0, 6.0, 1, q))^2, linestyle = 2
oplot, q, (Fnl(1., 0, 6, 1, q))^2, psym = 4
print, systime(1) - t, ' SECONDS'
!p.multi = 0
!p.charsize = 1
end
pro testgwfl2
t = systime(1)
pmin = 1e-4
pmax = 1000.
npts = 10000
pstep = (alog(pmax) - alog(pmin))/(npts-1)
q = exp(alog(pmin) + pstep*dindgen(npts))
set_plot, 'ps'
device, file = 'wfs.eps', xsize = 28, xoffset=1, yoffset = 29, /landscape
!p.multi = 0
!p.charsize = 1.5
ns = 20.0
yy = gwf(0, ns, 0, q)
plot, q, (yy)^2, ytitle = "g(q)^2", xtitle = 'q (au)', /ylog, /xlog, xr=[min(q),max(q)], /xs, title = string(ns, '(f4.1)')
for ns = 3.0, 20.0, 1.0 do begin
yy = gwf(0, ns, 0, q)
oplot, q, (yy)^2, linestyle = 5
endfor
for ns = 3.0, 20.0, 1.0 do begin
yy = gwf(0, ns, 0, q)
plot, q, (yy)^2, ytitle = "g(q)^2", xtitle = 'q (au)', /ylog, /xlog, xr=[min(q),max(q)], /xs, title = string(ns, '(f4.1)')
for l = 1, min([13, fix(ns)-1]), 1 do begin
oplot, q, gwf(0, ns, l, q)^2, linestyle = 5
end
for l = 0, min([13, fix(ns)-1]), 1 do begin
yy = gwf(0, ns, l, q)
plot, q, (yy)^2, ytitle = "g(q)^2", xtitle = 'q (au)', /ylog, /xlog, xr=[min(q),max(q)], /xs, title = string(ns, '(f4.1)')+string(l, '(i3)')
oplot, q, gwf(0, ns-0.5, l, q)^2, linestyle = 5
oplot, q, gwf(0, ns-0.4, l, q)^2,linestyle = 5
oplot, q, gwf(0, ns-0.3, l, q)^2, linestyle = 5
oplot, q, gwf(0, ns-0.2, l, q)^2, linestyle = 5
oplot, q, gwf(0, ns-0.1, l, q)^2, linestyle = 5
oplot, q, gwf(0, ns+0.5, l, q)^2, linestyle = 1
oplot, q, gwf(0, ns+0.4, l, q)^2, linestyle = 1
oplot, q, gwf(0, ns+0.3, l, q)^2, linestyle = 1
oplot, q, gwf(0, ns+0.2, l, q)^2, linestyle = 1
oplot, q, gwf(0, ns+0.1, l, q)^2, linestyle = 1
oplot, q, gwf(0, ns+0.01, l, q)^2, linestyle = 1, thick = 10
oplot, [2/!Pi/ns,2/!Pi/ns], [1e-30,1e30]
oplot, [2/!Pi/ns,2/!Pi/ns]*2, [1e-30,1e30], linestyle = 5
oplot, [2/!Pi/ns,2/!Pi/ns]*4, [1e-30,1e30], linestyle = 1
oplot, [2/!Pi/ns,2/!Pi/ns]*.5, [1e-30,1e30], linestyle = 5
oplot, [2/!Pi/ns,2/!Pi/ns]*.25, [1e-30,1e30], linestyle = 1
print, systime(1) - t, ' SECONDS'
end
end
device, /close_file
set_plot, 'x'
!p.multi = 0
!p.charsize = 1
end
pro testgwfl3
t = systime(1)
pmin = 1e-4
pmax = 1000.
npts = 10000
pstep = (alog(pmax) - alog(pmin))/(npts-1)
q = exp(alog(pmin) + pstep*dindgen(npts))
set_plot, 'ps'
device, file = 'wfs_new.eps', xsize = 28, xoffset=1, yoffset = 29, /landscape
!p.multi = 0
!p.charsize = 1.5
ns = 20.0
yy = gwfsq(0, ns, 0, q)
plot, q, yy, ytitle = "g(q)^2", xtitle = 'q (au)', /ylog, /xlog, xr=[min(q),max(q)], /xs, title = string(ns, '(f4.1)')
for ns = 3.0, 20.0, 1.0 do begin
yy = gwfsq(0, ns, 0, q)
oplot, q, yy, linestyle = 5
endfor
for ns = 3.0, 20.0, 1.0 do begin
yy = gwfsq(0, ns, 0, q)
plot, q, yy, ytitle = "g(q)^2", xtitle = 'q (au)', /ylog, /xlog, xr=[min(q),max(q)], /xs, title = string(ns, '(f4.1)')
for l = 0, min([13, fix(ns)-1]), 1 do begin
oplot, q, gwfsq(0, ns, l, q), linestyle = 5
end
for l = 0, min([13, fix(ns)-1]), 1 do begin
print, ns, l
yy = gwfsq(0, ns, l, q)
plot, q, yy, ytitle = "g(q)^2", xtitle = 'q (au)', /ylog, /xlog, xr=[min(q),max(q)], /xs, title = string(ns, '(f4.1)')+string(l, '(i3)')
oplot, q, gwfsq(0, ns-0.5, l, q), linestyle = 5
oplot, q, gwfsq(0, ns-0.4, l, q),linestyle = 5
oplot, q, gwfsq(0, ns-0.3, l, q), linestyle = 5
oplot, q, gwfsq(0, ns-0.2, l, q), linestyle = 5
oplot, q, gwfsq(0, ns-0.1, l, q), linestyle = 5
oplot, q, gwfsq(0, ns+0.5, l, q), linestyle = 1
oplot, q, gwfsq(0, ns+0.4, l, q), linestyle = 1
oplot, q, gwfsq(0, ns+0.3, l, q), linestyle = 1
oplot, q, gwfsq(0, ns+0.2, l, q), linestyle = 1
oplot, q, gwfsq(0, ns+0.1, l, q), linestyle = 1
oplot, q, gwfsq(0, ns+0.01, l, q), linestyle = 1, thick = 10
oplot, [2/!Pi/ns,2/!Pi/ns], [1e-30,1e30]
oplot, [2/!Pi/ns,2/!Pi/ns]*2, [1e-30,1e30], linestyle = 5
oplot, [2/!Pi/ns,2/!Pi/ns]*4, [1e-30,1e30], linestyle = 1
oplot, [2/!Pi/ns,2/!Pi/ns]*.5, [1e-30,1e30], linestyle = 5
oplot, [2/!Pi/ns,2/!Pi/ns]*.25, [1e-30,1e30], linestyle = 1
print, systime(1) - t, ' SECONDS'
end
end
device, /close_file
set_plot, 'x'
!p.multi = 0
!p.charsize = 1
end
pro testgwf2
t = systime(1)
q = (dindgen(1000))/10000.
window, 0, xsize = 1900
!p.multi = [0,5,1]
!p.charsize = 3
ns = 20.
plot, q, q*gwf(0, ns, 0, q), ytitle = "q*g(q)", xtitle = 'q (au)', title = '20s'
ns = 20.
plot, q, q*gwf(0, ns, 1, q), xtitle = 'q (au)', title = '20p'
ns = 25.
plot, q, q*gwf(0, ns, 0, q), xtitle = 'q (au)', title = '25s'
ns = 25.
plot, q, q*gwf(0, ns, 1, q), xtitle = 'q (au)', title = '25p';, xr=[0,1.0], /xs
ns = 30.
plot, q, q*gwf(0, ns, 1, q), xtitle = 'q (au)', title = '30p';, xr=[0,1.0], /xs
print, systime(1) - t, ' SECONDS'
!p.multi = 0
!p.charsize = 1
end
pro testgwf3
t = systime(1)
print, systime()
q = (dindgen(10))/10000. + 0.0495001
q2 = (dindgen(1000))/1000000. + 0.0495
window, 0, xsize = 1900
!p.multi = [0,2,1]
!p.charsize = 3
ns = 10.
y1 = q*gwf(0, ns, 0, q)
y1a = -q2*Fnl(1., 0, 10, 0, q2)
plot, q, y1, ytitle = "q*g(q)", xtitle = 'q (au)', title = '20s'
oplot, q, y1a, psym = 4
print, systime(1) - t, ' SECONDS'
y2 = q*gwf(0, ns, 1, q)
y2a = q2*Fnl(1., 0, 20, 1, q2)
plot, q, y2, xtitle = 'q (au)', title = '20p'
oplot, q2, y2a, psym = 4
print, systime(1) - t, ' SECONDS'
print, systime()
!p.multi = 0
!p.charsize = 1
end
pro testgwf4
t = systime(1)
q = (dindgen(200))/1000.
window, 0, xsize = 1900
!p.multi = [0,5,1]
!p.charsize = 3
plot, q, q*gwf(0, 15, 0, q), ytitle = "q*g(q)", xtitle = 'q (au)'
oplot, q, q*Fnl(1., 0, 15, 0, q), psym = 4
plot, q, q*gwf(0, 20, 0, q)
oplot, q, -q*Fnl(1., 0, 20, 0, q), psym = 4
plot, q, q*gwf(0, 25, 0, q)
oplot, q, q*Fnl(1., 0, 25, 0, q), psym = 4
plot, q, q*gwf(0, 30, 0, q)
oplot, q, -q*Fnl(1., 0, 30, 0, q), psym = 4
plot, q, q*gwf(0, 50, 0, q)
oplot, q, q*Fnl(1., 0, 50, 0, q), psym = 4
print, systime(1) - t, ' SECONDS'
!p.multi = 0
!p.charsize = 1
end
pro testgwf5
t = systime(1)
q = (dindgen(1000))/2000.
window, 0, xsize = 1900
!p.multi = [0,1,1]
!p.charsize = 3
plot, q, q*gwf(0, 9, 0, q), yr = [-4,4]
oplot, q, q*Fnl(1., 0, 9, 0, q), psym = 4
print, systime(1) - t, ' SECONDS'
!p.multi = 0
!p.charsize = 1
end
pro testgwf6
t = systime(1)
q = (dindgen(500))/5000.
window, 0, xsize = 1900
!p.multi = [0,1,1]
!p.charsize = 3
plot, q, q*Fnl(1., 0, 30, 0, q)
;oplot, q, q*Fnl(1., 0, 30, 0, q), linestyle = 1
oplot, q, -q*gwf(0, 30., 0, q), linestyle = 5
print, systime(1) - t, ' SECONDS'
!p.multi = 0
!p.charsize = 1
end