diff --git a/notebooks/Gotthard2/Characterize_Darks_Gotthard2_NBC.ipynb b/notebooks/Gotthard2/Characterize_Darks_Gotthard2_NBC.ipynb index 6548a50025758c5ca7aa186c2db0f6fc54dc7e89..74bc37e13706bb269205fb596037f53b02618e46 100644 --- a/notebooks/Gotthard2/Characterize_Darks_Gotthard2_NBC.ipynb +++ b/notebooks/Gotthard2/Characterize_Darks_Gotthard2_NBC.ipynb @@ -450,19 +450,19 @@ " badpixels_map[mod][\n", " ~np.isfinite(noise_map[mod])\n", " ] |= BadPixels.OFFSET_NOISE_EVAL_ERROR.value\n", - "\n", - " for cell in [0, 1]:\n", - " fig, ax = plt.subplots(figsize=(10, 5))\n", - " for g_idx in [0, 1, 2]:\n", - " ax.plot(badpixels_map[mod][:, cell, g_idx], label=f\"G{g_idx} Bad pixel map\")\n", - " ax.set_xticks(np.arange(0, 1281, 80))\n", - " ax.set_xlabel(\"Stripes #\")\n", - " ax.set_xlabel(\"BadPixels\")\n", - " ax.set_title(f\"BadPixels map - Cell {cell} - Module {mod} ({pdu})\")\n", - " ax.set_ylim([0, 5])\n", - " ax.legend()\n", - " plt.show()\n", - "step_timer.done_step(f\"Creating bad pixels constant and plotting it.\")" + " if not local_output:\n", + " for cell in [0, 1]:\n", + " fig, ax = plt.subplots(figsize=(10, 5))\n", + " for g_idx in [0, 1, 2]:\n", + " ax.plot(badpixels_map[mod][:, cell, g_idx], label=f\"G{g_idx} Bad pixel map\")\n", + " ax.set_xticks(np.arange(0, 1281, 80))\n", + " ax.set_xlabel(\"Stripes #\")\n", + " ax.set_xlabel(\"BadPixels\")\n", + " ax.set_title(f\"BadPixels map - Cell {cell} - Module {mod} ({pdu})\")\n", + " ax.set_ylim([0, 5])\n", + " ax.legend()\n", + " plt.show()\n", + "step_timer.done_step(f\"Creating bad pixels constant.\")" ] }, { @@ -472,20 +472,21 @@ "metadata": {}, "outputs": [], "source": [ - "for cons, cname in zip([offset_map, noise_map], [\"Offset\", \"Noise\"]):\n", - " for mod, pdu in da_to_pdu.items():\n", - " display(Markdown(f\"### {cname} for module {mod}:\"))\n", - "\n", - " for cell in [0, 1]:\n", - " fig, ax = plt.subplots(figsize=(10, 5))\n", - " for g_idx in [0, 1, 2]:\n", - " ax.plot(cons[mod][:, cell, g_idx], label=f\"G{g_idx} {cname} map\")\n", - "\n", - " ax.set_xlabel(\"Stripes #\")\n", - " ax.set_xlabel(cname)\n", - " ax.set_title(f\"{cname} map - Cell {cell} - Module {mod} ({pdu})\")\n", - " ax.legend()\n", - " plt.show()" + "if not local_output:\n", + " for cons, cname in zip([offset_map, noise_map], [\"Offset\", \"Noise\"]):\n", + " for mod, pdu in da_to_pdu.items():\n", + " display(Markdown(f\"### {cname} for module {mod}:\"))\n", + "\n", + " for cell in [0, 1]:\n", + " fig, ax = plt.subplots(figsize=(10, 5))\n", + " for g_idx in [0, 1, 2]:\n", + " ax.plot(cons[mod][:, cell, g_idx], label=f\"G{g_idx} {cname} map\")\n", + "\n", + " ax.set_xlabel(\"Stripes #\")\n", + " ax.set_xlabel(cname)\n", + " ax.set_title(f\"{cname} map - Cell {cell} - Module {mod} ({pdu})\")\n", + " ax.legend()\n", + " plt.show()" ] }, {