mirror of
https://gitlab.science.ru.nl/mthesis-edeboone/m-thesis-introduction.git
synced 2024-11-14 02:23:32 +01:00
ZH: save mean beacon snr in file
This commit is contained in:
parent
8fc7d4bc0c
commit
a478a27079
1 changed files with 4 additions and 0 deletions
|
@ -92,6 +92,10 @@ if __name__ == "__main__":
|
||||||
N_samples = len(antennas[0].beacon)
|
N_samples = len(antennas[0].beacon)
|
||||||
beacon_snrs = [ lib.signal_to_noise(myfilter(beacon_amp*ant.beacon), myfilter(ant.noise), samplerate=1/dt, signal_band=beacon_pb, noise_band=noise_pb) for i, ant in enumerate(antennas) ]
|
beacon_snrs = [ lib.signal_to_noise(myfilter(beacon_amp*ant.beacon), myfilter(ant.noise), samplerate=1/dt, signal_band=beacon_pb, noise_band=noise_pb) for i, ant in enumerate(antennas) ]
|
||||||
|
|
||||||
|
with open(path.join(fname_dir, 'snr.txt'), 'w') as f:
|
||||||
|
f.write('mean='+str(np.mean(beacon_snrs))+'\n')
|
||||||
|
f.write('std='+str(np.std(beacon_snrs))+'\n')
|
||||||
|
|
||||||
fig, ax = plt.subplots(figsize=figsize)
|
fig, ax = plt.subplots(figsize=figsize)
|
||||||
ax.set_title(f"Maximum Beacon/Noise SNR (N_samples:{N_samples:.1e})")
|
ax.set_title(f"Maximum Beacon/Noise SNR (N_samples:{N_samples:.1e})")
|
||||||
ax.set_xlabel("Antenna no.")
|
ax.set_xlabel("Antenna no.")
|
||||||
|
|
Loading…
Reference in a new issue