plotting in ex bugs
This commit is contained in:
parent
e21e132d8b
commit
94109bb157
|
@ -117,6 +117,7 @@ Use -exclude='regex' to specify signals to exclude (or -ex).""")
|
||||||
'''
|
'''
|
||||||
Since times are random, need to convert them to an index.
|
Since times are random, need to convert them to an index.
|
||||||
'''
|
'''
|
||||||
|
if not (int(time) in unique_times): return None
|
||||||
out = np.argwhere(unique_times == int(time))
|
out = np.argwhere(unique_times == int(time))
|
||||||
return out[0][0]
|
return out[0][0]
|
||||||
|
|
||||||
|
@ -125,6 +126,7 @@ Use -exclude='regex' to specify signals to exclude (or -ex).""")
|
||||||
Handles signal name ordering.
|
Handles signal name ordering.
|
||||||
Assume ordered like unique_sigs for now
|
Assume ordered like unique_sigs for now
|
||||||
'''
|
'''
|
||||||
|
if not (sig in unique_sigs): return None
|
||||||
out = np.argwhere(unique_sigs == sig)
|
out = np.argwhere(unique_sigs == sig)
|
||||||
return out[0][0]
|
return out[0][0]
|
||||||
|
|
||||||
|
@ -205,14 +207,18 @@ Use -exclude='regex' to specify signals to exclude (or -ex).""")
|
||||||
for a in asserts:
|
for a in asserts:
|
||||||
print(a)
|
print(a)
|
||||||
time = int(a[0])
|
time = int(a[0])
|
||||||
|
if not time in unique_times:
|
||||||
|
time = unique_times[np.argwhere((unique_times-time) < 0)[-1]]
|
||||||
index = time_to_index(time)
|
index = time_to_index(time)
|
||||||
ax.axvline(index+0.5, c = "red", lw = 2)
|
ax.axvline(index+0.5, c = "red", lw = 2)
|
||||||
ax.text(index+0.5, -1, a[1], rotation = 90, ha = "center", va = "bottom", c = "red")
|
ax.text(index+0.5, -1, a[1], rotation = 90, ha = "center", va = "bottom", c = "red")
|
||||||
|
|
||||||
# Find echoed statements of the form "[digits] text"
|
# Find echoed statements of the form "[digits] text"
|
||||||
echoes = re.findall(r"\t *(\d+) [^\t]*\n(\[\d+\].+)", f)
|
echoes = re.findall(r"\t *(\d+) [^\t]*\n(\[\d*\].+)", f)
|
||||||
for a in echoes:
|
for a in echoes:
|
||||||
time = int(a[0])
|
time = int(a[0])
|
||||||
|
if not time in unique_times:
|
||||||
|
time = unique_times[np.argwhere((unique_times-time) < 0)[-1]]
|
||||||
index = time_to_index(time)
|
index = time_to_index(time)
|
||||||
c = "xkcd:bright purple"
|
c = "xkcd:bright purple"
|
||||||
ax.axvline(index+0.5, c = c, lw = 2)
|
ax.axvline(index+0.5, c = c, lw = 2)
|
||||||
|
|
Loading…
Reference in New Issue