Skip to content
Snippets Groups Projects
Commit 98e8a761 authored by Tammo Jan Dijkema's avatar Tammo Jan Dijkema
Browse files

Fix dates, test catch-up

parent 963144ba
No related branches found
No related tags found
No related merge requests found
...@@ -7,10 +7,12 @@ import numpy as np ...@@ -7,10 +7,12 @@ import numpy as np
a = 1 a = 1
with open("../sagittarius_a/results/power_1420.ecsv", "r") as f: with open("doppler.txt", "r") as f:
for line in f.readlines(): for line in f.readlines():
a += 1
if line[0] == '#' or line[0] == 't': if line[0] == '#' or line[0] == 't':
print(line, end='', flush=True) print(line, end='', flush=True)
else: else:
print(line, end='', flush=True) print(line, end='', flush=True)
if a > 1000:
sleep(1) sleep(1)
#!/usr/bin/env python3 #!/usr/bin/env python3
from datetime import datetime from datetime import datetime, timedelta
import sys import sys
import os import os
...@@ -51,7 +51,7 @@ class PowerPlot: ...@@ -51,7 +51,7 @@ class PowerPlot:
) )
fig.suptitle(f"Maximum frequency", fontsize=16) fig.suptitle(f"Maximum frequency", fontsize=16)
fig.tight_layout() fig.tight_layout()
(self.totalplot,) = self.ax.plot([], [], "-", color="blue") (self.totalplot,) = self.ax.plot([], [], ".", color="blue")
(self.totalplothighlight,) = self.ax.plot( (self.totalplothighlight,) = self.ax.plot(
[], [], ".", color="red", markersize=10 [], [], ".", color="red", markersize=10
) )
...@@ -117,7 +117,8 @@ class PowerPlotMainWindow(QMainWindow): ...@@ -117,7 +117,8 @@ class PowerPlotMainWindow(QMainWindow):
line = sys.stdin.readline() line = sys.stdin.readline()
values = line.split(",") values = line.split(",")
self.time_dt = np.array(date2num(datetime.utcfromtimestamp(float(values[0])))) first_time = datetime.utcfromtimestamp(float(values[0]))
self.time_dt = np.array(date2num(first_time))
self.last_x_buffer = np.empty(last_seconds + 1) self.last_x_buffer = np.empty(last_seconds + 1)
self.last_x_buffer[:] = np.nan self.last_x_buffer[:] = np.nan
...@@ -126,8 +127,8 @@ class PowerPlotMainWindow(QMainWindow): ...@@ -126,8 +127,8 @@ class PowerPlotMainWindow(QMainWindow):
self.data = np.array([float(values[1])]) self.data = np.array([float(values[1])])
self.start_time = datetime(2023, 12, 13, 9, 15) self.start_time = first_time
self.stop_time = datetime(2023, 12, 13, 11, 30) self.stop_time = first_time + timedelta(hours=2)
plt.ion() plt.ion()
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment