diff --git a/airshower_beacon_simulation/ba_measure_beacon_phase.py b/airshower_beacon_simulation/ba_measure_beacon_phase.py index eb6187b..ede5b23 100755 --- a/airshower_beacon_simulation/ba_measure_beacon_phase.py +++ b/airshower_beacon_simulation/ba_measure_beacon_phase.py @@ -60,7 +60,7 @@ if __name__ == "__main__": sys.exit(1) beacon_snrs = beacon.read_snr_file(beacon_snr_fname) - snr_str = f"$\\langle SNR \\rangle$ = {beacon_snrs['mean']: .1e}" + snr_str = f"$\\langle SNR \\rangle$ = {beacon_snrs['mean']: .1g}" # read in antennas with h5py.File(antennas_fname, 'a') as fp: @@ -211,7 +211,7 @@ if __name__ == "__main__": p2t = lambda phase: phase/(2*np.pi*f_beacon) fig, ax = plt.subplots(figsize=figsize) - ax.set_title(f"Beacon at antenna {h5ant.attrs['name']}\nF:{frequency:.2e}GHz, $\\varphi$:{beacon_phase:.4f}rad") + ax.set_title(f"Beacon at antenna {h5ant.attrs['name']}\nF:{frequency:.2g}GHz, $\\varphi$:{beacon_phase:.4f}rad") ax.set_xlabel("t [ns]") ax.set_ylabel("Amplitude") diff --git a/airshower_beacon_simulation/bb_measure_clock_phase.py b/airshower_beacon_simulation/bb_measure_clock_phase.py index 7fd5d14..8ebf715 100755 --- a/airshower_beacon_simulation/bb_measure_clock_phase.py +++ b/airshower_beacon_simulation/bb_measure_clock_phase.py @@ -158,7 +158,7 @@ if __name__ == "__main__": ## Histogram ## beacon_snrs = beacon.read_snr_file(beacon_snr_fname) - snr_str = f"$\\langle SNR \\rangle$ = {beacon_snrs['mean']: .1e}" + snr_str = f"$\\langle SNR \\rangle$ = {beacon_snrs['mean']: .1g}" fig = figlib.phase_comparison_figure( loc_c, diff --git a/airshower_beacon_simulation/bc_baseline_phase_deltas.py b/airshower_beacon_simulation/bc_baseline_phase_deltas.py index 1e36ee6..9860ce1 100755 --- a/airshower_beacon_simulation/bc_baseline_phase_deltas.py +++ b/airshower_beacon_simulation/bc_baseline_phase_deltas.py @@ -94,7 +94,7 @@ if __name__ == "__main__": # Compare actual time shifts # ############################## beacon_snrs = beacon.read_snr_file(beacon_snr_fname) - snr_str = f"$\\langle SNR \\rangle$ = {beacon_snrs['mean']: .1e}" + snr_str = f"$\\langle SNR \\rangle$ = {beacon_snrs['mean']: .1g}" actual_antenna_clock_phases = { a.name: -2*np.pi*a.attrs['clock_offset']*f_beacon for a in sorted(antennas, key=lambda a: int(a.name)) } diff --git a/airshower_beacon_simulation/bd_antenna_phase_deltas.py b/airshower_beacon_simulation/bd_antenna_phase_deltas.py index 652ea4b..066c658 100755 --- a/airshower_beacon_simulation/bd_antenna_phase_deltas.py +++ b/airshower_beacon_simulation/bd_antenna_phase_deltas.py @@ -176,7 +176,7 @@ if __name__ == "__main__": # Compare actual time shifts # ############################## beacon_snrs = beacon.read_snr_file(beacon_snr_fname) - snr_str = f"$\\langle SNR \\rangle$ = {beacon_snrs['mean']: .1e}" + snr_str = f"$\\langle SNR \\rangle$ = {beacon_snrs['mean']: .1g}" actual_antenna_time_shifts = { a.name: a.attrs['clock_offset'] for a in sorted(antennas, key=lambda a: int(a.name)) } diff --git a/airshower_beacon_simulation/cb_report_measured_antenna_time_offsets.py b/airshower_beacon_simulation/cb_report_measured_antenna_time_offsets.py index 90c87b5..b9e012c 100755 --- a/airshower_beacon_simulation/cb_report_measured_antenna_time_offsets.py +++ b/airshower_beacon_simulation/cb_report_measured_antenna_time_offsets.py @@ -43,7 +43,7 @@ if __name__ == "__main__": # Read in snr info beacon_snrs = beacon.read_snr_file(beacon_snr_fname) - snr_str = f"$\\langle SNR \\rangle$ = {beacon_snrs['mean']: .1e}" + snr_str = f"$\\langle SNR \\rangle$ = {beacon_snrs['mean']: .1g}" # For now only implement using one freq_name freq_names = antennas[0].beacon_info.keys() diff --git a/airshower_beacon_simulation/da_reconstruction.py b/airshower_beacon_simulation/da_reconstruction.py index 5883dc7..1c47771 100755 --- a/airshower_beacon_simulation/da_reconstruction.py +++ b/airshower_beacon_simulation/da_reconstruction.py @@ -71,7 +71,7 @@ if __name__ == "__main__": ev.antennas = antennas # Read in snr info beacon_snrs = beacon.read_snr_file(beacon_snr_fname) - snr_str = f"$\\langle SNR \\rangle$ = {beacon_snrs['mean']: .1e}" + snr_str = f"$\\langle SNR \\rangle$ = {beacon_snrs['mean']: .1g}" # For now only implement using one freq_name freq_names = antennas[0].beacon_info.keys() diff --git a/airshower_beacon_simulation/dc_grid_power_time_fixes.py b/airshower_beacon_simulation/dc_grid_power_time_fixes.py index 000c5af..b725657 100755 --- a/airshower_beacon_simulation/dc_grid_power_time_fixes.py +++ b/airshower_beacon_simulation/dc_grid_power_time_fixes.py @@ -26,9 +26,9 @@ def save_overlapping_traces_figure(test_location, ev, N_plot = 30, wx=200, title axs.set_title("Antenna traces" + (("\n" + title_extra) if title_extra is not None else '') ) axs.set_xlabel("Time [ns]") axs.set_ylabel("Amplitude [$\\mu V/m$]") - if False: + if True: text_loc = (0.02, 0.95) - axs.text(*text_loc, '[' + ', '.join(['{:.1e}'.format(x) for x in test_location]) + ']', ha='left', transform=axs.transAxes) + axs.text(*text_loc, '[' + ', '.join(['{:.1g}'.format(x) for x in test_location]) + ']', ha='left', transform=axs.transAxes) a_max = [ np.amax(ant.E_AxB) for ant in ev.antennas ] power_sort_idx = np.argsort(a_max) @@ -139,7 +139,7 @@ if __name__ == "__main__": ev.antennas = antennas # Read in snr info beacon_snrs = beacon.read_snr_file(beacon_snr_fname) - snr_str = f"$\\langle SNR \\rangle$ = {beacon_snrs['mean']: .1e}" + snr_str = f"$\\langle SNR \\rangle$ = {beacon_snrs['mean']: .1g}" ## ## Setup grid