Commit ba845100 authored by Tammo Jan Dijkema's avatar Tammo Jan Dijkema
Browse files

Update kaart

parent b3849340
......@@ -56,11 +56,13 @@ s.start()
dt = Telescope(consoleHost='localhost')
data = np.zeros((360, 720), dtype=float)
data[:, :] = np.nan
npoints = np.zeros(data.shape, dtype='i8')
# create plot
plt.ion()
fig, ax = plt.subplots()
fig.canvas.manager.set_window_title(f'Scan met de Dwingeloo telescoop {Time.now().iso[:16]}')
fig.canvas.mpl_connect('close_event', set_stoprequest)
plot = ax.imshow(data, origin='lower', extent=(-180.25, 179.75, -90.25, 89.75))
......@@ -113,6 +115,8 @@ while not stoprequest:
b = lat_to_pixel(pos.b.deg)
n = npoints[b, l]
if np.isnan(data[b, l]):
data[b, l] = 0
data[b, l] = (signal + n * data[b, l]) / (n + 1)
npoints[b, l] += 1
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment