Outputs for article

This commit is contained in:
Edgar P. Burkhart 2022-07-06 07:53:59 +02:00
parent b8da550849
commit c443947e3c
Signed by: edpibu
GPG key ID: 9833D3C5A25BD227
3 changed files with 86 additions and 8 deletions

View file

@ -121,10 +121,10 @@ if bigw.size > 32:
log.warning(f"Number of large waves: {bigw.size}")
sys.exit()
for w in bigw:
fig, (ax2, ax) = plt.subplots(2, figsize=(15/2.54, 2/3*10/2.54), constrained_layout=True)
i0 = cr0[w] - int(1200 / dt)
i1 = cr0[w + 2] + int(1200 / dt)
fig, ax_ = plt.subplots(2 * (bigw.size // 2), 2, figsize=(15/2.54, 4/3*10/2.54), constrained_layout=True)
for w, ax2, ax in zip(bigw, ax_[::2].flatten(), ax_[1::2].flatten()):
i0 = cr0[w] - int(400 / dt)
i1 = cr0[w + 2] + int(400 / dt)
# a = [t0[i0], t0[i1], *Mlims]
# c = ax2.imshow(M[:, i0:i1], extent=a, aspect="auto", cmap="Spectral", vmin=-v, vmax=+v)
ws = np.ptp(raw_ts["z"][cr0[w]:cr0[w+2]]) * 1e-2
@ -143,13 +143,15 @@ for w in bigw:
#ax.plot(t[i0:i1], z[i0:i1], c="k", lw=1, alpha=0.2, ls="-.")
# ax.vlines(t[raw_ts["state"] != 0], -20, 20, colors=c[np.where(st != 777, st, 0)])
ax.set(xlim=(t[i0], t[i1 - 1]), ylim=(-ym, ym))
ax2.set(ylim=(2, 200))
ax2.set(ylabel="T (s)")
ax2.grid(c="k", alpha=0.2)
ax2.semilogy()
ax.grid(c="k", alpha=.2)
#ax.axhline(0, c="k", alpha=0.2, lw=1, ls="-.")
#ax.set(zorder=1, frame_on=False)
ax.set(xlabel="t (s)", ylabel="z (m)")
ax.set_xlabel("t (s)", loc="left")
ax.set_ylabel("z (m)")
ax.axvspan(t[cr0[w]], t[cr0[w+2]], color="k", alpha=.1)
locator = mdates.AutoDateLocator(minticks=3, maxticks=7)
@ -162,8 +164,8 @@ for w in bigw:
ax2.set_rasterization_zorder(1.5)
fig.savefig(out_root.joinpath(f"wavelet{w}.pdf"), dpi=300)
fig.savefig(out_root.joinpath(f"wavelet{w}.png"), dpi=200)
fig.savefig(out_root.joinpath(f"wavelet.pdf"), dpi=300)
fig.savefig(out_root.joinpath(f"wavelet.png"), dpi=200)
#fig, ax = plt.subplots(constrained_layout=True)
## ax.plot(fft.rfftfreq(raw_ts["z"].size, dt), np.abs(fft.rfft(raw_ts["z"])), c="k", alpha=.2, lw=1)