You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fig, ax = plt.subplots(figsize=(10, 8))
ax.set_prop_cycle(
cycler("linestyle", ["-", "--"])
* (cycler("color", ["black"]) * len(ll_list))
)
for M in M_list:
for ll in ll_list:
T_x0 = np.zeros_like(x)
for ii in range(len(x)):
y = iod._compute_y(x[ii], ll)
T_x0[ii] = iod._tof_equation_y(x[ii], y, 0.0, ll, M)
if M == 0 and ll == 1:
T_x0[x > 0] = np.nan
elif M > 0:
# Mask meaningless solutions
T_x0[x > 1] = np.nan
(l,) = ax.plot(x, T_x0)
ax.set_ylim(0, 10)
ax.set_xticks((-1, 0, 1, 2))
ax.set_yticks((0, np.pi, 2 * np.pi, 3 * np.pi))
ax.set_yticklabels(("$0$", "$\pi$", "$2 \pi$", "$3 \pi$"))
ax.vlines(1, 0, 10)
ax.text(0.65, 4.0, "elliptic")
ax.text(1.16, 4.0, "hyperbolic")
ax.text(0.05, 1.5, "$M = 0$", bbox=dict(facecolor="white"))
ax.text(0.05, 5, "$M = 1$", bbox=dict(facecolor="white"))
ax.text(0.05, 8, "$M = 2$", bbox=dict(facecolor="white"))
ax.annotate(
"$\lambda = 1$",
xy=(-0.3, 1),
xytext=(-0.75, 0.25),
arrowprops=dict(arrowstyle="simple", facecolor="black"),
)
ax.annotate(
"$\lambda = -1$",
xy=(0.3, 2.5),
xytext=(0.65, 2.75),
arrowprops=dict(arrowstyle="simple", facecolor="black"),
)
ax.grid()
ax.set_xlabel("$x$")
ax.set_ylabel("$T$")
Part 2: Locating $T_{min}$
:tags: [nbsphinx-thumbnail]
for M in M_list:
for ll in ll_list:
x_T_min, T_min = iod._compute_T_min(ll, M, 10, 1e-8)
ax.plot(x_T_min, T_min, "kx", mew=2)
fig