1
Fork 0

Update prints from data zero_cross

This commit is contained in:
Edgar P. Burkhart 2022-06-27 10:27:29 +02:00
parent d4e9c3fd78
commit f1bc55843a
Signed by: edpibu
GPG Key ID: 9833D3C5A25BD227
1 changed files with 15 additions and 8 deletions

View File

@ -2,6 +2,7 @@ import argparse
import configparser
import logging
import pathlib
import sys
import matplotlib.pyplot as plt
import matplotlib.dates as mdates
@ -67,13 +68,6 @@ log.debug(f"{t=}")
# plt.plot(t[cr0[1:-1]], wave)
nw = len(wave) / 2
nlw = np.sum(wave > 12)
H13 = np.quantile(wave, 2 / 3)
log.info(f"Number of waves: {nw}")
log.info(f"Number of waves >m: {nlw}")
log.info(f"Proportion: {nlw/nw:e}")
log.info(f"H1/3: {H13}m")
dt = 30 * 60 / 2304
# Mlims = (int(5 / dt), int(30 / dt))
@ -107,8 +101,21 @@ a = [t0[0], t0[-1], *Mlims]
c = ax.contourf(t, sj, M, cmap="Greys", vmin=0, vmax=v)
fig.colorbar(c)
bigw = np.where(wave > 12)[0]
H13 = np.quantile(wave, 2 / 3)
th = 10
log.info(f"Threshold: {th}m")
bigw = np.where(wave > th)[0]
ym = 1.1 * np.max(np.abs(z))
nw = wave.size / 2
nlw = bigw.size
log.info(f"Number of waves: {nw}")
log.info(f"Number of waves >m: {nlw}")
log.info(f"Proportion: {nlw/nw:e}")
log.info(f"H1/3: {H13}m")
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)