mirror of
https://gitlab.science.ru.nl/mthesis-edeboone/m-thesis-introduction.git
synced 2024-11-13 18:13:31 +01:00
ZH: more cli arguments to k-finding
This commit is contained in:
parent
d6ae5d3334
commit
ac97c96a41
3 changed files with 18 additions and 9 deletions
|
@ -41,7 +41,7 @@ phases:
|
|||
./bd_antenna_phase_deltas.py --no-show-plots --fig-dir=${FIG_DIR} --data-dir ${DATA_DIR}
|
||||
|
||||
findks:
|
||||
./ca_period_from_shower.py --input-fname ${INPUT_DIR} --max-k ${MAX_K} --no-show-plots --fig-dir=${FIG_DIR} --data-dir ${DATA_DIR}
|
||||
./ca_period_from_shower.py --input-fname ${INPUT_DIR} --max-k ${MAX_K} --no-show-plots --fig-dir=${FIG_DIR} --data-dir ${DATA_DIR} -l ${PB_LOW} -u ${PB_HIGH}
|
||||
./cb_report_measured_antenna_time_offsets.py --no-show-plots --fig-dir=${FIG_DIR} --data-dir ${DATA_DIR}
|
||||
|
||||
vary-fixes:
|
||||
|
|
|
@ -282,8 +282,8 @@ if __name__ == "__main__":
|
|||
|
||||
# Bandpass
|
||||
parser.add_argument('-p', '--use-passband', type=bool, default=True, help='(Default: %(default)d)')
|
||||
parser.add_argument('-l', '--passband-low', type=float, default=30e-3, help='Lower frequency [GHz] of the passband filter. (set -1 for np.inf) (Default: %(default)d)')
|
||||
parser.add_argument('-u', '--passband-high', type=float, default=80e-3, help='Upper frequency [GHz] of the passband filter. (set -1 for np.inf) (Default: %(default)d)')
|
||||
parser.add_argument('-l', '--passband-low', type=float, default=30e-3, help='Lower frequency [GHz] of the passband filter. (set -1 for np.inf) (Default: %(default)g)')
|
||||
parser.add_argument('-u', '--passband-high', type=float, default=80e-3, help='Upper frequency [GHz] of the passband filter. (set -1 for np.inf) (Default: %(default)g)')
|
||||
|
||||
# Trace length modification
|
||||
parser.add_argument('-N', '--new-trace-length', type=float, help='resize airshower trace (Default: %(default)d)', default=1e4)
|
||||
|
|
|
@ -151,7 +151,14 @@ if __name__ == "__main__":
|
|||
|
||||
from scriptlib import MyArgumentParser
|
||||
parser = MyArgumentParser(default_fig_dir="./figures/periods_from_shower_figures/")
|
||||
parser.add_argument('--quick_run', action='store_true', help='Use a very coarse grid (6x6)')
|
||||
|
||||
parser.add_argument('--max-k', type=float, default=2, help='Maximum abs(k) allowed to be shifted. (Default: %(default)d)')
|
||||
parser.add_argument('-N', '--N_runs', type=int, default=5, help='Maximum amount of iterations to grid search. (Default: %(default)d)')
|
||||
|
||||
parser.add_argument('-l', '--passband-low', type=float, default=30e-3, help='Lower frequency [GHz] of the passband filter. (set -1 for np.inf) (Default: %(default)g)')
|
||||
parser.add_argument('-u', '--passband-high', type=float, default=80e-3, help='Upper frequency [GHz] of the passband filter. (set -1 for np.inf) (Default: %(default)g)')
|
||||
|
||||
parser.add_argument('--input-fname', type=str, default=None, help='Path to mysim.sry, either directory or path. If empty it takes DATA_DIR and appends mysim.sry. (Default: %(default)s)')
|
||||
args = parser.parse_args()
|
||||
|
||||
|
@ -171,10 +178,13 @@ if __name__ == "__main__":
|
|||
allowed_ks = np.arange(-max_k, max_k+1, dtype=int)
|
||||
Xref = 400
|
||||
|
||||
N_runs = 3
|
||||
N_runs = args.N_runs
|
||||
remove_beacon_from_trace = True
|
||||
apply_signal_window_from_max = True
|
||||
|
||||
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
|
||||
|
||||
####
|
||||
fname_dir = args.data_dir
|
||||
antennas_fname = path.join(fname_dir, beacon.antennas_fname)
|
||||
|
@ -207,7 +217,7 @@ if __name__ == "__main__":
|
|||
f_beacon = ev.antennas[0].beacon_info[freq_name]['freq']
|
||||
|
||||
# Prepare polarisation and passbands
|
||||
rit.set_pol_and_bp(ev, low=0.03, high=0.08)
|
||||
rit.set_pol_and_bp(ev, low=low_bp, high=high_bp)
|
||||
|
||||
##
|
||||
## Manipulate time and traces of each antenna
|
||||
|
@ -303,14 +313,13 @@ if __name__ == "__main__":
|
|||
scale2d = dXref*np.tan(np.deg2rad(2.))
|
||||
scale4d = dXref*np.tan(np.deg2rad(4.))
|
||||
|
||||
if False: #quicky
|
||||
x_coarse = np.linspace(-scale2d, scale2d, 4)
|
||||
y_coarse = np.linspace(-scale2d, scale2d, 4)
|
||||
if args.quick_run: #quicky
|
||||
x_coarse = np.linspace(-scale2d, scale2d, 6)
|
||||
y_coarse = np.linspace(-scale2d, scale2d, 6)
|
||||
|
||||
x_fine = x_coarse/4
|
||||
y_fine = y_coarse/4
|
||||
else: # long
|
||||
N_runs = 5
|
||||
x_coarse = np.linspace(-scale4d, scale4d, 40)
|
||||
y_coarse = np.linspace(-scale4d, scale4d, 40)
|
||||
|
||||
|
|
Loading…
Reference in a new issue