|
70 | 70 | # Colorbar
|
71 | 71 | fig.subplots_adjust(right=0.825)
|
72 | 72 | cbar_ax = fig.add_axes([0.85, 0.2, 0.03, 0.6])
|
73 |
| -fig.colorbar(im, cax=cbar_ax, orientation="vertical", label="$B_y/B_0$") |
| 73 | +fig.colorbar(im, cax=cbar_ax, orientation="vertical", label=r"$B_y/B_0$") |
74 | 74 |
|
75 |
| -ax1.set_xlabel("$x/l_i$") |
76 |
| -ax1.set_ylabel("$t \Omega_i$ (rad)") |
| 75 | +ax1.set_xlabel(r"$x/l_i$") |
| 76 | +ax1.set_ylabel(r"$t \Omega_i$ (rad)") |
77 | 77 |
|
78 | 78 | ax1.set_title(f"Ion beam R instability - {resonant_str} case")
|
79 | 79 | plt.savefig(
|
|
88 | 88 |
|
89 | 89 | t_grid = np.arange(num_steps) * dt * sim.w_ci
|
90 | 90 | plt.plot(
|
91 |
| - t_grid, np.abs(field_kt[:, 4] / sim.B0), "r", label=f"m = 4, $kl_i={k[4]:.2f}$" |
| 91 | + t_grid, np.abs(field_kt[:, 4] / sim.B0), "r", label=rf"m = 4, $kl_i={k[4]:.2f}$" |
92 | 92 | )
|
93 | 93 | plt.plot(
|
94 |
| - t_grid, np.abs(field_kt[:, 5] / sim.B0), "b", label=f"m = 5, $kl_i={k[5]:.2f}$" |
| 94 | + t_grid, np.abs(field_kt[:, 5] / sim.B0), "b", label=rf"m = 5, $kl_i={k[5]:.2f}$" |
95 | 95 | )
|
96 | 96 | plt.plot(
|
97 |
| - t_grid, np.abs(field_kt[:, 6] / sim.B0), "k", label=f"m = 6, $kl_i={k[6]:.2f}$" |
| 97 | + t_grid, np.abs(field_kt[:, 6] / sim.B0), "k", label=rf"m = 6, $kl_i={k[6]:.2f}$" |
98 | 98 | )
|
99 | 99 |
|
100 | 100 | # The theoretical growth rates for the 4th, 5th and 6th Fourier modes of
|
|
119 | 119 | plt.grid()
|
120 | 120 | plt.legend()
|
121 | 121 | plt.yscale("log")
|
122 |
| - plt.ylabel("$|B_y/B_0|$") |
123 |
| - plt.xlabel("$t\Omega_i$ (rad)") |
| 122 | + plt.ylabel(r"$|B_y/B_0|$") |
| 123 | + plt.xlabel(r"$t\Omega_i$ (rad)") |
124 | 124 | plt.tight_layout()
|
125 | 125 | plt.savefig(
|
126 | 126 | f"diags/ion_beam_R_instability_{resonant_str}_eta_{sim.eta}_substeps_{sim.substeps}_low_modes.png"
|
|
172 | 172 | fig.subplots_adjust(bottom=0.15, right=0.815)
|
173 | 173 | cbar_ax = fig.add_axes([0.83, 0.2, 0.03, 0.6])
|
174 | 174 | fig.colorbar(
|
175 |
| - im[3], cax=cbar_ax, orientation="vertical", format="%.0e", label="$f(z, v_y)$" |
| 175 | + im[3], cax=cbar_ax, orientation="vertical", format="%.0e", label=r"$f(z, v_y)$" |
176 | 176 | )
|
177 | 177 |
|
178 |
| - ax1.set_xlabel("$x/l_i$") |
179 |
| - ax1.set_ylabel("$v_{y}/v_A$") |
| 178 | + ax1.set_xlabel(r"$x/l_i$") |
| 179 | + ax1.set_ylabel(r"$v_{y}/v_A$") |
180 | 180 |
|
181 | 181 | ax1.set_title(f"Ion beam R instability - {resonant_str} case")
|
182 | 182 | plt.savefig(
|
|
207 | 207 | fig.subplots_adjust(bottom=0.15, right=0.815)
|
208 | 208 | cbar_ax = fig.add_axes([0.83, 0.2, 0.03, 0.6])
|
209 | 209 | fig.colorbar(
|
210 |
| - im[3], cax=cbar_ax, orientation="vertical", format="%.0e", label="$f(z, v_y)$" |
| 210 | + im[3], cax=cbar_ax, orientation="vertical", format="%.0e", label=r"$f(z, v_y)$" |
211 | 211 | )
|
212 | 212 |
|
213 |
| - ax1.set_xlabel("$x/l_i$") |
214 |
| - ax1.set_ylabel("$v_{y}/v_A$") |
| 213 | + ax1.set_xlabel(r"$x/l_i$") |
| 214 | + ax1.set_ylabel(r"$v_{y}/v_A$") |
215 | 215 |
|
216 | 216 | ax1.set_title(f"Ion beam R instability - {resonant_str} case")
|
217 | 217 | plt.savefig(
|
|
0 commit comments