From 71b52aa48c45b633c350e8dea66deac02a3cd386 Mon Sep 17 00:00:00 2001 From: Danilo Ferreira de Lima <danilo.enoque.ferreira.de.lima@xfel.de> Date: Sat, 6 May 2023 14:09:52 +0200 Subject: [PATCH] Better axes. Sort by XGM intensity. --- pes_to_spec/test/offline_analysis.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pes_to_spec/test/offline_analysis.py b/pes_to_spec/test/offline_analysis.py index 814f59b..b4fb6c6 100755 --- a/pes_to_spec/test/offline_analysis.py +++ b/pes_to_spec/test/offline_analysis.py @@ -107,7 +107,7 @@ def plot_result(filename: str, ax.set(title=f"Beam intensity: {intensity*1e-3:.1f} mJ", #avg(stat unc) = {unc_stat}, avg(pca unc) = {unc_pca}", xlabel="Photon energy [eV]", ylabel="Intensity", - ylim=(0, 1.2*Y)) + ylim=(0, 2*Y)) if pes is not None: ax2 = plt.axes([0,0,1,1]) # Manually set the position and relative size of the inset axes within ax1 @@ -471,7 +471,7 @@ def main(): last = min(last-100, pes_raw_t["channel_1_D"].shape[1]-1) pes_to_show = 'channel_1_D' # plot - high_int_idx = np.argsort(xgm_flux_t[:,0])[::-1] + high_int_idx = np.argsort(xgm_flux_t[:,0]) for idx in high_int_idx[-10:]: tid = test_tids[idx] plot_result(os.path.join(args.directory, f"test_{tid}.png"), -- GitLab