# Femtosecond Pulse Visualization # Shuvan Prashant Turaga # 2 Oct 2016 # Import Packages import numpy as np from matplotlib import pyplot as plt # Initialize the variables t = np.arange(-60e-15,60e-15,0.1e-15); # Time Array tp = 20e-15; # Pulse width(fs) c0= 299492758; # Speed of Light in m/s lambda0 = 800e-9; # Wavelength w = 2*np.pi*c0/lambda0; # Angular Frequency(rad/s) A=1; # Calculate the Electric Fields E1= A*np.exp(-t**2/tp**2); # Electric Field Envelope E2= E1*np.exp(-1j*w*t); # Electric Field # Plot the pulse plt.plot(t,E1,'r-',t,E2,'b-'); plt.xlabel('Time(fs)') plt.ylabel('Intensity') plt.title('Femtosecond Pulse')