mirror of
https://gitlab.science.ru.nl/mthesis-edeboone/m-thesis-introduction.git
synced 2024-11-13 01:53:31 +01:00
ZH: cli arguments to snr script
This commit is contained in:
parent
7b18837d6d
commit
967ed3d232
1 changed files with 12 additions and 3 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue