mirror of
https://gitlab.science.ru.nl/mthesis-edeboone/m-thesis-introduction.git
synced 2024-11-13 18:13:31 +01:00
ZH: CLI args for baseline phase determination
This commit is contained in:
parent
040f27bd78
commit
ad7a62604b
2 changed files with 12 additions and 6 deletions
|
@ -1,6 +1,5 @@
|
|||
.PHONY: all
|
||||
|
||||
|
||||
FIG_DIR := ./figures
|
||||
|
||||
-include config.mk
|
||||
|
@ -18,6 +17,7 @@ BEAC_DECAY ?= 0
|
|||
PB_LOW ?= 0.03
|
||||
PB_HIGH ?= 0.08
|
||||
|
||||
REF_ANTS ?=
|
||||
|
||||
all: beacon clocks phases findks vary-fixes reconstruct
|
||||
|
||||
|
@ -33,7 +33,7 @@ clocks:
|
|||
phases:
|
||||
./ba_measure_beacon_phase.py --no-show-plots --fig-dir=${FIG_DIR}
|
||||
./bb_measure_clock_phase.py --no-show-plots --fig-dir=${FIG_DIR}
|
||||
./bc_baseline_phase_deltas.py --no-show-plots --fig-dir=${FIG_DIR}
|
||||
./bc_baseline_phase_deltas.py ${REF_ANTS} --no-show-plots --fig-dir=${FIG_DIR}
|
||||
./bd_antenna_phase_deltas.py --no-show-plots --fig-dir=${FIG_DIR}
|
||||
|
||||
findks:
|
||||
|
|
|
@ -21,13 +21,14 @@ if __name__ == "__main__":
|
|||
|
||||
from scriptlib import MyArgumentParser
|
||||
parser = MyArgumentParser()
|
||||
parser.add_argument('ref_ant_idx', default=None, nargs='*', type=int, help='Reference Antenna Indices for Baselines(ref_ant_idx, *). Leave empty to use all available antennas. (Default: %(default)s) ')
|
||||
args = parser.parse_args()
|
||||
|
||||
fname = "ZH_airshower/mysim.sry"
|
||||
figsize = (12,8)
|
||||
c_light = 3e8*1e-9
|
||||
show_plots = args.show_plots
|
||||
ref_ant_id = None if True else [50] # leave None for all baselines
|
||||
ref_ant_id = args.ref_ant_idx # leave None for all baselines
|
||||
|
||||
####
|
||||
fname_dir = path.dirname(fname)
|
||||
|
@ -44,14 +45,15 @@ if __name__ == "__main__":
|
|||
f_beacon, tx, antennas = beacon.read_beacon_hdf5(antennas_fname)
|
||||
|
||||
# run over all baselines
|
||||
if ref_ant_id is None:
|
||||
if not ref_ant_id:
|
||||
print("Doing all baselines")
|
||||
baselines = list(combinations(antennas,2))
|
||||
baselines = combinations(antennas,2)
|
||||
|
||||
# use ref_ant
|
||||
else:
|
||||
ref_ants = [antennas[i] for i in ref_ant_id]
|
||||
print("Doing all baselines with {}".format([int(a.name) for a in ref_ants]))
|
||||
baselines = list(product(ref_ants, antennas))
|
||||
baselines = product(ref_ants, antennas)
|
||||
|
||||
# For now, only one beacon_frequency is supported
|
||||
freq_names = antennas[0].beacon_info.keys()
|
||||
|
@ -60,7 +62,11 @@ if __name__ == "__main__":
|
|||
|
||||
freq_name = next(iter(freq_names))
|
||||
|
||||
# Collect baselines from optional generators
|
||||
baselines = list(baselines)
|
||||
|
||||
# Get phase difference per baseline
|
||||
|
||||
phase_diffs = np.empty( (len(baselines), 2) )
|
||||
for i, base in enumerate(baselines):
|
||||
if i%1000==0:
|
||||
|
|
Loading…
Reference in a new issue