From 0641048f67f91d122ed37b2f3206969150af44a6 Mon Sep 17 00:00:00 2001 From: Eric Teunis de Boone Date: Tue, 31 Jan 2023 14:52:27 +0100 Subject: [PATCH] ZH: use full band for noise power determination --- .../ac_show_signal_to_noise.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/simulations/airshower_beacon_simulation/ac_show_signal_to_noise.py b/simulations/airshower_beacon_simulation/ac_show_signal_to_noise.py index 5c60cfe..5c0d73c 100755 --- a/simulations/airshower_beacon_simulation/ac_show_signal_to_noise.py +++ b/simulations/airshower_beacon_simulation/ac_show_signal_to_noise.py @@ -70,14 +70,14 @@ if __name__ == "__main__": ## Beacon vs Noise SNR ## if True: - beacon_snrs = [ lib.signal_to_noise(myfilter(beacon_amp*ant.beacon), myfilter(ant.noise), samplerate=1/dt, signal_band=beacon_pb) for ant in antennas ] + beacon_snrs = [ lib.signal_to_noise(myfilter(beacon_amp*ant.beacon), myfilter(ant.noise), samplerate=1/dt, signal_band=beacon_pb, noise_band=pb) for ant in antennas ] fig, ax = plt.subplots() ax.set_title("Maximum Beacon/Noise SNR") ax.set_xlabel("Antenna no.") ax.set_ylabel("SNR") ax.plot([ int(ant.name) for ant in antennas], beacon_snrs, 'o', ls='none') - + if fig_dir: fig.savefig(path.join(fig_dir, path.basename(__file__) + f".beacon_vs_noise_snr.pdf")) @@ -85,7 +85,7 @@ if __name__ == "__main__": ## Beacon vs Total SNR ## if True: - beacon_snrs = [ lib.signal_to_noise(myfilter(beacon_amp*ant.beacon), ant.E_AxB, samplerate=1/dt, signal_band=beacon_pb) for ant in antennas ] + beacon_snrs = [ lib.signal_to_noise(myfilter(beacon_amp*ant.beacon), ant.E_AxB, samplerate=1/dt, signal_band=beacon_pb, noise_band=pb) for ant in antennas ] fig, ax = plt.subplots() ax.set_title("Maximum Beacon/Total SNR") @@ -99,16 +99,16 @@ if __name__ == "__main__": ## Airshower signal vs Noise SNR ## if True: - shower_snrs = [ lib.signal_to_noise(ant.E_AxB, myfilter(ant.noise), samplerate=1/dt, signal_band=pb) for ant in antennas ] + shower_snrs = [ lib.signal_to_noise(ant.E_AxB, myfilter(ant.noise), samplerate=1/dt, signal_band=pb, noise_band=pb) for ant in antennas ] fig, ax = plt.subplots() ax.set_title("Total (Signal+Beacon+Noise)/Noise SNR") ax.set_xlabel("Antenna no.") ax.set_ylabel("SNR") ax.plot([ int(ant.name) for ant in antennas], shower_snrs, 'o', ls='none') - + if fig_dir: fig.savefig(path.join(fig_dir, path.basename(__file__) + f".total_snr.pdf")) - + if show_plots: plt.show()