Skip to content

Commit e07f255

Browse files
authored
Update movie of the laser spectrum for staging_injector (#271)
1 parent b01abe8 commit e07f255

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

simulation_data/staging_injector/templates/analyze_simulation.py

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,6 @@ def analyze_simulation():
5050
nitrogen_density_function = re.findall(r'nitrogen1\.density_function\(x,y,z\) = (.+)', text)[0]
5151
plateau_length = eval( re.findall(r'my_constants\.plateau_length = (.+)', text)[0] )
5252

53-
5453
# Compute red/blue shift: wavelength such that 13.5%/86.5% of the spectrum energy is below
5554
S, info = ts.get_laser_spectral_intensity(
5655
iteration=ts.iterations[-1], pol=pol)
@@ -190,11 +189,11 @@ def visualize_iteration(iteration):
190189

191190
# Plot of the laser spectrum
192191
fig.add_subplot(gs[3,1])
193-
S, info = ts.get_spectrum(iteration=iteration, pol=pol)
194-
lambd = 2*np.pi*c/info.omega[1:]
192+
S, info = ts.get_laser_spectral_intensity(iteration=iteration, pol=pol)
193+
lambd = 2*np.pi/info.k[1:]
195194
plt.xlabel(r'Wavelength [$\mu m$]')
196-
plt.title('Laser spectrum')
197-
plt.plot( 1.e6*lambd, 1e3*S[1:], color='r' )
195+
plt.title('Laser spectrum [$J/\mu m$]')
196+
plt.plot( 1.e6*lambd, 1e-6*S[1:]/lambd**2, color='r' )
198197
plt.xlim(0.5,1.2)
199198

200199
plt.subplots_adjust(hspace=0.5)

0 commit comments

Comments
 (0)