def laser(t):
     """
     The strength of the laser field.
     Always add an envelop to the laser field to avoid all sorts of artifacts.
     We use a sin**2 envelope, which resembles the Blackman filter
     """
     # laser = 2*np.sin(omega_laser * t)
     laser = np.sin(omega_laser * t)
     for freq, dat in zip(omegas, data):
         laser += dat * np.sin(freq * t)
     laser *= F * np.sin(np.pi * t / t_final)**2
     return laser
 def abs_boundary(x):
     """
     Absorbing boundary similar to the Blackman filter
     """
     return np.sin(0.5 * np.pi * (x + x_amplitude) /
                   x_amplitude)**(0.05 * dt)