Redid post processing comparison
This commit is contained in:
parent
f905d20c81
commit
d17d25b8e2
2 changed files with 13 additions and 7 deletions
|
@ -20,7 +20,7 @@ mpi=4
|
||||||
|
|
||||||
[post]
|
[post]
|
||||||
inp=inp_post
|
inp=inp_post
|
||||||
#compare=inp_post_2
|
compare=inp_post_nb
|
||||||
out=out_post
|
out=out_post
|
||||||
#nperseg=1024
|
#nperseg=1024
|
||||||
dt=0.25
|
dt=0.25
|
||||||
|
|
|
@ -64,13 +64,19 @@ R = np.sqrt(
|
||||||
)
|
)
|
||||||
|
|
||||||
if config.has_option("post", "compare"):
|
if config.has_option("post", "compare"):
|
||||||
data_comp = np.load(inp.joinpath(config.get("post", "compare")))
|
inp_comp = pathlib.Path(config.get("post", "compare"))
|
||||||
x_, t_ = data_comp["x"], data_comp["t"]
|
x_ = np.load(inp_comp.joinpath("xp.npy"))
|
||||||
|
t_ = np.load(inp_comp.joinpath("tsec.npy"))
|
||||||
|
|
||||||
|
botl_ = np.load(inp_comp.joinpath("botl.npy"))
|
||||||
|
watl_ = np.load(inp_comp.joinpath("watl.npy"))
|
||||||
|
vel_ = np.load(inp_comp.joinpath("vel.npy"))
|
||||||
|
|
||||||
arg_x0_ = np.abs(x_ - x0).argmin()
|
arg_x0_ = np.abs(x_ - x0).argmin()
|
||||||
arg_t0_ = np.abs(t_ - t0).argmin()
|
arg_t0_ = np.abs(t_ - t0).argmin()
|
||||||
|
|
||||||
eta_ = data_comp["watl"][t_ > t0, arg_x0_]
|
eta_ = watl_[t_ > t0, arg_x0_]
|
||||||
u_ = data_comp["vel"][t_ > t0, 0, arg_x0_]
|
u_ = vel_[t_ > t0, 0, arg_x0_]
|
||||||
|
|
||||||
phi_eta_ = sgl.welch(eta_, f, nperseg=nperseg)
|
phi_eta_ = sgl.welch(eta_, f, nperseg=nperseg)
|
||||||
phi_u_ = sgl.welch(u_, f, nperseg=nperseg)
|
phi_u_ = sgl.welch(u_, f, nperseg=nperseg)
|
||||||
|
@ -139,10 +145,10 @@ ax_x.plot(
|
||||||
np.maximum(watl[arg_t0, :], -botl),
|
np.maximum(watl[arg_t0, :], -botl),
|
||||||
)
|
)
|
||||||
if config.has_option("post", "compare"):
|
if config.has_option("post", "compare"):
|
||||||
ax_x.plot(x, -data_comp["botl"], color="k", ls="-.")
|
ax_x.plot(x, -botl_, color="k", ls="-.")
|
||||||
ax_x.plot(
|
ax_x.plot(
|
||||||
x,
|
x,
|
||||||
np.maximum(data_comp["watl"][arg_t0, :], -data_comp["botl"]),
|
np.maximum(watl_[arg_t0, :], -botl_),
|
||||||
ls="-.",
|
ls="-.",
|
||||||
)
|
)
|
||||||
ax_x.axvline(x0, c="k", alpha=0.2)
|
ax_x.axvline(x0, c="k", alpha=0.2)
|
||||||
|
|
Loading…
Reference in a new issue