@@ -67,10 +67,12 @@ function hhg_example()
67
67
68
68
# d will be a vector of scalars; by limiting the "memory" of the
69
69
# integrals, we can include only the short trajectory.
70
- d = induced_dipole (Iₚ, F, ndt, memory= floor (Int, 0.65 ndt));
70
+ d = induced_dipole (Iₚ, F, ndt, window= flat_window (floor (Int, 0.65 ndt)));
71
+ # d_all includes all trajectories.
72
+ d_all = induced_dipole (Iₚ, F, ndt);
71
73
72
74
# d2 will be a vector of 3d vectors
73
- d2 = induced_dipole (Iₚ, F2, ndt, memory = floor (Int, 0.65 ndt));
75
+ d2 = induced_dipole (Iₚ, F2, ndt, window = flat_window ( floor (Int, 0.65 ndt) ));
74
76
d2x = [e[1 ] for e in d2]
75
77
d2y = [e[2 ] for e in d2]
76
78
d2z = [e[3 ] for e in d2]
@@ -80,6 +82,7 @@ function hhg_example()
80
82
q = fftshift (fftfreq (length (t), ndt))
81
83
qsel = ind (q,0 ): ind (q,100 )
82
84
D = spectrum (d)
85
+ D_all = spectrum (d_all)
83
86
D2 = spectrum (d2)
84
87
cutoff = 3.17 austrip (ponderomotive_potential (F)) + Iₚ
85
88
@@ -98,13 +101,15 @@ function hhg_example()
98
101
plot (tplot, d2x, " --" )
99
102
plot (tplot, d2y, " --" )
100
103
plot (tplot, d2z, " --" )
101
- legend ([" 1d" , " 3d x" , " 3d y" , " 3d z" ])
104
+ plot (tplot, d_all, " :" )
105
+ legend ([" 1d" , " 3d x" , " 3d y" , " 3d z" , " 1d all traj." ], loc= 1 )
102
106
ylabel (L "\l angle\m athbf{r}\r angle(t)" )
103
107
end
104
108
csubplot (313 ) do
105
109
semilogy (q[qsel], abs2 .(D[qsel]))
106
110
semilogy (q[qsel], abs2 .(D2[qsel,:]), " --" )
107
- legend ([" 1d" , " 3d x" , " 3d y" , " 3d z" ])
111
+ semilogy (q[qsel], abs2 .(D_all[qsel]), " :" )
112
+ legend ([" 1d" , " 3d x" , " 3d y" , " 3d z" , " 1d all traj." ])
108
113
axvline (cutoff/ photon_energy (F), linestyle= " :" , color= " black" )
109
114
xlabel (L " Harmonic order of 800 nm [$q$]" )
110
115
ylabel (L " |\m athbf{r}(q)|^2" )
0 commit comments