@@ -67,10 +67,12 @@ function hhg_example()
6767
6868 # d will be a vector of scalars; by limiting the "memory" of the
6969 # 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);
7173
7274 # 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) ));
7476 d2x = [e[1 ] for e in d2]
7577 d2y = [e[2 ] for e in d2]
7678 d2z = [e[3 ] for e in d2]
@@ -80,6 +82,7 @@ function hhg_example()
8082 q = fftshift (fftfreq (length (t), ndt))
8183 qsel = ind (q,0 ): ind (q,100 )
8284 D = spectrum (d)
85+ D_all = spectrum (d_all)
8386 D2 = spectrum (d2)
8487 cutoff = 3.17 austrip (ponderomotive_potential (F)) + Iₚ
8588
@@ -98,13 +101,15 @@ function hhg_example()
98101 plot (tplot, d2x, " --" )
99102 plot (tplot, d2y, " --" )
100103 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 )
102106 ylabel (L "\l angle\m athbf{r}\r angle(t)" )
103107 end
104108 csubplot (313 ) do
105109 semilogy (q[qsel], abs2 .(D[qsel]))
106110 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." ])
108113 axvline (cutoff/ photon_energy (F), linestyle= " :" , color= " black" )
109114 xlabel (L " Harmonic order of 800 nm [$q$]" )
110115 ylabel (L " |\m athbf{r}(q)|^2" )
0 commit comments