Fixed optional comparison
This commit is contained in:
parent
fdfbd081d9
commit
bf4e9e6958
1 changed files with 16 additions and 14 deletions
|
@ -111,6 +111,8 @@ ax_fft.plot(
|
||||||
alpha=0.2,
|
alpha=0.2,
|
||||||
label="PSD ($\\eta$, cas 1)",
|
label="PSD ($\\eta$, cas 1)",
|
||||||
)
|
)
|
||||||
|
ax_r.plot(phi_eta[0], R, marker="+", label="R (cas 1)")
|
||||||
|
if config.has_option("post", "compare"):
|
||||||
ax_fft.plot(
|
ax_fft.plot(
|
||||||
*sgl.welch(eta_, 1 / dt, nperseg=nperseg),
|
*sgl.welch(eta_, 1 / dt, nperseg=nperseg),
|
||||||
lw=1,
|
lw=1,
|
||||||
|
@ -118,7 +120,6 @@ ax_fft.plot(
|
||||||
alpha=0.2,
|
alpha=0.2,
|
||||||
label="PSD ($\\eta$, cas 2)",
|
label="PSD ($\\eta$, cas 2)",
|
||||||
)
|
)
|
||||||
ax_r.plot(phi_eta[0], R, marker="+", label="R (cas 1)")
|
|
||||||
ax_r.plot(phi_eta[0], R_, marker="+", label="R (cas 2)")
|
ax_r.plot(phi_eta[0], R_, marker="+", label="R (cas 2)")
|
||||||
ax_r.set(xlim=(0, 0.3), ylim=(0, 1), xlabel="f (Hz)", ylabel="R")
|
ax_r.set(xlim=(0, 0.3), ylim=(0, 1), xlabel="f (Hz)", ylabel="R")
|
||||||
ax_fft.set(ylim=0, ylabel="PSD (m²/Hz)")
|
ax_fft.set(ylim=0, ylabel="PSD (m²/Hz)")
|
||||||
|
@ -129,11 +130,12 @@ fig_r.tight_layout()
|
||||||
|
|
||||||
fig_x, ax_x = plt.subplots(figsize=(10, 1))
|
fig_x, ax_x = plt.subplots(figsize=(10, 1))
|
||||||
ax_x.plot(data["x"], -data["botl"], color="k")
|
ax_x.plot(data["x"], -data["botl"], color="k")
|
||||||
ax_x.plot(data["x"], -data_comp["botl"], color="k", ls="-.")
|
|
||||||
ax_x.plot(
|
ax_x.plot(
|
||||||
data["x"],
|
data["x"],
|
||||||
np.maximum(data["watl"][arg_t0, :], -data["botl"]),
|
np.maximum(data["watl"][arg_t0, :], -data["botl"]),
|
||||||
)
|
)
|
||||||
|
if config.has_option("post", "compare"):
|
||||||
|
ax_x.plot(data["x"], -data_comp["botl"], color="k", ls="-.")
|
||||||
ax_x.plot(
|
ax_x.plot(
|
||||||
data["x"],
|
data["x"],
|
||||||
np.maximum(data_comp["watl"][arg_t0, :], -data_comp["botl"]),
|
np.maximum(data_comp["watl"][arg_t0, :], -data_comp["botl"]),
|
||||||
|
|
Loading…
Reference in a new issue