diff options
author | 2020-01-09 17:46:38 +0100 | |
---|---|---|
committer | 2020-01-09 17:53:56 +0100 | |
commit | a8463214e71b18d08763528cd546e92fe7de848d (patch) | |
tree | 29dd777b84972c98f1273204375541d7f5b4da0a /Examples/Modules/laser_injection_from_file/analysis.py | |
parent | f0c3bec71de32a5dd7914da4236e2e2e6a19c5a4 (diff) | |
download | WarpX-a8463214e71b18d08763528cd546e92fe7de848d.tar.gz WarpX-a8463214e71b18d08763528cd546e92fe7de848d.tar.zst WarpX-a8463214e71b18d08763528cd546e92fe7de848d.zip |
Added comments
Diffstat (limited to 'Examples/Modules/laser_injection_from_file/analysis.py')
-rwxr-xr-x | Examples/Modules/laser_injection_from_file/analysis.py | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/Examples/Modules/laser_injection_from_file/analysis.py b/Examples/Modules/laser_injection_from_file/analysis.py index c677014c3..b8d0899f0 100755 --- a/Examples/Modules/laser_injection_from_file/analysis.py +++ b/Examples/Modules/laser_injection_from_file/analysis.py @@ -44,6 +44,10 @@ tcoords = np.linspace(t_l, t_r, t_points) xcoords = np.linspace(x_l, x_r, x_points) def gauss(T,X,Y,opt): + """Compute the electric field for a Gaussian laser pulse. + This is used to write the binary input file. + """ + k0 = 2.0*np.pi/wavelength inv_tau2 = 1./tt/tt osc_phase = k0*c*(T-t_c) @@ -64,6 +68,8 @@ def gauss(T,X,Y,opt): # Function for the envelope def gauss_env(T,XX,ZZ): + '''Function to compute the theory for the envelope + ''' X = np.cos(rot_angle)*XX + np.sin(rot_angle)*ZZ Z = -np.sin(rot_angle)*XX + np.cos(rot_angle)*ZZ |