Clean up ring tutorial a bit
"outputs": [],
"source": [
"#%%time\n",
- "stacked_on_off = MapDatasetOnOff.create(geom=geom_image, \n",
- " energy_axis_true=analysis.datasets[0].exposure.geom.get_axis_by_name(\"energy_true\"))\n",
+ "energy_axis_true = analysis.datasets[0].exposure.geom.get_axis_by_name(\"energy_true\")\n",
+ "stacked_on_off = MapDatasetOnOff.create(\n",
+ " geom=geom_image, energy_axis_true=energy_axis_true, name=\"stacked\"\n",
+ ")\n",
+ "\n",
"for dataset in analysis.datasets:\n",
- " dataset_image = (\n",
- " dataset.to_image()\n",
- " ) # Ring extracting makes sense only for 2D analysis\n",
- " dataset_on_off = ring_maker.run(dataset_image)\n",
+ " # Ring extracting makes sense only for 2D analysis\n",
+ " dataset_on_off = ring_maker.run(dataset.to_image())\n",
" stacked_on_off.stack(dataset_on_off)"
]
},
"print(f\"Fit results: mu = {mu:.2f}, std = {std:.2f}\")"
]
},
- {
- "cell_type": "code",
- "execution_count": null,
- "metadata": {},
- "outputs": [],
- "source": []
- },
- {
- "cell_type": "code",
- "execution_count": null,
- "metadata": {},
- "outputs": [],
- "source": []
- },
{
"cell_type": "code",
"execution_count": null,
