diff --git a/swash/processing/post.py b/swash/processing/post.py index 5e015b5..616d436 100644 --- a/swash/processing/post.py +++ b/swash/processing/post.py @@ -64,13 +64,13 @@ ax_dep.plot(t, (dep - botl)[:, pos_x], label="dep") ax_dep.set(xlabel="t (s)", ylabel="z (m)") ax_dep.autoscale(axis="x", tight=True) ax_dep.grid() -ax_dep.axvline(t0) +ax_dep.axvline(t0, c='k', alpha=.2) ax_vel.plot(t, vel[:, 0, pos_x], label="vel") ax_vel.set(xlabel="t (s)", ylabel="U (m/s)") ax_vel.autoscale(axis="x", tight=True) ax_vel.grid() -ax_vel.axvline(t0) +ax_vel.axvline(t0, c='k', alpha=.2) fig.tight_layout() @@ -81,11 +81,20 @@ ax_r.autoscale(axis="x", tight=True) ax_r.set(ylim=(0, 1), xlabel="f (Hz)", ylabel="R") ax_r.grid() +fig_x, ax_x = plt.subplots() +ax_x.plot(bathy.index, botl[0, :], color='k') +ax_x.plot(bathy.index, (dep-botl)[t == t0, :]) +ax_x.axvline(x0) +ax_x.set(xlabel="x (m)", ylabel="z (m)") +ax_x.autoscale(axis="x", tight=True) +ax_x.grid() + out = pathlib.Path(config.get("post", "out")) log.info(f"Saving plots in '{out}'") out.mkdir(exist_ok=True) -fig.savefig(out.joinpath(f"{pos_x}.png")) +fig.savefig(out.joinpath(f"t{pos_x}.png")) fig_r.savefig(out.joinpath(f"R{pos_x}.png")) +fig_x.savefig(out.joinpath(f"x{pos_x}.png")) log.info("Finished post-processing")