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

Always use logarithmic plot

parent dea8d5ab
......@@ -107,7 +107,6 @@ for sourcename in sourcenames:
#ax.set_ylim((0, None))
ax.set_xlabel("Afstand tot middelpunt (graden)")
ax.set_ylabel("Signaalsterkte (ongekalibreerd)")
fig.canvas.set_window_title('Live waarneming Dwingeloo radiotelescoop op 1330 MHz')
ax.set_title('Live waarneming Dwingeloo radiotelescoop op 1330 MHz')
......@@ -206,7 +205,10 @@ while not stoprequest:
if signal < minsignal:
minsignal = signal
if noise_count < 10:
noiselevel = 75 # TODO: infer this from data
if minsignal < 1000: # Attenuator on
noiselevel = 75
else:
noiselevel = 3000
else:
noiselevel = noise_sum / noise_count
print(f"New noise level: {noiselevel}")
......@@ -218,16 +220,15 @@ while not stoprequest:
prev_points = ax.scatter([separation.deg], [signal], s=50, color='red')
ax.set_ylim((0.9 * minsignal, 1.1 * maxsignal))
if minsignal < 1000:
# Attenuator on
y_scale_is_logarithmic = True
ax.set_yscale("log")
# Attenuator on
y_scale_is_logarithmic = True
ax.set_yscale("log")
ax.get_yaxis().set_tick_params(which='minor', size=0)
ax.get_yaxis().set_tick_params(which='minor', width=0)
ax.set_ylabel("Relatieve intensiteit")
ax.get_yaxis().set_tick_params(which='minor', size=0)
ax.get_yaxis().set_tick_params(which='minor', width=0)
ax.set_ylabel("Relatieve intensiteit")
update_logticks(ax, noiselevel)
update_logticks(ax, noiselevel)
update_legend(ax, closest_source)
......
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