added catch for low n syn mon

This commit is contained in:
alexmadison
2022-04-10 15:19:11 +02:00
parent ae3ecc3d6b
commit 19564a5a91
2 changed files with 29 additions and 17 deletions

View File

@ -99,6 +99,14 @@ Use -exclude='regex' to specify signals to exclude (or -ex).""")
if len(r) >= 1:
include_all_times = True
# Check if user gave "nowarn" flag
plot_warn = True
for arg in argv:
r = re.findall(r'(-nowarn?)', arg)
if len(r) >= 1:
plot_warn = False
# Get list of all times (before filtering)
unique_times = np.unique([int(e[0]) for e in entries])
@ -237,8 +245,9 @@ Use -exclude='regex' to specify signals to exclude (or -ex).""")
print(f"Couldn't find an appropriate time for warning {a}")
continue
index = time_to_index(time)
ax.axvline(index+0.5, c = "red", lw = 2)
ax.text(index+0.5, -1, a[2], rotation = 90, ha = "center", va = "bottom", c = "red")
if plot_warn:
ax.axvline(index+0.5, c = "red", lw = 2)
ax.text(index+0.5, -1, a[2], rotation = 90, ha = "center", va = "bottom", c = "red")
# Find echoed statements of the form "[digits] text"
echoes = re.findall(r"\t *(\d+) [^\t]*\n(\[\d*\].+)", f)