Skip to content

Commit

Permalink
fix tutorial 4 after changes in laser v3.4
Browse files Browse the repository at this point in the history
  • Loading branch information
mccoys committed Dec 5, 2018
1 parent 59a4436 commit e34a030
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions _extra/solve_rate_eqs.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,9 @@ def solve_rate_eqs_( namelist ):
# laser
aL = max( namelist.Laser[0].space_envelope[0], namelist.Laser[0].space_envelope[1] )
Eau = aL * Ec_to_au
delay = namelist.Laser[0].delay_phase[1] / namelist.Laser[0].omega
laser_time_envelope = namelist.Laser[0].time_envelope

# PIC time-teps
dt = namelist.Main.timestep
nt = int(namelist.Main.simulation_time / dt)
Expand Down Expand Up @@ -51,9 +52,9 @@ def solve_rate_eqs_( namelist ):

# Solving the rate equations numerically
for it in range(1,nt):
t[it] = it*dt
E[it] = aL*sin(t[it]) * laser_time_envelope(t[it])
Env[it] = laser_time_envelope(t[it])
t[it] = it*dt+delay
E[it] = aL*sin(t[it]) * laser_time_envelope(t[it]-delay)
Env[it] = laser_time_envelope(t[it]-delay)

# neutral atom
delta = gamma[0]/( abs(E[it])*Ec_to_au)
Expand Down

0 comments on commit e34a030

Please sign in to comment.