-
Notifications
You must be signed in to change notification settings - Fork 4
/
eldest_3d.py
executable file
·585 lines (451 loc) · 21 KB
/
eldest_3d.py
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
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
#!/usr/bin/python
##########################################################################
# ELDEST #
# Investigating Electronic Decay Processes with Streaking #
##########################################################################
# Purpose: #
# - A program to simulate the streaking process of electronic #
# decay processes. #
# #
##########################################################################
# written by: Elke Fasshauer May 2018 #
##########################################################################
import scipy
import scipy.integrate as integrate
import numpy as np
import sciconv
import complex_integration as ci
import res_anal_integ as aires
import dir_anal_integ as aidir
import in_out
#-------------------------------------------------------------------------
# Input parameters
rdg_au = 0.30 # transition dipole moment into the resonant state
cdg_au = 0.5 # transition dipole moment into any continuum state
# parameters of the investigated system
# the ground state energy is being defined as Eg = 0
Er_eV = 150.0 # resonance energy in eV
E_kin_eV = 2.0 # kinetic energy of secondary electron
E_fin_eV = 12.0 # final state energy in eV
#Gamma_eV = 0.5 # electronic decay width of the resonant state
tau_s = 400.0E-18 # lifetime
# laser parameters
Omega_min_eV = 130.0 # scanning XUV pulse from Omega_min-eV to
Omega_max_eV = 170.0 #
TX_s = 250.0E-18 # duration of the XUV pulse in seconds
n_X = 3
I_X = 5.0E20 # intensity of the XUV pulse in W/cm^2
#A0X = 1.0 # amplitude of the XUV pulse
omega_eV = 1.0 # IR pulse
TL_s = 1.0E-10 # duration of the IR streaking pulse
#print TL_s
n_L = 4
I_L = 1.0E12 # intensity of the IR pulse in W/cm^2
#A0L = 1.0 # amplitude of the IR pulse
delta_t_s = 6.0E-13 # time difference between the maxima of the two pulses
#print delta_t_s
phi = 0
q = 5
# parameters of the simulation
tmax_s = 2.0E-15 # simulate until time tmax in seconds
timestep_s = 100E-18 # evaluate expression every timestep_s seconds
Omega_step_eV = 2.0 # energy difference between different evaluated Omegas
#-------------------------------------------------------------------------
#-------------------------------------------------------------------------
# Definitions of reusable functions
#-------------------------------------------------------------------------
#-------------------------------------------------------------------------
# Convert input parameters to atomic units
#-------------------------------------------------------------------------
Er_au = sciconv.ev_to_hartree(Er_eV)
E_kin_au = sciconv.ev_to_hartree(E_kin_eV)
E_fin_au = sciconv.ev_to_hartree(E_fin_eV)
#Gamma_au = sciconv.ev_to_hartree(Gamma_eV)
tau_au = sciconv.second_to_atu(tau_s)
Gamma_au = 1. / tau_au
# laser parameters
Omega_min_au = sciconv.ev_to_hartree(Omega_min_eV)
Omega_max_au = sciconv.ev_to_hartree(Omega_max_eV)
TX_au = sciconv.second_to_atu(TX_s)
#TX_au = sciconv.n_X * 2 * np.pi / Omega_min_au
I_X_au = sciconv.Wcm2_to_aiu(I_X)
print 'I_X = ', I_X
print 'I_X_au = ', I_X_au
E0X = np.sqrt(I_X_au)
A0X = E0X / Omega_min_au # this could be wrong and might have
# to be evaluated for each Omega
omega_au = sciconv.ev_to_hartree(omega_eV)
TL_au = sciconv.second_to_atu(TL_s)
TL_au = n_L * 2 * np.pi / omega_au
print TL_au/2
I_L_au = sciconv.Wcm2_to_aiu(I_L)
print 'I_L = ', I_L
print 'I_L_au = ', I_L_au
E0L = np.sqrt(I_L_au)
print 'E0L', E0L
A0L = E0L / omega_au
print 'A0L = ', A0L
delta_t_au = sciconv.second_to_atu(delta_t_s)
print delta_t_au
# parameters of the simulation
tmax_au = sciconv.second_to_atu(tmax_s)
timestep_au = sciconv.second_to_atu(timestep_s)
Omega_step_au = sciconv.ev_to_hartree(Omega_step_eV)
p_au = np.sqrt(2*E_kin_au)
VEr_au = np.sqrt(Gamma_au/ (2*np.pi))
print 'VEr_au = ', VEr_au
#test q=1
cdg_au = rdg_au / ( q * np.pi * VEr_au)
print 'cdg_au = ', cdg_au
#-------------------------------------------------------------------------
in_out.check_input(Er_au, E_kin_au, E_fin_au, Gamma_au,
Omega_min_au, Omega_max_au, TX_au, n_X, A0X,
omega_au, TL_au, A0L, delta_t_au,
tmax_au, timestep_au, Omega_step_au)
#-------------------------------------------------------------------------
# open outputfile
outfile = open("eldest.out", mode='w')
pure_out = open('full.dat', mode='w')
#-------------------------------------------------------------------------
# physical defintions of functions
# XUV pulse
f_t = lambda tau: 1./4 * ( np.exp(2j * np.pi * (t_au - tau) / TX_au)
+ 2
+ np.exp(-2j * np.pi * (t_au - tau) /TX_au) )
fp_t = lambda tau: np.pi/(2j*TX_au) * ( - np.exp(2j*np.pi* (t_au - tau)/TX_au)
+ np.exp(-2j*np.pi* (t_au - tau) /TX_au) )
FX_t = lambda tau: - A0X * np.cos(Omega_au * (t_au - tau)) * fp_t(tau) + A0X * Omega_au * np.sin(Omega_au * (t_au - tau)) * f_t(tau)
#Variante mit TX
f_TX = lambda tau: 1./4 * ( np.exp(2j * np.pi * (TX_au/2 - tau) / TX_au)
+ 2
+ np.exp(-2j * np.pi * (TX_au/2 - tau) /TX_au) )
fp_TX = lambda tau: np.pi/(2j*TX_au) * ( - np.exp(2j*np.pi* (TX_au/2 - tau)/TX_au)
+ np.exp(-2j*np.pi* (TX_au/2 - tau) /TX_au) )
FX_TX = lambda tau: - A0X * np.cos(Omega_au * (TX_au/2 - tau)) * fp_TX(tau) + A0X * Omega_au * np.sin(Omega_au * (TX_au/2 - tau)) * f_TX(tau)
# functions for the norm
f_t1 = lambda t1: 1./4 * ( np.exp(2j * np.pi * (t1) / TX_au)
+ 2
+ np.exp(-2j * np.pi * (t1) /TX_au) )
fp_t1 = lambda t1: np.pi/(2j*TX_au) * ( - np.exp(2j*np.pi* (t1)/TX_au)
+ np.exp(-2j*np.pi* (t1) /TX_au) )
FX_t1 = lambda t1: - A0X * np.cos(Omega_au * (t1)) * fp_t(t1) + A0X * Omega_au * np.sin(Omega_au * (t1)) * f_t(t1)
# IR pulse
A_IR = lambda t3: A0L * np.sin(np.pi * (t3 - delta_t_au + TL_au/2) / TL_au)**2 \
* np.cos(omega_au * t3 + phi)
integ_IR = lambda t3: (p_au + A_IR(t3))**2
#-------------------------------------------------------------------------
# technical defintions of functions
# probiere Umschreiben der Integrationsvariable
fun_t_1 = lambda tau: np.exp(-tau * res) * FX_t(tau)
fun_t_2 = lambda tau: np.exp(complex(0,E_kin_au) * tau) * FX_t(tau)
fun_TX2_1 = lambda tau: np.exp(-tau * res) * FX_TX(tau)
fun_TX2_2 = lambda tau: np.exp(complex(0,E_kin_au) * tau) * FX_TX(tau)
#norm
fun_norm_1 = lambda t1: FX_t1(t1)**2
fun_norm_2 = lambda t1: FX_t1(t1)**2 * t1
#-------------------------------------------------------------------------
# initialization
t_au = -TX_au/2
print 'TX/2 = ', sciconv.atu_to_second(TX_au/2)
outfile.write(' '.join(('TX/2 = ',
str(sciconv.atu_to_second(TX_au/2)), 's', '\n')))
outfile.write(' '.join(('TL/2 = ',
str(sciconv.atu_to_second(TL_au/2)), 's', '\n')))
outfile.write(' '.join(('delta_t_au - TL_au/2 = ',
str(sciconv.atu_to_second(delta_t_au - TL_au/2)), 's', '\n')))
outfile.write(' '.join(('delta_t_au + TL_au/2 = ',
str(sciconv.atu_to_second(delta_t_au + TL_au/2)), 's', '\n')))
outfile.write(' '.join(('tmax = ',
str(sciconv.atu_to_second(tmax_au)), 's', '\n')))
#-------------------------------------------------------------------------
# constants / prefactors
res_kin = complex(Gamma_au/2,Er_au + E_kin_au)
res = complex(Gamma_au/2,Er_au)
print 'res = ', res
prefac_res = - VEr_au * rdg_au
prefac_indir = 1j * np.pi * VEr_au**2 * cdg_au
#prefac_indir = 0
print 'prefac_res', prefac_res
print 'prefac_indir', prefac_indir
# predefined factors for the norm
# assuming that transition dipole moments are real
sum_gs = rdg_au**2 + cdg_au**2
norm_pref1 = 2 * np.pi**2 * VEr_au**3 * cdg_au * rdg_au
print 'sum_gs = ', sum_gs
print 'norm_pref1 = ', norm_pref1
#-------------------------------------------------------------------------
# constant integrals, they are independent of both Omega and t
integral_6_12 = aires.integral_6_12(Vr=VEr_au, rdg=rdg_au, E_kin=E_kin_au,
TX=TX_au, TL=TL_au, delta=delta_t_au,
res=res, res_kin=res_kin)
res_integral_6_12 = integral_6_12 * prefac_res
indir_integral_6_12 = integral_6_12 * prefac_indir
integral_7_13 = aires.integral_7_13(Vr=VEr_au, rdg=rdg_au, E_kin=E_kin_au,
TX=TX_au, TL=TL_au, delta=delta_t_au,
res=res, res_kin=res_kin)
res_integral_7_13 = integral_7_13 * prefac_res
indir_integral_7_13 = integral_7_13 * prefac_indir
integral_14 = aires.integral_14(Vr=VEr_au, rdg=rdg_au, E_kin=E_kin_au,
TX=TX_au, TL=TL_au, delta=delta_t_au,
res=res, res_kin=res_kin)
res_integral_14 = integral_14 * prefac_res
indir_integral_14 = integral_14 * prefac_indir
integral_15 = aires.integral_15(Vr=VEr_au, rdg=rdg_au, E_kin=E_kin_au,
TX=TX_au, TL=TL_au, delta=delta_t_au,
res=res, res_kin=res_kin)
res_integral_15 = integral_15 * prefac_res
indir_integral_15 = integral_15 * prefac_indir
integral_16 = aires.integral_16(Vr=VEr_au, rdg=rdg_au, E_kin=E_kin_au,
TX=TX_au, TL=TL_au, delta=delta_t_au,
res=res, res_kin=res_kin)
res_integral_16 = integral_16 * prefac_res
indir_integral_16 = integral_16 * prefac_indir
# direct ionization
dir_integral_5_8 = aidir.integral_5_8(cdg=cdg_au, E_kin=E_kin_au,
TX=TX_au, TL=TL_au, delta=delta_t_au, t=t_au)
dir_integral_9 = aidir.integral_9(cdg=cdg_au, E_kin=E_kin_au,
TX=TX_au, TL=TL_au, delta=delta_t_au)
# sums of constant terms
res_const_after = (res_integral_6_12 + res_integral_7_13 + res_integral_14
+ res_integral_15)
print 'res_const_after = ', res_const_after
indir_const_after = (indir_integral_6_12 + indir_integral_7_13 + indir_integral_14
+ indir_integral_15)
print 'indir_const_after = ', indir_const_after
#-------------------------------------------------------------------------
while ((t_au <= TX_au/2) and (t_au <= tmax_au)):
#-------------------------------------------------------------------------
outfile.write('during the first pulse \n')
outlines = []
Omega_au = Omega_min_au
norm_pref = sum_gs - norm_pref1 * t_au
print 't_au = ', t_au
while (Omega_au < Omega_max_au):
# integral 1
# other integration variable
I1 = ci.complex_quadrature(fun_t_1, (t_au + TX_au/2), 0)
I2 = ci.complex_quadrature(fun_t_2, (t_au + TX_au/2), 0)
res_J = prefac_res / res_kin * (I1[0] - I2[0])
indir_J = prefac_indir / res_kin * (I1[0] - I2[0])
dir_J = 1j * cdg_au * I2[0]
J = (0
+ res_J
+ indir_J
# + dir_J
)
#print 'J = ', J
square = np.absolute(J)**2
norm_I1 = ci.complex_quadrature(fun_norm_1, -TX_au/2, t_au)
norm_I2 = ci.complex_quadrature(fun_norm_2, -TX_au/2, t_au)
norm = norm_pref * norm_I1[0] + norm_pref1 * norm_I2[0]
# print 'I1', I1[0]
# print 'I2', I2[0]
# print 'norm_I1', norm_I1[0]
# print 'norm_I2', norm_I2[0]
# print 'prefac_res', prefac_res
# print 'prefac_indir', prefac_indir
# print 'res_kin', res_kin
# print 'res_J = ', res_J
# print 'indir_J = ', indir_J
# print 'dir_J = ', dir_J
# print 'square during', square
# print 'norm during', norm
#square = square / norm
string = in_out.prep_output(square, Omega_au, t_au)
outlines.append(string)
Omega_au = Omega_au + Omega_step_au
in_out.doout_1f(pure_out, outlines)
t_au = t_au + timestep_au
norm_pref = sum_gs - norm_pref1 * TX_au
#-------------------------------------------------------------------------
while (t_au >= TX_au/2 and t_au <= (delta_t_au - TL_au/2) and (t_au <= tmax_au)):
#-------------------------------------------------------------------------
outfile.write('between the pulses \n')
Omega_au = Omega_min_au
outlines = []
norm_Omega_indep = (sum_gs - t_au * norm_pref1) * (t_au - TX_au/2) \
+ norm_pref1 / 2 * (t_au**2 - (TX_au/2)**2)
# integrals 3 and 4 are independent of omega, they are therefore
# evaluated before integral 2 and especially outside the loop
#integral 3
integral_3 = aires.integral_3(VEr_au, rdg_au, E_kin_au, TX_au, res, res_kin, t_au)
res_integral_3 = integral_3 * prefac_res
indir_integral_3 = integral_3 * prefac_indir
dir_integral_3 = aidir.integral_3(cdg=cdg_au, E_kin=E_kin_au, TX=TX_au, t=t_au)
K = (0
+ res_integral_3
+ indir_integral_3
# + dir_integral_3
)
#integral 4
integral_4 = aires.integral_4(VEr_au, rdg_au, E_kin_au, TX_au, res, res_kin, t_au)
res_integral_4 = integral_4 * prefac_res
indir_integral_4 = integral_4 * prefac_indir
K = (K
+ res_integral_4
+ indir_integral_4
)
while (Omega_au < Omega_max_au):
# integral 2
# other integration variable
I1 = ci.complex_quadrature(fun_TX2_1, (TX_au/2 + TX_au/2), 0)
I2 = ci.complex_quadrature(fun_TX2_2, (TX_au/2 + TX_au/2), 0)
res_J = prefac_res / res_kin * (I1[0] - I2[0])
indir_J = prefac_indir / res_kin * (I1[0] - I2[0])
dir_J = 1j * cdg_au * I2[0]
J = (0
+ res_J
+ indir_J
# + dir_J
)
L = K + J
square = np.absolute(L)**2
norm_I1 = ci.complex_quadrature(fun_norm_1, -TX_au/2, TX_au)
norm_I2 = ci.complex_quadrature(fun_norm_2, -TX_au/2, TX_au)
norm = norm_pref * norm_I1[0] + norm_pref1 * norm_I2[0] + norm_Omega_indep
#print 'square after', square
#print 'norm after', norm
#square = square / norm
string = in_out.prep_output(square, Omega_au, t_au)
outlines.append(string)
Omega_au = Omega_au + Omega_step_au
in_out.doout_1f(pure_out,outlines)
t_au = t_au + timestep_au
#-------------------------------------------------------------------------
# during the ir pulse
while (t_au >= (delta_t_au - TL_au/2)
and t_au <= (delta_t_au + TL_au/2)
and (t_au <= tmax_au)):
#-------------------------------------------------------------------------
outfile.write('during the second pulse \n')
# integrals, that are independent of omega
integral_8 = aires.integral_8(Vr=VEr_au, rdg=rdg_au, E_kin=E_kin_au,
TX=TX_au, TL=TL_au, delta=delta_t_au,
res=res, res_kin=res_kin, t=t_au)
res_integral_8 = integral_8 * prefac_res
indir_integral_8 = integral_8 * prefac_indir
integral_9 = aires.integral_9(Vr=VEr_au, rdg=rdg_au, E_kin=E_kin_au,
TX=TX_au, TL=TL_au, delta=delta_t_au,
res=res, res_kin=res_kin, t=t_au)
res_integral_9 = integral_9 * prefac_res
indir_integral_9 = integral_9 * prefac_indir
integral_10 = aires.integral_10(Vr=VEr_au, rdg=rdg_au, E_kin=E_kin_au,
TX=TX_au, TL=TL_au, delta=delta_t_au,
res=res, res_kin=res_kin, t=t_au)
res_integral_10 = integral_10 * prefac_res
indir_integral_10 = integral_10 * prefac_indir
dir_integral_6 = aidir.integral_6(cdg=cdg_au, E_kin=E_kin_au, TX=TX_au, TL=TL_au,
delta=delta_t_au, t=t_au)
I_IR = integrate.quad(integ_IR, delta_t_au - TL_au/2, t_au)
res_I10 = res_integral_10 * I_IR[0]
indir_I10 = indir_integral_10 * I_IR[0]
dir_I6 = dir_integral_6 * I_IR[0]
K = (0
+ res_integral_8
+ res_integral_9
+ res_I10 # ein Teil des Problems
+ res_integral_7_13
+ indir_integral_8
+ indir_integral_9
+ indir_I10
+ indir_integral_7_13
# + dir_integral_5_8
# + dir_I6
)
Omega_au = Omega_min_au
outlines = []
while (Omega_au < Omega_max_au):
# integral 5 = integral 2
# other integration variable
I1 = ci.complex_quadrature(fun_TX2_1, (TX_au/2 + TX_au/2), 0)
I2 = ci.complex_quadrature(fun_TX2_2, (TX_au/2 + TX_au/2), 0)
res_J = prefac_res / res_kin * (I1[0] - I2[0])
indir_J = prefac_indir / res_kin * (I1[0] - I2[0])
dir_J = 1j * cdg_au * I2[0]
J = res_J + indir_J# + dir_J
L = J + K
string = in_out.prep_output(L, Omega_au, t_au)
outlines.append(string)
Omega_au = Omega_au + Omega_step_au
in_out.doout_1f(pure_out,outlines)
t_au = t_au + timestep_au
#-------------------------------------------------------------------------
# after the second pulse
while (t_au >= (delta_t_au + TL_au/2)
and (t_au <= tmax_au)):
#-------------------------------------------------------------------------
outfile.write('after the second pulse')
# omega independent integrals
#integral 16
I_IR = integrate.quad(integ_IR, delta_t_au - TL_au/2, delta_t_au + TL_au/2)
res_integral_16_p = res_integral_16 * I_IR[0]
indir_integral_16_p = indir_integral_16 * I_IR[0]
#integral 17
integral_17 = aires.integral_17(Vr=VEr_au, rdg=rdg_au, E_kin=E_kin_au,
TX=TX_au, TL=TL_au, delta=delta_t_au,
res=res, res_kin=res_kin, t=t_au)
res_integral_17 = integral_17 * prefac_res
indir_integral_17 = integral_17 * prefac_indir
#integral 18
integral_18 = aires.integral_18(Vr=VEr_au, rdg=rdg_au, E_kin=E_kin_au,
TX=TX_au, TL=TL_au, delta=delta_t_au,
res=res, res_kin=res_kin, t=t_au)
res_integral_18 = integral_18 * prefac_res
indir_integral_18 = integral_18 * prefac_indir
#integral 19
integral_19 = aires.integral_19(Vr=VEr_au, rdg=rdg_au, E_kin=E_kin_au,
TX=TX_au, TL=TL_au, delta=delta_t_au,
res=res, res_kin=res_kin, t=t_au)
res_integral_19 = integral_19 * prefac_res
indir_integral_19 = integral_19 * prefac_indir
res_integral_19_p = res_integral_19 * I_IR[0]
indir_integral_19_p = indir_integral_19 * I_IR[0]
#integral 20
integral_20 = aires.integral_20(Vr=VEr_au, rdg=rdg_au, E_kin=E_kin_au,
TX=TX_au, TL=TL_au, delta=delta_t_au,
res=res, res_kin=res_kin, t=t_au)
res_integral_20 = integral_20 * prefac_res
indir_integral_20 = integral_20 * prefac_indir
res_integral_20_p = res_integral_20 * I_IR[0]
indir_integral_20_p = indir_integral_20 * I_IR[0]
dir_integral_9_p = dir_integral_9 * I_IR[0]
dir_integral_10 = aidir.integral_10(cdg=cdg_au, E_kin=E_kin_au, TX=TX_au, TL=TL_au,
delta=delta_t_au, t=t_au)
dir_integral_10_p = dir_integral_10 * I_IR[0]
#print 'res_integral_16_p', res_integral_16_p
K = ( 0
+ res_integral_16_p # Teil des Problems
+ res_integral_17
+ res_integral_18
#+ res_integral_19_p # ein Teil des Problems, auch Zacken
+ res_integral_20_p # ein Teil des Problems
+ res_const_after
#+ indir_integral_16_p
#+ indir_integral_17
#+ indir_integral_18
#+ indir_integral_19_p
#+ indir_integral_20_p
#+ indir_const_after
#+ dir_integral_5_8
#+ dir_integral_9_p
#+ dir_integral_10_p
)
Omega_au = Omega_min_au
outlines = []
while (Omega_au < Omega_max_au):
# integral 11 = integral 5 = integral 2
# other integration variable
I1 = ci.complex_quadrature(fun_TX2_1, (TX_au/2 + TX_au/2), 0)
I2 = ci.complex_quadrature(fun_TX2_2, (TX_au/2 + TX_au/2), 0)
res_J = prefac_res / res_kin * (I1[0] - I2[0])
indir_J = prefac_indir / res_kin * (I1[0] - I2[0])
dir_J = 1j * cdg_au * I2[0]
J = res_J + indir_J# + dir_J
L = J + K
string = in_out.prep_output(L, Omega_au, t_au)
outlines.append(string)
Omega_au = Omega_au + Omega_step_au
in_out.doout_1f(pure_out,outlines)
t_au = t_au + timestep_au
outfile.close
pure_out.close