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 819b4e8..d189559 100755 --- a/simulations/airshower_beacon_simulation/ac_show_signal_to_noise.py +++ b/simulations/airshower_beacon_simulation/ac_show_signal_to_noise.py @@ -25,6 +25,12 @@ if __name__ == "__main__": from scriptlib import MyArgumentParser parser = MyArgumentParser() + + # Bandpass + parser.add_argument('-p', '--use-passband', type=bool, default=True) + parser.add_argument('-l', '--passband-low', type=float, default=30e-3, help='Lower frequency [GHz] of the passband filter. (set -1 for np.inf)') + parser.add_argument('-u', '--passband-high', type=float, default=80e-3, help='Upper frequency [GHz] of the passband filter. (set -1 for np.inf)') + args = parser.parse_args() fname = "ZH_airshower/mysim.sry" @@ -47,12 +53,15 @@ if __name__ == "__main__": # general properties dt = antennas[0].t[1] - antennas[0].t[0] # ns - pb = lib.passband(30e-3, 80e-3) # GHz beacon_pb = lib.passband(f_beacon-1e-3, f_beacon+1e-3) # GHz - beacon_amp = np.max(txdata['amplitudes'])# mu V/m - if True: # Apply filter to raw beacon/noise to compare with Filtered Traces + # General Bandpass + low_bp = args.passband_low if args.passband_low >= 0 else np.inf # GHz + high_bp = args.passband_high if args.passband_high >= 0 else np.inf # GHz + pb = lib.passband(low_bp, high_bp) # GHz + + if args.use_passband: # Apply filter to raw beacon/noise to compare with Filtered Traces myfilter = lambda x: block_filter(x, dt, pb[0], pb[1]) else: # Compare raw beacon/noise with Filtered Traces myfilter = lambda x: x