Commit 53530061 authored by Mathieu RASSON's avatar Mathieu RASSON

Multi script

parent ef9863bc
......@@ -112,11 +112,11 @@ print("End of solving")
E_max = 1/(c*mu) * np.array([np.amax(np.abs(crank.E_matrix[i,:,:])**2) for i in range(crank.n_z)])
plt.figure()
plt.plot(E_max)
plt.xlabel("Propagation index")
plt.ylabel("Intensity ($W \cdot m^{-2}$)")
plt.savefig("FCN_check_E.png", dpi=300)
fig, ax = plt.subplots()
ax.plot(E_max)
ax.set_xlabel("Propagation index")
ax.set_ylabel("Intensity ($W \cdot m^{-2}$)")
fig.savefig("FCN_check_E.png", dpi=300)
print("Check plot saved as: FCN_check_E.png")
......@@ -170,23 +170,23 @@ while not end:
r_max = float(input())
# Plot
plt.figure()
plt.plot(np.real(crank.r_pts), 1/(c*mu) * np.abs(crank.E_matrix[z_plot, :, t_plot])**2)
plt.xlim(r_min, r_max)
plt.xlabel("Radius (m)")
plt.ylabel("Intensity ($W \cdot m^{-2}$)")
plt.savefig(save_name + ".png", dpi=300)
fig, ax = plt.subplots()
ax.plot(np.real(crank.r_pts), 1/(c*mu) * np.abs(crank.E_matrix[z_plot, :, t_plot])**2)
ax.set_xlim(r_min, r_max)
ax.set_xlabel("Radius (m)")
ax.set_ylabel("Intensity ($W \cdot m^{-2}$)")
fig.savefig(save_name + ".png", dpi=300)
print("Radial plot saved as: " + save_name + ".png")
else:
# Plot
plt.figure()
plt.plot(np.real(crank.r_pts), 1/(c*mu) * np.abs(crank.E_matrix[z_plot, :, t_plot])**2)
plt.xlabel("Radius (m)")
plt.ylabel("Intensity ($W \cdot m^{-2}$)")
plt.savefig(save_name + ".png", dpi=300)
fig, ax = plt.subplots()
ax.plot(np.real(crank.r_pts), 1/(c*mu) * np.abs(crank.E_matrix[z_plot, :, t_plot])**2)
ax.set_xlabel("Radius (m)")
ax.set_ylabel("Intensity ($W \cdot m^{-2}$)")
fig.savefig(save_name + ".png", dpi=300)
print("Radial plot saved as: " + save_name + ".png")
......@@ -216,23 +216,23 @@ while not end:
t_max = float(input())
# Plot
plt.figure()
plt.plot(np.real(crank.t_pts), 1/(c*mu) * np.abs(crank.E_matrix[z_plot, r_plot, :])**2)
plt.xlim(t_min, t_max)
plt.xlabel("Time (s)")
plt.ylabel("Intensity ($W \cdot m^{-2}$)")
plt.savefig(save_name + ".png", dpi=300)
fig, ax = plt.subplots()
ax.plot(np.real(crank.t_pts), 1/(c*mu) * np.abs(crank.E_matrix[z_plot, r_plot, :])**2)
ax.set_xlim(t_min, t_max)
ax.set_xlabel("Time (s)")
ax.set_ylabel("Intensity ($W \cdot m^{-2}$)")
fig.savefig(save_name + ".png", dpi=300)
print("Time plot saved as: " + save_name + ".png")
else:
# Plot
plt.figure()
plt.plot(np.real(crank.t_pts), 1/(c*mu) * np.abs(crank.E_matrix[z_plot, r_plot, :])**2)
plt.xlabel("Time (s)")
plt.ylabel("Intensity ($W \cdot m^{-2}$)")
plt.savefig(save_name + ".png", dpi=300)
fig, ax = plt.subplots()
ax.plot(np.real(crank.t_pts), 1/(c*mu) * np.abs(crank.E_matrix[z_plot, r_plot, :])**2)
ax.set_xlabel("Time (s)")
ax.set_ylabel("Intensity ($W \cdot m^{-2}$)")
fig.savefig(save_name + ".png", dpi=300)
print("Time plot saved as: " + save_name + ".png")
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment