diff --git a/notebooks/Jungfrau/Jungfrau_Gain_Correct_and_Verify_NBC.ipynb b/notebooks/Jungfrau/Jungfrau_Gain_Correct_and_Verify_NBC.ipynb index 15131bdc5416b61203bdc4c4aeee53a2366e040c..ee81b4a8da982b1a1325f618f9057ed112ae144a 100644 --- a/notebooks/Jungfrau/Jungfrau_Gain_Correct_and_Verify_NBC.ipynb +++ b/notebooks/Jungfrau/Jungfrau_Gain_Correct_and_Verify_NBC.ipynb @@ -775,6 +775,7 @@ "metadata": {}, "outputs": [], "source": [ + "step_timer.start()\n", "first_seq = 0 if sequences == [-1] else sequences[0]\n", "\n", "corrected_files = [\n", @@ -817,7 +818,8 @@ "gain = jf_raw.get_array(\"data.gain\")[:, :, cell_idx_preview, ...].values\n", "gain_train_cells = (\n", " jf_raw.select_trains(by_id[[tid]]).get_array(\"data.gain\")[:, :, :, ...].values\n", - ")" + ")\n", + "step_timer.done_step(\"Prepared data for plotting\")" ] }, { @@ -865,8 +867,8 @@ "print(f\"The per pixel mean of the first {corrected.shape[1]} trains of the first sequence file\")\n", "\n", "fig, ax = plt.subplots(figsize=(18, 10))\n", - "corrected_mean = np.mean(corrected, axis=1)\n", - "vmin, vmax = np.percentile(corrected_mean, [5, 95])\n", + "corrected_mean = np.nanmean(corrected, axis=1)\n", + "vmin, vmax = np.nanpercentile(corrected_mean, [5, 95])\n", "\n", "mean_plot_kwargs = dict(vmin=vmin, vmax=vmax)\n", "\n", @@ -929,7 +931,7 @@ "display(Markdown((f\"#### A single image from train {tid}\")))\n", "\n", "fig, ax = plt.subplots(figsize=(18, 10))\n", - "vmin, vmax = np.percentile(corrected_train, [5, 95])\n", + "vmin, vmax = np.nanpercentile(corrected_train, [5, 95])\n", "\n", "single_plot_kwargs = dict(\n", " vmin=vmin,\n",