From 660b4da5931e26908372f430f61cf4f723d4eca5 Mon Sep 17 00:00:00 2001 From: Philipp Schmidt <philipp.schmidt@xfel.eu> Date: Mon, 16 May 2022 12:06:47 +0200 Subject: [PATCH] Improve default intensity binning in LPD correct --- notebooks/LPD/LPD_Correct_Fast.ipynb | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/notebooks/LPD/LPD_Correct_Fast.ipynb b/notebooks/LPD/LPD_Correct_Fast.ipynb index 5e29c6fac..7963e5036 100644 --- a/notebooks/LPD/LPD_Correct_Fast.ipynb +++ b/notebooks/LPD/LPD_Correct_Fast.ipynb @@ -497,11 +497,11 @@ "metadata": {}, "outputs": [], "source": [ - "left_edge_ratio = 0.02\n", - "right_edge_ratio = 0.98\n", + "left_edge_ratio = 0.01\n", + "right_edge_ratio = 0.99\n", "\n", "fig, ax = plt.subplots(num=1, clear=True, figsize=(15, 6))\n", - "values, bins, _ = ax.hist(np.ravel(data.data), bins=500, range=(-5000, 10000))\n", + "values, bins, _ = ax.hist(np.ravel(data.data), bins=2000, range=(-1500, 2000))\n", "\n", "def find_nearest_index(array, value):\n", " return (np.abs(array - value)).argmin()\n", @@ -519,7 +519,7 @@ "ax.text(vmax+(vmax-vmin)*0.01, max_value/2, 'Colormap interval',\n", " color='red', rotation=90, ha='left', va='center', size='x-large')\n", "\n", - "ax.set_xlim(-5000, 20000)\n", + "ax.set_xlim(vmin-(vmax-vmin)*0.1, vmax+(vmax-vmin)*0.1)\n", "ax.set_ylim(0, max_value*1.1)\n", "pass" ] -- GitLab